nfs charm fails in install hook

Bug #1251619 reported by Jason Robinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs (Juju Charms Collection)
Fix Released
Undecided
Unassigned

Bug Description

Failed to install nfs/3 charm from charm store to local provider:

2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK Creating config file /etc/default/nfs-kernel-server with new version
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK FATAL: Could not load /lib/modules/3.11.0-13-generic/modules.dep: No such file or directory
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK mount: block device nfsd is write-protected, mounting read-only
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK mount: cannot mount block device nfsd read-only
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK * Exporting directories for NFS kernel daemon...
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK ...done.
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK * Starting NFS kernel daemon
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK ...fail!
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK dpkg: error processing nfs-kernel-server (--configure):
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK subprocess installed post-installation script returned error exit status 1
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK Processing triggers for libc-bin ...
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK ldconfig deferred processing now taking place
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK Errors were encountered while processing:
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK nfs-kernel-server
2013-11-15 12:24:07 INFO juju.worker.uniter context.go:255 HOOK E: Sub-process /usr/bin/dpkg returned an error code (1)
2013-11-15 12:24:07 ERROR juju.worker.uniter uniter.go:350 hook failed: exit status 100

Added whole logfile with 3 attempts.

Dev machine is running 13.10, series is precise, juju version 1.16.3-saucy-amd64

Revision history for this message
Jason Robinson (jaywink) wrote :
Revision history for this message
Jason Robinson (jaywink) wrote :

Deploy to an azure provider worked fine, so problem is related to local provider

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

NFS doesn't work on LXC out-of-the-box as far as I can tell.

Revision history for this message
Charles Butler (lazypower) wrote :

App Armor blocks NFS mounts in LXC.

a check reveals that apparmor is apparently the culprit, so, on the host machine of your lxc, I have to install nfs-common and edit /etc/apparmor.d/lxc/lxc-default to add the following two lines to it.

mount fstype=nfs,
mount fstype=nfs4,
mount fstype=rpc_pipefs,

after which

sudo /etc/init.d/apparmor restart

and it works…..

But this is not always the case - i've had mixed success during testing. Also adding those mount fstype lines is not recommended as LXC has a stringent blocking behavior on what can be done inside the lxc container for good security reasons.

Revision history for this message
Charles Butler (lazypower) wrote :

I'm marking this bug as fix-released as we have updated the README with reasonable work-arounds for LXC providers

Changed in nfs (Juju Charms Collection):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.