Bug 1596789 - Update mount-shared-storage.sh to automatically include all enabled glusterfs mounts in fstab
Summary: Update mount-shared-storage.sh to automatically include all enabled glusterfs...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-29 17:46 UTC by Josiah
Modified: 2018-10-23 15:12 UTC (History)
1 user (show)

Fixed In Version: glusterfs-5.0
Clone Of:
Environment:
Last Closed: 2018-10-23 15:12:23 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Josiah 2018-06-29 17:46:51 UTC
Description of problem:
Currently the mount-shared-storage.sh script requires manual entry of each volume and mount point. There is a TODO item from Bug 1452527 to automatically pull the list of glusterfs mounts from the /etc/fstab file, validate that they are mounted, or attempt to mount them. This is to complete that TODO item.

Version-Release number of selected component (if applicable):
mainline

How reproducible:
Always

Steps to Reproduce:
1. Create a three node cluster
2. Add mounts to /etc/fstab on each node localhost:/volumeName /mnt/volumeName glusterfs defaults,_netdev 0 0
3. Reboot any of the nodes

Actual results:
Sometimes the mounts will mount successfully, most of the time they will not

Expected results:
Mounts will mount successfully every time

Additional info:

Comment 1 Worker Ant 2018-06-29 19:24:29 UTC
REVIEW: https://review.gluster.org/20424 (Update mount-shared-storage.sh to automatically include all enabled glusterfs mounts in fstab) posted (#1) for review on master by Josiah

Comment 2 Worker Ant 2018-07-05 13:41:53 UTC
REVIEW: https://review.gluster.org/20464 (Multiple fixes based on code review suggestions and spellcheck) posted (#1) for review on master by Josiah

Comment 3 Worker Ant 2018-07-10 19:39:26 UTC
COMMIT: https://review.gluster.org/20424 committed in master by "Amar Tumballi" <amarts> with a commit message- Update mount-shared-storage.sh to automatically include all enabled glusterfs mounts in fstab

Currently the mount-shared-storage.sh script requires manual entry of each volume and mount point. There is a TODO item from Bug 1452527 to automatically pull the list of glusterfs mounts from the /etc/fstab file, validate that they are mounted, or attempt to mount them. This is to complete that TODO item.

The extras/mount-shared-storage.sh file has been updated to read only active glusterfs mounts from the /etc/fstab file, verify if they are mounted, and attemt to mount them if they are not. It will exit with a status 0 if successfully mounted or status 1 if any of the mounts fail.

This method will allow the standard method of mounts in /etc/fstab to be utilized and will ensure they are monted following system reboots.

This can be tested by creating a volume, mounting it using the /etc/fstab method, and rebooting the server. Output will be similar to this:
Jun 29 19:09:38 localhost systemd[1]: Starting Mount glusterfs sharedstorage...
Jun 29 19:09:43 localhost mount-shared-storage.sh[4096]: /mnt/mount1 has been mounted
Jun 29 19:09:48 localhost mount-shared-storage.sh[4096]: /mnt/mount2 has been mounted
Jun 29 19:09:48 localhost systemd[1]: Started Mount glusterfs sharedstorage.

Multiple fixes based on code review suggestions and spellcheck

Removed spaces in grep for glusterfs as tabs are valid as well

Added tab as an IFS field separator for the lines read from /etc/fstab

Increased sleep time to 10 seconds before mount validation

Changed mount check to use “mountpoint -q”

Change-Id: Ib90c99ced8f7aefc8dbe87340afc73a28f6195e7
fixes: bz#1596789
Signed-off-by: Josiah <josiahp>

Comment 4 Shyamsundar 2018-10-23 15:12:23 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.