Skip to content

[Bug] Nodes Reported as Offline when Updating Routes #2637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks done
GoodiesHQ opened this issue May 30, 2025 · 0 comments
Open
4 tasks done

[Bug] Nodes Reported as Offline when Updating Routes #2637

GoodiesHQ opened this issue May 30, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@GoodiesHQ
Copy link

GoodiesHQ commented May 30, 2025

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When sending a POST request to /api/v1/node/<NodeID>/approved_routes, the response is the node object

    "v1SetApprovedRoutesResponse": {
      "type": "object",
      "properties": {
        "node": {
          "$ref": "#/definitions/v1Node"
        }
      }
    },

However, it seems like no matter what the status is of the node before-hand, it will always be reported as online: false within the response's node object.

The node is online, then approve_routes displays the status as offline, then immediately shows online again.

Expected Behavior

The status of the node should not change.

Steps To Reproduce

Forgive me for using the annoying escape mechanics of windows powershell, but I can run this compound command. It checks a node and uses jq to parse the ".node.online" value. It returns true. Then it updates the node's approved routes, and prints out the same ".node.online" value. Finally, it performs the first request again just to check the node's true online status.

PS C:\> 
>> curl.exe -s -H "Authorization: Bearer ${TOKEN}" https://headscale.example.com/api/v1/node/8 | jq .node.online;
>> curl.exe -s -H "Authorization: Bearer ${TOKEN}" -X POST -d "{\`"routes\`":[\`"192.168.0.0/16\`"]}" https://headscale.example.com/api/v1/node/8/approve_routes | jq .node.online;
>> curl.exe -s -H "Authorization: Bearer ${TOKEN}" https://headscale.example.com/api/v1/node/8 | jq .node.online;

true
false
true

Environment

- OS: Ubuntu 22.04
- Headscale version: 0.26
- Tailscale version: N/A

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

Just the above command output is sufficient.

@GoodiesHQ GoodiesHQ added the bug Something isn't working label May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant