statd startup races with / becoming writable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Lucid |
Confirmed
|
High
|
Canonical Server | ||
Maverick |
Confirmed
|
Undecided
|
Unassigned | ||
Natty |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This bug is in Lucid.
The init script for statd runs sm-notify in its pre-start, which writes to /var/lib/
Because of https:/
Since statd isn't starting up, these machines can't mount their nfs mounts.
Repro steps:
1) Get a Lucid machine, default partitioning, setup nfs
2) Make sm-notify actually do work on startup (e.g. "sudo touch /var/lib/
3) Add a (e.g. 20 second) sleep to the start of fsck. Or just replace it with a binary that sleeps for 20 seconds. Or do something to ensure that it will take a long time (messy up your filesystem)
4) Shutdown without unmounting / cleanly (or otherwise force a fsck on startup)
5) Observe that statd fails on next startup. If you have it strace'd, you'll see:
open("/
I've filed this as a separate bug with specific repro instructions, but note that there are two other similar statd bugs:
https:/
https:/
Related branches
- James Hunt (community): Needs Fixing
- Steve Langasek: Pending requested
- Ubuntu branches: Pending requested
-
Diff: 116 lines (+58/-6)5 files modifieddebian/changelog (+11/-0)
debian/control (+1/-1)
debian/nfs-common.statd-mounting.upstart (+28/-0)
debian/nfs-common.statd.upstart (+17/-5)
debian/rules (+1/-0)
Changed in nfs-utils (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Canonical Server Team (canonical-server) |
Changed in nfs-utils (Ubuntu Lucid): | |
status: | New → Confirmed |
Changed in nfs-utils (Ubuntu Natty): | |
status: | Confirmed → New |
Changed in nfs-utils (Ubuntu Lucid): | |
importance: | Undecided → High |
Changed in nfs-utils (Ubuntu Natty): | |
importance: | High → Undecided |
Changed in nfs-utils (Ubuntu Lucid): | |
assignee: | nobody → Canonical Server Team (canonical-server) |
Changed in nfs-utils (Ubuntu Natty): | |
assignee: | Canonical Server Team (canonical-server) → nobody |
Also note that if there are locks remaining in /var/lib/nfs/sm/... and this race occurs, sm-notify will fail to notify the nfs server about locks, but exit 0 anyway. backup_hosts() will attempt to move the files into sm.bak and, that having failed (non-fatally) due to a readonly filesystem, get_hosts() will decide there are no hosts to notify and exit 0.