From 09238da065e8a442dcffdd1f8d906f4330a6e032 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 18 Mar 2016 15:32:58 -0400 Subject: admin: Add an `unlock` command, and libostree API I'm trying to improve the developer experience on OSTree-managed systems, and I had an epiphany the other day - there's no reason we have to be absolutely against mutating the current rootfs live. The key should be making it easy to rollback/reset to a known good state. I see this command as useful for two related but distinct workflows: - `ostree admin unlock` will assume you're doing "development". The semantics hare are that we mount an overlayfs on `/usr`, but the overlay data is in `/var/tmp`, and is thus discarded on reboot. - `ostree admin unlock --hotfix` first clones your current deployment, then creates an overlayfs over `/usr` persistent to this deployment. Persistent in that now the initramfs switchroot tool knows how to mount it as well. In this model, if you want to discard the hotfix, at the moment you roll back/reboot into the clone. Note originally, I tried using `rofiles-fuse` over `/usr` for this, but then everything immediately explodes because the default (at least CentOS 7) SELinux policy denies tons of things (including `sshd_t` access to `fusefs_t`). Sigh. So the switch to `overlayfs` came after experimentation. It still seems to have some issues...specifically `unix_chkpwd` is broken, possibly because it's setuid? Basically I can't ssh in anymore. But I *can* `rpm -Uvh strace.rpm` which is handy. NOTE: I haven't tested the hotfix path fully yet, specifically the initramfs bits. --- man/ostree-admin-unlock.xml | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 man/ostree-admin-unlock.xml (limited to 'man') diff --git a/man/ostree-admin-unlock.xml b/man/ostree-admin-unlock.xml new file mode 100644 index 00000000..ca02bbde --- /dev/null +++ b/man/ostree-admin-unlock.xml @@ -0,0 +1,88 @@ + + + + + + + + + ostree admin unlock + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin unlock + 1 + + + + ostree-admin-unlock + Prepare the current deployment for hotfix or development + + + + + ostree admin unlock OPTIONS + + + + + Description + + + Remove the read-only bind mount on /usr + and replace it with a writable overlay filesystem. This + default invocation of "unlock" is intended for + development/testing purposes. All changes in the overlay + are lost on reboot. However, this command also supports + "hotfixes", see below. + + + + + Options + + + + + + If this option is provided, the + current deployment will be cloned as a rollback + target. This option is intended for things like + emergency security updates to userspace components + such as sshd. The semantics here + differ from the default "development" unlock mode + in that reboots will retain any changes (which is what + you likely want for security hotfixes). + + + + + -- cgit v1.2.1