Bug 1292125 - RHGS-Container:Hook scripts missing from the rhgs-3.1.2 docker image
RHGS-Container:Hook scripts missing from the rhgs-3.1.2 docker image
Status: CLOSED CURRENTRELEASE
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: rhgs-server-container (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity high
: ---
: RHGS 3.1.2
Assigned To: Mohamed Ashiq
Prasanth
: ZStream
Depends On:
Blocks: 1260783
  Show dependency treegraph
 
Reported: 2015-12-16 09:34 EST by surabhi
Modified: 2016-07-07 08:55 EDT (History)
9 users (show)

See Also:
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 08:55:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description surabhi 2015-12-16 09:34:13 EST
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:
Comment 3 Humble Chirammal 2016-01-19 02:30:42 EST
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 ?
Comment 4 Mohamed Ashiq 2016-01-27 07:32:16 EST
(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 ?
Comment 8 Mohamed Ashiq 2016-02-11 04:15:42 EST
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
Comment 13 Prasanth 2016-02-17 08:06:13 EST
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.

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