Skip to content
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

Nodes list command returns empty namespace in authkey #163

Closed
0xcd0e opened this issue Oct 14, 2021 · 0 comments · Fixed by #167
Closed

Nodes list command returns empty namespace in authkey #163

0xcd0e opened this issue Oct 14, 2021 · 0 comments · Fixed by #167

Comments

@0xcd0e
Copy link

0xcd0e commented Oct 14, 2021

Tested on v0.10.2
When listing information about nodes which have been joined using a preauthkey, the namespace object inside the preauthkey object is not populated correctly

# headscale nodes -n testns list -o json
[
        {
                "ID": 1,
                "MachineKey": "332311d54e1b8b5429494123623dd7a01156d2245d08edac2188c9ca55645b76",
                "NodeKey": "2400f510fea77c800dcfe6b89507e77ed5444d8614be6902d1319ef9dd05fd58",
                "DiscoKey": "6a946ec9ebd99263fb8bb85947f74163710ae4c8622599612747833d91238742",
                "IPAddress": "100.64.0.1",
                "Name": "ts-client",
                "NamespaceID": 1,
                "Namespace": {
                        "ID": 1,
                        "CreatedAt": "2021-10-14T20:24:28.112659768+02:00",
                        "UpdatedAt": "2021-10-14T20:24:28.112659768+02:00",
                        "DeletedAt": null,
                        "Name": "testns"
                },
                "Registered": true,
                "RegisterMethod": "authKey",
                "AuthKeyID": 1,
                "AuthKey": {
                        "ID": 1,
                        "Key": "d87cea8feef8efb95004b8a8f8a3336c711b6a8749e393cb",
                        "NamespaceID": 1,
                        "Namespace": {
                                "ID": 0,
                                "CreatedAt": "0001-01-01T00:00:00Z",
                                "UpdatedAt": "0001-01-01T00:00:00Z",
                                "DeletedAt": null,
                                "Name": ""
                        },
                        "Reusable": false,
                        "Ephemeral": false,
                        "Used": true,
                        "CreatedAt": "2021-10-14T18:25:33.609874717Z",
                        "Expiration": null
                },
                "LastSeen": "2021-10-14T18:40:13.312955161Z",
                "LastSuccessfulUpdate": "2021-10-14T18:40:03.335144188Z",
                "Expiry": "0001-01-01T00:00:00Z",
                "HostInfo": {
                        "IPNVersion": "1.16.0-t86bcf6a96-gf787a582e",
                        "BackendLogID": "32a8ab2521bda27d7d40cb99d9436a1cc628d5f71fb0f8d8b9572468b95e627c",
                        "OS": "linux",
                        "OSVersion": "Debian 10.11 (buster); kernel=4.19.0-18-amd64",
                        "Hostname": "ts-client",
                        "GoArch": "amd64",
                        "Services": [
                                {
                                        "Proto": "peerapi4",
                                        "Port": 58436
                                }
                        ],
                        "NetInfo": {
                                "MappingVariesByDestIP": false,
                                "HairPinning": false,
                                "WorkingIPv6": true,
                                "WorkingUDP": true,
                                "UPnP": true,
                                "PMP": false,
                                "PCP": true,
                                "PreferredDERP": 1,
                                "DERPLatency": {
                                        "1-v4": 0.101115156,
                                        "1-v6": 0.092313259,
                                        "6-v4": 0.161891963,
                                        "6-v6": 0.15165066,
                                        "9-v4": 0.153036126
                                }
                        }
                },
                "Endpoints": [
                        "x.x.x.x:64291",
                        "[xxx]:41641",
                        "192.168.1.20:41641"
                ],
                "EnabledRoutes": null,
                "CreatedAt": "2021-10-14T20:26:21.785091291+02:00",
                "UpdatedAt": "2021-10-14T20:40:13.313129203+02:00",
                "DeletedAt": null
        }
]

Nodes[0].AuthKey.Namespace

{
        "ID": 0,
        "CreatedAt": "0001-01-01T00:00:00Z",
        "UpdatedAt": "0001-01-01T00:00:00Z",
        "DeletedAt": null,
        "Name": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant