Bug 193164
Summary: | Enhancements for stateless/readonly root | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeff Law <law> | ||||||
Component: | initscripts | Assignee: | Bill Nottingham <notting> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Brock Organ <borgan> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | rvokal | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 8.35-1 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-07-20 15:13:51 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Jeff Law
2006-05-25 20:07:09 UTC
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. |