Delete of shared host causes 500 Errors / cli errors. #40

Closed
opened 2025-12-29 01:20:52 +01:00 by adam · 3 comments
Owner

Originally created by @linuxkidd on GitHub (Oct 2, 2021).

Reproduction:

  1. Create two namespaces
  2. Add a host to each
  3. Share a host from one namespace to another
  4. Delete the shared host

Log output:

Oct 01 21:25:05 myhost headscale[2726810]: 2021-10-02T03:25:05Z ERR Cannot fetch peers error="invalid hex key (\"\"): length=0, want 32" func=getMapResponse
Oct 01 21:25:05 myhost headscale[2726810]: 2021-10-02T03:25:05Z ERR Failed to get Map response error="invalid hex key (\"\"): length=0, want 32" handler=PollNetMap id=XXXXXXXXXXXXXXXXXXXXX

Further, headscale -n NAMESPACE nodes list fails with:

2021/10/01 21:19:35 Error fetching shared machines: record not found

Only obvious way out was to wipe headscale db and start fresh, although I'm sure some sql queries could have cleared it. I'm just starting with headscale, so no reason to spend time salvaging the DB.

Originally created by @linuxkidd on GitHub (Oct 2, 2021). Reproduction: 1. Create two namespaces 2. Add a host to each 3. Share a host from one namespace to another 4. Delete the shared host Log output: ~~~ Oct 01 21:25:05 myhost headscale[2726810]: 2021-10-02T03:25:05Z ERR Cannot fetch peers error="invalid hex key (\"\"): length=0, want 32" func=getMapResponse Oct 01 21:25:05 myhost headscale[2726810]: 2021-10-02T03:25:05Z ERR Failed to get Map response error="invalid hex key (\"\"): length=0, want 32" handler=PollNetMap id=XXXXXXXXXXXXXXXXXXXXX ~~~ Further, `headscale -n NAMESPACE nodes list` fails with: ~~~ 2021/10/01 21:19:35 Error fetching shared machines: record not found ~~~ Only obvious way out was to wipe `headscale` db and start fresh, although I'm sure some sql queries could have cleared it. I'm just starting with `headscale`, so no reason to spend time salvaging the DB.
adam closed this issue 2025-12-29 01:20:52 +01:00
Author
Owner

@kradalby commented on GitHub (Oct 2, 2021):

Ah good catch, @juanfont can you take a look at this?

We should probably also verify deleting nodes and shared nodes in the integration tests.

@kradalby commented on GitHub (Oct 2, 2021): Ah good catch, @juanfont can you take a look at this? We should probably also verify deleting nodes and shared nodes in the integration tests.
Author
Owner

@juanfont commented on GitHub (Oct 2, 2021):

Yes, I am on it. Hopefully today will be fixed.

@juanfont commented on GitHub (Oct 2, 2021): Yes, I am on it. Hopefully today will be fixed.
Author
Owner

@juanfont commented on GitHub (Oct 11, 2021):

This is fixed now in v0.10.1.

@juanfont commented on GitHub (Oct 11, 2021): This is fixed now in v0.10.1.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#40