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

Changes to support ostree bootable containers #328

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dzickusrh
Copy link

Ostree has bootable containers with a read-only filesystem. This filesystem doesn't support dnf install nor current restraint directory layout and needs a few tweaks. With these changes, restraint should work out of the box with bootable containers over ssh.

Signed-off-by: Don Zickus [email protected]

@dzickusrh
Copy link
Author

@cbouchar - fyi.

Red Hat's Atomic OS is a read-only filesystem that uses ostree
underneath.  Installing packages using dnf does not work.  Instead use
the native package installer 'rpm-ostree install' if an ostree booted
filesystem is detected.

Utilize various options
-y: always install
--apply-live: apply changes now instead of waiting for a reboot
--idempotent: do not error if package is already installed
--allow-inactive: do not error if package is already committed

Also include detection of CentOS Stream and leverage the same plugins.

Signed-off-by: Don Zickus <[email protected]>
Red Hat's ostree is a read-only filesystem that maps everything under
/usr.  The only persistent data is mapped under /etc and /var.  To
support /mnt, ostree mapped the directory under /var/mnt and created it
at first-boot using systemd-tmpfiles.  The directory /var/mnt does not
exist at container creation time and thus restraint-rhts package fails
to create /mnt/scratchspace and /mnt/testarea at install time.

Switch these directories to systemd-tmpfiles that are created on boot.
This resolves the problem and allows the packages to be installed during
the container build or anaconda kickstart.

Signed-off-by: Don Zickus <[email protected]>
@StykMartin
Copy link
Contributor

@cbouchar PTAL

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