Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Cannot have more than one container per DISTRO_NAME, DISTRO_RELEASE tuple #4

Open
ymauray opened this issue Nov 25, 2022 · 0 comments · May be fixed by #5
Open

Cannot have more than one container per DISTRO_NAME, DISTRO_RELEASE tuple #4

ymauray opened this issue Nov 25, 2022 · 0 comments · May be fixed by #5

Comments

@ymauray
Copy link

ymauray commented Nov 25, 2022

In function container_bootstrap, DISTRO_NAME and DISTRO_RELEASE are derived from DISTRO_FULL.
Then R, the directory where the machine is cached, depends on DISTRO_FULL.

If R doesn't exist, a machine is debootstrap-ed in there, and the /etc/hosts file is filled with the NAME of that first machine.

Example : machinespawn bootstrap "ubuntu-22.10" "ubuntu-butterfly" "amd64" will create a machine in /var/cache/machinespawn/bootstrap/ubuntu-22.10-amd64 and write 127.0.0.1 localhost ubuntu-butterfly to /var/cache/machinespawn/bootstrap/ubuntu-22.10-amd64/etc/hosts.

But because R doesn't depend on the machine's name, it is not possible to create a correct second container based on ubuntu-22.10.

Example: machinespawn bootstrap "ubuntu-22.10" "butterfly-builder" "amd64" will not create the machine in /var/cache/machinespawn/bootstrap/ubuntu-22.10-amd64 because the directory already exists. The machine is then correctly imported with the name butterfly-builder but its /etc/hosts file contains 127.0.0.1 localhost ubuntu-butterfly and not 127.0.0.1 localhost butterfly-builder

ymauray added a commit to ymauray/machinespawn that referenced this issue Nov 25, 2022
@ymauray ymauray linked a pull request Nov 25, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant