Description of problem: Currently, for release-3.3 branch and on master branch, if one installs GlusterFS using RPMs, the working directory will become /var/lib/glusterd, but not in case of source install (and other distro installs). It makes sense to keep all type of install behave same. Version-Release number of selected component (if applicable): release-3.3/master
http://review.gluster.com/3479 fixes it in release-3.3, http://review.gluster.com/3338 is queued up for master.
Did source install from 3.3.0 qa41 to 3.3.0 community release. The working directory is moved from /etc/glusterd to /var/lib/glusterd.
The migration of /etc/glusterd to /var/lib/glusterd is smooth when source installation is done. Whereas if the upgrade is rpm upgrade (in my case 3.2.6 to 3.3.0), is failing with following o/p. [root@gqas009 final]# rpm -Uvh glusterfs-server-3.3.0-1.x86_64.rpm warning: glusterfs-server-3.3.0-1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID cae81a29: NOKEY Preparing... ########################################### [100%] 1:glusterfs-server ########################################### [100%] mv: cannot move `/etc/glusterd' to `/var/lib/glusterd': Directory not empty Reason: When 3.3.0 packages are being installed when new (3.3.0)glusterd is started it sees that there is no /var/lib/glusterd and creates them. Since /var/lib/glusterd is already there this part of the upgrade script fails. # Move legacy sysconf files to the correct sysconfdir if [ -d /etc/glusterd ]; then mkdir -p /var/lib mv /etc/glusterd /var/lib/ ln -sf /var/lib/glusterd /etc/glusterd fi Above it tries to move /etc/glusterd to /var/lib, finds non-empty glusterd directory (created by glusterd process) and errors out without upgrading. The below changes to the spec files fixes the issue. git branch master * release-3.3 [root@gqas009 glusterfs.git]# git diff diff --git a/glusterfs.spec.in b/glusterfs.spec.in index c425e06..412b3fb 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -305,7 +305,8 @@ fi # Move legacy sysconf files to the correct sysconfdir if [ -d /etc/glusterd ]; then mkdir -p /var/lib - mv /etc/glusterd /var/lib/ + cp -a /etc/glusterd /var/lib/; + rm -rf /etc/glusterd ln -sf /var/lib/glusterd /etc/glusterd fi [root@gqas009 glusterfs.git]#
this will make it to 3.3.1
CHANGE: http://review.gluster.com/3512 (mount.glusterfs: update the glusterd WORKDIR) merged in release-3.3 by Vijay Bellur (vijay)
http://review.gluster.com/3548 got pushed to upstream as part of bug 230218