Bug 824231
Summary: | move working directory of glusterd from '/etc/glusterd' to '/var/lib/glusterd' | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Amar Tumballi <amarts> |
Component: | glusterd | Assignee: | Raghavendra Bhat <rabhat> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ujjwala <ujjwala> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | mainline | CC: | gluster-bugs, rabhat, sdharane, ujjwala, vraman |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.4.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-24 17:11:01 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Amar Tumballi
2012-05-23 03:24:22 UTC
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 |