Bug 211839 - readonly-root : /etc/statetab
Summary: readonly-root : /etc/statetab
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-23 14:36 UTC by Mark McLoughlin
Modified: 2014-03-17 03:03 UTC (History)
2 users (show)

Fixed In Version: 8.46-1
Clone Of:
Environment:
Last Closed: 2006-10-27 17:04:39 UTC
Type: ---
Embargoed:


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

Description Mark McLoughlin 2006-10-23 14:36:02 UTC
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 14:36:02 UTC
Created attachment 139130 [details]
initscripts-8.45.1-statetab.patch

Comment 2 Jeff Law 2006-10-23 16:13:57 UTC
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 19:42:04 UTC
Seems ok at first glance. Where are we going to need this?

Comment 4 Mark McLoughlin 2006-10-23 21:22:25 UTC
Just rawhide I think ....

Comment 5 Jeff Law 2006-10-23 21:58:19 UTC
Agreed, rawhide should be fine.
Jeff

Comment 6 Bill Nottingham 2006-10-24 18:19:15 UTC
Added in CVS, will be in 8.46-1.

Comment 7 Mark McLoughlin 2006-10-25 09:10:18 UTC
Created attachment 139315 [details]
statetab2.patch

Perhaps install a sample /etc/statetab and create /etc/statetab.d ?

Comment 8 Bill Nottingham 2006-10-25 17:23:47 UTC
Looks good, added.

Comment 9 Mark McLoughlin 2006-10-27 16:19:23 UTC
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 17:04:39 UTC
Adding, building as 8.46-1.  


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