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:
Created attachment 130001 [details] Patch to implement new capabilities
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?
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
This was added a while back.