Bug 211839 - readonly-root : /etc/statetab
readonly-root : /etc/statetab
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-23 10:36 EDT by Mark McLoughlin
Modified: 2014-03-16 23:03 EDT (History)
2 users (show)

See Also:
Fixed In Version: 8.46-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-27 13:04:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
initscripts-8.45.1-statetab.patch (1.58 KB, patch)
2006-10-23 10:36 EDT, Mark McLoughlin
no flags Details | Diff
statetab2.patch (1.85 KB, patch)
2006-10-25 05:10 EDT, Mark McLoughlin
no flags Details | Diff
initscripts-statetab3.patch (1.64 KB, patch)
2006-10-27 12:19 EDT, Mark McLoughlin
no flags Details | Diff

  None (edit)
Description Mark McLoughlin 2006-10-23 10:36:02 EDT
I'm working on an image that has an e.g. an LDAP server and mail server, and
uses readonly-root

The $STATE_MOUNT stuff fairly well for putting the persistent data on a separate
disk, apart from one problem - it would be much nicer to have the list of
files/directories on the image rather than the persistent data disk

Also, we should probably make an effort to have good defaults when it comes to
persistent data. Things like SSH keys, databases, mail queues etc. should all
probably default to using the $STATE_MOUNT stuff

So, I'm attaching a patch to add /etc/statetab. Some details:

  - It has a similar behaviour to /etc/rwtab "files" type except if the
    file/directory already exists at the destination, we don't copy it
    across before bind-mounting

  - Theres an /etc/statetab.d too

  - Any /etc/statetab or /etc/statetab.d/* file on the destination disk
    overrides the version on the image - this allows you to override the
    configuration on the image

  - $STATE_MOUNT/files can be used for additional bind mounts

  - I've removed the puppet CA cert stuff - that could go in the default
    /etc/statetab, I think
Comment 1 Mark McLoughlin 2006-10-23 10:36:02 EDT
Created attachment 139130 [details]
initscripts-8.45.1-statetab.patch
Comment 2 Jeff Law 2006-10-23 12:13:57 EDT
I like it.   I have no clue why I didn't see something like this as much cleaner
and more maintainable when compared to having the default list of bind mounts
kept outside the readonly FS image.

Jeff
Comment 3 Bill Nottingham 2006-10-23 15:42:04 EDT
Seems ok at first glance. Where are we going to need this?
Comment 4 Mark McLoughlin 2006-10-23 17:22:25 EDT
Just rawhide I think ....
Comment 5 Jeff Law 2006-10-23 17:58:19 EDT
Agreed, rawhide should be fine.
Jeff
Comment 6 Bill Nottingham 2006-10-24 14:19:15 EDT
Added in CVS, will be in 8.46-1.
Comment 7 Mark McLoughlin 2006-10-25 05:10:18 EDT
Created attachment 139315 [details]
statetab2.patch

Perhaps install a sample /etc/statetab and create /etc/statetab.d ?
Comment 8 Bill Nottingham 2006-10-25 13:23:47 EDT
Looks good, added.
Comment 9 Mark McLoughlin 2006-10-27 12:19:23 EDT
Created attachment 139594 [details]
initscripts-statetab3.patch

Wait! There's more!

(Doh, sorry)

We should have a better default for $STATE_MOUNT and have the package create
the default dir
Comment 10 Bill Nottingham 2006-10-27 13:04:39 EDT
Adding, building as 8.46-1.  

Note You need to log in before you can comment on or make changes to this bug.