Description of problem: ************************************** On the docker image for RHGS3.1.2 , the hook scripts that comes from glusterfs-server package is missing. Version-Release number of selected component (if applicable): docker-registry.usersys.redhat.com/gluster/rhgs-3.1.2-1 How reproducible: Always Steps to Reproduce: 1.Take rhgs-3.1.2 docker image from registry mentioned above, create a container from the given image. 2. 3. Actual results: The hook scripts are missing. Expected results: The hook script that comes from glusterfs-server should be present in docker image as it is required for multiple operations. Additional info:
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.