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

Feat: make lxc control socket unique per container #645

Open
rchincha opened this issue Sep 17, 2024 · 1 comment
Open

Feat: make lxc control socket unique per container #645

rchincha opened this issue Sep 17, 2024 · 1 comment
Assignees

Comments

@rchincha
Copy link
Contributor

Is your feature request related to a problem? Please describe.

If multiple stacker instances are invoked for the same tag/target, they may step on each other since the lxc control socket is not unique per container.

Describe the solution you'd like

Make the lxc control socket unique per container.

Describe alternatives you've considered

No response

Additional context

No response

@mikemccracken
Copy link
Contributor

note that the simplest way to do this is probably to make the container name used for a build include some randomness.

lxc uses the lxcpath and container name to name the control socket, and nothing outside of stacker really cares what the container name is.

however for the lxcpath, stacker uses the --roots-dir argument - since this comes from the user, uniquifying it might be slightly more involved. (we could make a unique subdir, but we'd have to thread that through the stacker code)

How does it happen that two stackers use the same roots-dir argument but shouldn't conflict?
in some cases, concurrent runs of stacker on the same host might have the same path for the roots-dir arg, even though they aren't actually sharing it - e.g. if they are running in separate mount ns's.

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

No branches or pull requests

2 participants