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

Wait for LXD cert to become valid #108

Merged
merged 1 commit into from Jul 15, 2022

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.

None yet

2 participants