Bug 193164 - Enhancements for stateless/readonly root
Summary: Enhancements for stateless/readonly root
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-05-25 20:07 UTC by Jeff Law
Modified: 2014-03-17 02:59 UTC (History)
1 user (show)

Fixed In Version: 8.35-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-20 15:13:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to implement new capabilities (4.77 KB, patch)
2006-05-25 20:07 UTC, Jeff Law
no flags Details | Diff
modified patch (4.65 KB, patch)
2006-05-25 21:41 UTC, Bill Nottingham
no flags Details | Diff

Description Jeff Law 2006-05-25 20:07:09 UTC
Description of problem:
This patch provides a couple enhancements for stateless/readonly root systems.

1. Allows a stateless client to use local disk space for scratchpad areas.
   Local scratchpad is discovered by entries in /etc/fstab or by local
   partitions with the right label.  If no local scratchpad area is found,
   then it falls back to tmpfs.

2. Allows a stateless client to have a place to hold persistent data (SSH keys
   or puppet certificates).  We search for a suitable entry in /etc/fstab,
   then a local partition with the right label, then finally for an NFS
   partition.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jeff Law 2006-05-25 20:07:09 UTC
Created attachment 130001 [details]
Patch to implement new capabilities

Comment 2 Bill Nottingham 2006-05-25 21:41:11 UTC
Created attachment 130006 [details]
modified patch

Here, for comments, is a modified version of the above.

Changes made:
- we can't use find or head, they're on /usr (I need to fix the usage of find
  that's earlier in the script too)
  - we can get away with rm -rf of the whole state dir because it won't let you

    remove a mount point
- I'm not convinced we need to run dhclient in rc.sysinit. I think the better
  solution is to fix the net booting code in mkinitrd to set the hostname there

  (since we're running dhcp there). If the hostname is still localhost, I look
  up the hostname without running dhcp. Apologies for that ugly 'ip addr...'   
line.
- changed /.snapshot to $STATE_MOUNT

Opinions?

Comment 3 Jeff Law 2006-05-25 23:07:15 UTC
The use of head was just being extra conservative.  After all, some moron could
create several partitions with the same label.  I think the awk scriptlet you
used ought to work just fine for dealing with that corner case.

No problem with the find -> rm change; I'm not a huge fan of redirecting errors
to /dev/null, but if we're using rm that's definitely necessary since we'll get
a nice error when it tries (and fails) to remove the mountpoint.

For the hostname, ideally we'd tweak the pump code to go ahead and set the
hostname at the same time it sets up the NIC.  It's unlikely, but possible that
there's code out there which assumes current behavior from pump (setup
interface, but ignore the DHCP provided hostname).

As for the "ip addr" stuff -- I've seen worse....

Yea, fixing /.snapshot to reference $STATE_MOUNT was definitely a goof on my
part.  Thanks for catching and fixing it.

Your changes seem fine to me.  If they cause any problems I should know tomorrow
before I disappear for the long weekend :-)

jeff

Comment 4 Bill Nottingham 2006-07-20 15:13:51 UTC
This was added a while back.


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