This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 193164 - Enhancements for stateless/readonly root
Enhancements for stateless/readonly root
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-05-25 16:07 EDT by Jeff Law
Modified: 2014-03-16 22:59 EDT (History)
1 user (show)

See Also:
Fixed In Version: 8.35-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-20 11:13:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Jeff Law 2006-05-25 16:07:09 EDT
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 16:07:09 EDT
Created attachment 130001 [details]
Patch to implement new capabilities
Comment 2 Bill Nottingham 2006-05-25 17:41:11 EDT
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 19:07:15 EDT
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 11:13:51 EDT
This was added a while back.

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