I finally have a working prototype for a writable /etc:


This is a reflection of the updated design here:

The deployment tree now looks like this (and yes, do note I moved
deployments to a "deploy" subdirectory):

# ls -al /ostree/deploy/trees/
total 32
drwxr-xr-x  8 root root 4096 Aug 28 10:31 .
drwxr-xr-x  3 root root 4096 Aug 26 19:08 ..
drwxrwxr-x 18 root root 4096 Aug 28 09:42 gnomeos-3.6-i686-devel-0c1c4e1921bc6967addb87c540c0fa3673927cc10281cec198e29dec5052db7e
drwxr-xr-x 45 root root 4096 Aug 28 09:42 gnomeos-3.6-i686-devel-0c1c4e1921bc6967addb87c540c0fa3673927cc10281cec198e29dec5052db7e-etc
drwxrwxr-x 18 root root 4096 Aug 26 19:08 gnomeos-3.6-i686-devel-4dfaf7ed90563c713fcb0777cdc8896e31f01b16c37e93bed62351b5a98a6f3b
drwxr-xr-x 45 root root 4096 Aug 26 19:09 gnomeos-3.6-i686-devel-4dfaf7ed90563c713fcb0777cdc8896e31f01b16c37e93bed62351b5a98a6f3b-etc
drwxrwxr-x 18 root root 4096 Aug 28 10:29 gnomeos-3.6-i686-devel-d63a913d08faa421b49e33e266fc722b514a10e2992d2313b64cc7f90a395779
drwxr-xr-x 45 root root 4096 Aug 28 11:21 gnomeos-3.6-i686-devel-d63a913d08faa421b49e33e266fc722b514a10e2992d2313b64cc7f90a395779-etc

When ostree_switch_root is called from the initramfs, it bind
mounts /etc to the DEPLOY-etc directory.  Yes, each deploy has its own

When we do a *new* deployment, we look at the *current* one, create a
diff versus the default, and then apply that to the new.

Concretely - if you vi /etc/pwquality.conf, then do a pull/deploy of a
new version, we'll add your updated file in the new tree.  However, if
you reboot into an older version from *before* you edited the
pwquality.conf file, you won't have the changes.

Think of this like "configuration propagates forwards in time".  Now, if
you're bisecting, and you explicitly deploy an older version (that
hadn't been deployed before), you *will* get the updated pwquality.conf.

This semantic is maybe a bit weird, but the alternatives (like just
one /ostree/etc shared by everything) is too problematic because you'll
accumulate the union of all config files from all trees.

Also, this scheme is necessary to preserve the "fully atomic" deployment

I'm going to try merging the branch this week.  After that we can switch
to systemd (which I have another branch for) and that should help make
the system more dogfoodable.

Thoughts/code inspection appreciated!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]