Bug 1292125
Summary: | RHGS-Container:Hook scripts missing from the rhgs-3.1.2 docker image | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | surabhi <sbhaloth> |
Component: | rhgs-server-container | Assignee: | Mohamed Ashiq <mliyazud> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Prasanth <pprakash> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | rhgs-3.1 | CC: | hchiramm, mliyazud, nlevinki, pprakash, rcyriac, sankarshan, ssampat, surs, vbellur |
Target Milestone: | --- | Keywords: | ZStream |
Target Release: | RHGS 3.1.2 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rhgs-server-docker-3.1.2-7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-07 12:55:39 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1260783 |
Description
surabhi
2015-12-16 14:34:13 UTC
Here is the deal. We are thinking about 2 solutions. 1) Document the steps to get hook scripts inside the Atomic host from outside of atomic host. 2) We can create a 'backup' directory inside the container image and store the contents of '/var/lib/glusterd' and '/etc/glusterfs/' directories inside 'backup' directory. So that, at first spawn of the container, the user can copy the hook scripts from container 'backup' directory to bind mounted /var/lib/glusterd which makes the hook scripts available in the atomic host. This is one time process and the new containers have it in the atomic host for future use. @Ashiq, can you please go ahead with both solutions ? (In reply to Humble Chirammal from comment #3) > Here is the deal. We are thinking about 2 solutions. > > 1) Document the steps to get hook scripts inside the Atomic host from > outside of atomic host. > > 2) We can create a 'backup' directory inside the container image and store > the contents of '/var/lib/glusterd' and '/etc/glusterfs/' directories inside > 'backup' directory. So that, at first spawn of the container, the user can > copy the hook scripts from container 'backup' directory to bind mounted > /var/lib/glusterd which makes the hook scripts available in the atomic host. > This is one time process and the new containers have it in the atomic host > for future use. We will be having the backup directories(copy) of /etc/glusterfs/ , /var/lib/glusterd, and /var/log/glusterfs in /etc/glusterfs_bck , /var/lib/glusterd_bck, and /var/log/glusterfs_bck respectively in next build. On the first spawn of a container bind mount would have overshadowed these directories by which we lose the hook scripts and glusterd.vol, which are essential for the gluster operations, so now the user can do # mv /etc/glusterfs_bck /etc/glusterfs # mv /var/lib/glusterd_bck /var/lib/glusterd # mv /var/log/glusterfs_bck /var/log/glusterfs getting inside the container. This will keep all the scripts and the files right place without much overhead. > > @Ashiq, can you please go ahead with both solutions ? Backup of /etc/glusterfs, /var/lib/glusterd and /var/log/glusterfs is made in the container. When bind mount is happened these directories are over shadowed, so for the very first time starting a container on atomic host run this command after getting inside the container. # sh /setup.sh This setup script will move the backup to the required place and removes the backup. Then restart glusterd # systemctl restart glusterd Verified as fixed in rhgs-server-docker-3.1.2-7. Followed the steps mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1300637#c2 and could see that the hooks scripts are now made available inside the RHGS container. |