Skip to content

Wait for LXD cert to become valid#108

Merged
idroz merged 1 commit intobravetools:masterfrom
Szubie:wait-lxd-cert-valid
Jul 15, 2022
Merged

Wait for LXD cert to become valid#108
idroz merged 1 commit intobravetools:masterfrom
Szubie:wait-lxd-cert-valid

Conversation

@Szubie
Copy link
Collaborator

@Szubie Szubie commented Jul 15, 2022

When running brave init on Windows I have been consistently encountering the following error which interrupts the init:

  • 2022/07/14 16:43:57 failed to add remote host: The provided certificate isn't valid yet

It appears that LXD recently changed their cert validation, which seems to have tightened restrictions as this didn't happen before.

The problem likely occurs due to time-sync issues between the host and VM, since the certificate is already valid according to the host but gets rejected by LXD running inside of multipass.

Addding a short 5-second sleep after retrieving remote LXD cert appears to help prevent time sync issues between VM and host from causing the cert to be judged invalid. It's a bit arbitrary but it allows me to run brave init - will keep an eye on this in case we need to change the length of the sleep in future.

…e sync issues between VM and host from causing the cert to be judged invalid.
@idroz idroz merged commit 77e7686 into bravetools:master Jul 15, 2022
@Szubie Szubie deleted the wait-lxd-cert-valid branch July 15, 2022 14:29
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 this pull request may close these issues.

2 participants