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

Determine LXD socket before retrieving a client #355

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

MusicDin
Copy link
Member

Instead of using LXD socket in snap's directory when an error contains /var/lib/lxd/unix.socket in the error, determine the LXD socket before retrieving the client.

@MusicDin MusicDin requested a review from simondeziel October 10, 2023 09:21
@MusicDin MusicDin force-pushed the feature/lxd-user-socket branch from 4875692 to d9dddb0 Compare October 10, 2023 09:25
@MusicDin
Copy link
Member Author

@simondeziel @adamcstephens What do you think if we set TerraformLxdConfig for local during provider's initialization? This way there would be no need to set LXD_DIR/LXD_SOCKET environment variable before retrieving a client. However, I am not sure if this would have any negative implications on existing codebase..

lxd/provider.go Outdated Show resolved Hide resolved
@simondeziel
Copy link
Member

@simondeziel @adamcstephens What do you think if we set TerraformLxdConfig for local during provider's initialization? This way there would be no need to set LXD_DIR/LXD_SOCKET environment variable before retrieving a client. However, I am not sure if this would have any negative implications on existing codebase..

I don't see any harm in exporting those 2 env variables.

@MusicDin MusicDin force-pushed the feature/lxd-user-socket branch from d9dddb0 to a4ee12b Compare October 11, 2023 08:06
@MusicDin MusicDin merged commit 88e80ce into terraform-lxd:main Oct 11, 2023
2 checks passed
@adamcstephens
Copy link
Collaborator

This isn’t Windows compatible so will need to be refactored. It’s blocking the release. https://github.com/terraform-lxd/terraform-provider-lxd/actions/runs/6698055575/job/18200325673

@MusicDin MusicDin deleted the feature/lxd-user-socket branch February 28, 2024 15:12
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.

3 participants