Charm needed: NFS

Bug #795476 reported by Ahmed Kamal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Expired
Wishlist
Unassigned

Bug Description

NFS formula needed

Ahmed Kamal (kim0)
Changed in principia:
importance: Undecided → Wishlist
summary: - NFS formula needed
+ formula needed NFS
summary: - formula needed NFS
+ Formula needed: NFS
Mark Mims (mark-mims)
Changed in principia:
assignee: nobody → Mark Mims (mark-mims)
Revision history for this message
Mark Mims (mark-mims) wrote : Re: Formula needed: NFS

Note

    mediawiki:shared-filesystem nfs-server-1:nfs

Changed in principia:
assignee: Mark Mims (mark-mims) → Clint Byrum (clint-fewbar)
status: New → In Progress
Revision history for this message
Mark Mims (mark-mims) wrote :

couldn't push to the associated branch, so just attached another. Feel free to remove.

Also added an example of hooks the clients will have to implement.

Revision history for this message
Mark Mims (mark-mims) wrote :

I'm done putzing around with this one... sorry that took so long.

The attached branches default to:
 - single server share per service name, so multiple units of the same service share the same directory
 - no_all_squash

You might wanna:
 - nfs4 likes idmapd, but mapping 'ubuntu' to 'ubuntu' should be easier!
 - add root_squash back in for sane security defaults

Changed in principia:
assignee: Clint Byrum (clint-fewbar) → Mark Mims (mark-mims)
Revision history for this message
Mark Mims (mark-mims) wrote :

Next need to add a couple of example clients into things like mediawiki and drupal.

One remaining problem is in large deploys, the server can get swamped and timeout a mount attempt. Clients should probably be written to be robust against that.

Changed in principia:
status: In Progress → Fix Released
Revision history for this message
Mark Mims (mark-mims) wrote :

submitting the nfs-client sub to add to the store.

it takes a local mountpoint as config

TODO: needs to accept local mountpoint via a container-local relation with a primary

note the backflips in getting separate shares from the same server... it works, but perhaps there's a better way to do this?

summary: - Formula needed: NFS
+ Charm needed: NFS
Changed in charms:
status: Fix Released → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Mark! Here's some feedback:

1 The examples in README.md are ok, but its really hard to understand *why* I want this subordinate. The "TODO" of figuring out the dir from the service seems *paramount* to this being clarified. I should not have to configure it for each individual service.. though I get that its useful that way even if the services don't implement this container scoped relation.

2 Commented out stuff in metadata.yaml is just ugly and has no explanatory comments. Just remove it and make a TODO file if you want to keep notes for the future.

3 Default mountpoint of /tmp/data seems wrong. mounts would typically go on top of /srv or /mnt.

4
sed -i -e "s/NEED_IDMAPD.*/NEED_IDMAPD=yes/" /etc/default/nfs-common

should be

sed -i -e "s/NEED_IDMAPD=.*/NEED_IDMAPD=yes/" /etc/default/nfs-common

Otherwise if we ever addd something like NEED_IDMAPD_FOO then this will break that variable... and the only reason to use sed on config files is to preserve forward compatibility.

5 hooks/nfs-relation-changed - changes umask in a function.. seems like that might create unintended consequences later

6 hooks/nfs-relation-changed - this is not really idempotent:

share_already_mounted || mount_share

You should simply add the remount option if its already mounted.. as the other options might have changed.

7 hooks/nfs-relation-departed the umount_share will not cause an error when there is a failure, it will just log "umount failed" but exit 0.

Lots of fun stuff to fix! :)

Changed in charms:
status: Fix Committed → Incomplete
Mark Mims (mark-mims)
Changed in charms:
assignee: Mark Mims (mark-mims) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Juju Charms Collection because there has been no activity for 60 days.]

Changed in charms:
status: Incomplete → Expired
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.