Page MenuHomePhabricator

Cloud VPS prepare_cinder_volume script incorrectly detects an existing mountpoint at /srv when NFS is enabled
Closed, ResolvedPublic

Description

The prepare_cinder_volume script used to attach Cinder volumes incorrectly detects /srv being used in /etc/fstab when the instance is also using NFS. The output is as follows:

Where would you like to mount it? </srv> 
Mountpoint /srv appears in /etc/fstab:

nfs-tools-project.svc.eqiad.wmnet:/srv/misc/shared/dumps/project        /mnt/nfs/labstore-secondary-project     nfs     vers=4,bg,intr,sec=sys,proto=tcp,noatime,lookupcache=all,nofsc,rw,hard  0       0


You will need to use a different mountpoint or edit /etc/fstab by hand before using this script.

The script should instead detect if /srv is used in the second column of /etc/fstab instead of just checking if the mountpoint exists in that line. The same issue arises as well, even if the line is commented out.

Event Timeline

Thanks for the report! I'll see about making the search smarter.

Change 663377 had a related patch set uploaded (by Andrew Bogott; owner: Andrew Bogott):
[operations/puppet@production] prepare_cinder_volume: Improve /etc/fstab check

https://gerrit.wikimedia.org/r/663377

Change 663377 merged by Andrew Bogott:
[operations/puppet@production] prepare_cinder_volume: Improve /etc/fstab check

https://gerrit.wikimedia.org/r/663377

This should work better now.