Closed aivanise closed 2 years ago
Can you show lxc config trust show 61e0346e05ac
?
I've already cleaned up, but I also noticed that it works with lxc from snap so downloaded the latest build of lxc and now it works
looks like I caught a bad build yesterday, sorry for the trouble
Required information
config: cluster.https_address: eul6800573:8443 core.https_address: eul6800573:8443 api_extensions:
Issue description
When adding the remote via token it fails with Error: Failed to find project: not authorized, the certificate is added though, but not the entry in config.yaml
Steps to reproduce
$ rm -rf .config/lxc/ $ ssh yyy33 lxc config trust add Please provide client name: test Client test certificate add token: (token) $ lxc --debug remote add yyy33 (token) Generating a client certificate. This may take a minute... DBUG[02-16|21:06:27] Connecting to a remote LXD over HTTPS DBUG[02-16|21:06:27] Sending request to LXD method=GET url=https://eul6800573:8443/1.0 etag= DBUG[02-16|21:06:27] Connecting to a remote LXD over HTTPS DBUG[02-16|21:06:27] Sending request to LXD method=GET url=https://eul6800573:8443/1.0 etag= DBUG[02-16|21:06:27] Got response struct from LXD DBUG[02-16|21:06:27] { "config": null, "api_extensions": [ "storage_zfs_remove_snapshots", "container_host_shutdown_timeout", .... "instance_snapshot_never", "certificate_token" ], "api_status": "stable", "api_version": "1.0", "auth": "untrusted", "public": false, "auth_methods": [ "tls" ], "environment": { "addresses": null, "architectures": null, "certificate": "", "certificate_fingerprint": "", "driver": "", "driver_version": "", "firewall": "", "kernel": "", "kernel_architecture": "", "kernel_features": null, "kernel_version": "", "lxc_features": null, "os_name": "", "os_version": "", "project": "", "server": "", "server_clustered": false, "server_name": "", "server_pid": 0, "server_version": "", "storage": "", "storage_version": "", "storage_supported_drivers": null } } DBUG[02-16|21:06:27] Sending request to LXD method=POST url=https://eul6800573:8443/1.0/certificates etag= DBUG[02-16|21:06:27] { "name": "", "type": "", "restricted": false, "projects": null, "certificate": "", "password": "eyJjbGllbnRfbmFtZSI6InRlc3QiLCJmaW5nZXJwcmludCI6ImRhZTQ2MzNjM2VmYzA3OWUyMDA0YTcxOWI2NzgxYzY0ODgwN2MxZjdlYjcxZTQ2NDhkOGVhYzJjMGFiMGJkNmUiLCJhZGRyZXNzZXMiOlsiZXVsNjgwMDU 3Mzo4NDQzIl0sInNlY3JldCI6ImRmZjRhNGQ2NzFkZTk1NDJlZDY4NjBlZWQyYmFmM2QyN2U0NTBiZDFhZDI5ZjBhMDZlZTU1YzU5YThiMzIzN2MifQ==", "token": false } DBUG[02-16|21:06:27] Sending request to LXD method=GET url=https://eul6800573:8443/1.0/projects etag= Error: Failed to find project: not authorized
similar thing happens without specifying the token in the command but entring instead of admin passowrd, except the error message is different:
Error: Server doesn't trust us after authentication
no config.yml is generated but the trust is there:
$ ssh yyy33 lxc config trust list +--------+-------+-----------------+--------------+-------------------------------+-------------------------------+ | TYPE | NAME | COMMON NAME | FINGERPRINT | ISSUE DATE | EXPIRY DATE | +--------+-------+-----------------+--------------+-------------------------------+-------------------------------+ | client | test | root@EUL6800585 | 61e0346e05ac | Feb 16, 2022 at 7:55pm (UTC) | Feb 14, 2032 at 7:55pm (UTC) | +--------+-------+-----------------+--------------+-------------------------------+-------------------------------+
$ lxc ls yyy33: Error: The remote "yyy33" doesn't exist
but... since the trust is there, repeated add succeeeds $ lxc remote add yyy33 $ lxc info yyy33: config: cluster.https_address: eul6800573:8443 core.https_address: eul6800573:8443 ...