Bug 1791667

Summary: env var "HEKETI_LVM_WRAPPER" is required in heketi container.
Product: OpenShift Container Platform Reporter: Aditya Ramteke <aramteke>
Component: InstallerAssignee: Niels de Vos <ndevos>
Installer sub component: openshift-ansible QA Contact: Aditya Ramteke <aramteke>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: unspecified CC: gpei, hchiramm, jmulligan, lmeyer, madam, mifiedle, nchilaka, ndevos, pprakash, rcyriac, rhs-bugs, rtalur
Version: 3.11.0Keywords: ZStream
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-ansible-3.11.169-1.git.0.e22497a.el7 Doc Type: Bug Fix
Doc Text:
Cause: Due to an incorrect statement in the heketi-template.yml.j2 template,the HEKETI_LVM_WRAPPER environment variable is only included in deployments where Gluster runs on an external cluster, and not in the case where Gluster is deployed on OpenShift in containers. Consequence: The environment variable is needed to specify a wrapper for LVM commands so that the commands can be run on the container node, outside the container. The missing variable results in less stability of the LVM configuration. Fix: Correct the statement in the heketi-template.yml.j2 template. Result: The HEKETI_LVM_WRAPPER environment variable is now configured in the DeploymentConfig for the Heketi container.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-19 19:53:43 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: 1798365    
Bug Blocks: 1772612    

Comment 2 Niels de Vos 2020-01-16 11:36:03 UTC
This variable should have been included with openshift-ansible-3.11.161-2.git.5.029d67f.el7 from https://access.redhat.com/errata/RHBA-2020:0017

What version of openshift-ansible did you use to deploy?

Comment 7 Niels de Vos 2020-01-20 09:46:29 UTC
Many thanks Aditya!

> I can't find heketi-template.yml file in /usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/files

This file was renamed to 
/usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/templates/heketi-template.yml.j2 as it became a .j2-template. When openshift-ansible runs, it will produce a (temporary) heketi-template.yml file which hets applied to the OCP cluster.

> Also, the deploy-heketi-template.yml file is not updated with HEKETI_LVMWRAPPER changes:

Indeed, at first I did not think it was needed there. However after reading your message and thinking about it a little more, it would be good to add the environment variable there too. The deploy-heketi-template.yml is only used for deploying heketi, and during normal runtime the heketi-template.yml(.j2) is used. But during deployment the first Gluster volume is created (for the heketi db), so LVM commands are executed and that could cause problems (not very likely, but possible).

I will send a PR to openshift-ansible to correct this.


Note that there is a workaround:
Add the HEKETI_LVMWRAPPER (value /usr/sbin/exec-on-host) environment variable to the heketi DeploymentConfig after installation.

Comment 8 Aditya Ramteke 2020-01-20 10:56:49 UTC
(In reply to Niels de Vos from comment #7)
> Many thanks Aditya!
> 
> > I can't find heketi-template.yml file in /usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/files
> 
> This file was renamed to 
> /usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/
> templates/heketi-template.yml.j2 as it became a .j2-template. When
> openshift-ansible runs, it will produce a (temporary) heketi-template.yml
> file which hets applied to the OCP cluster.
>

Thanks, I will raise a documentation bug to correct this. 


> > Also, the deploy-heketi-template.yml file is not updated with HEKETI_LVMWRAPPER changes:
> 
> Indeed, at first I did not think it was needed there. However after reading
> your message and thinking about it a little more, it would be good to add
> the environment variable there too. The deploy-heketi-template.yml is only
> used for deploying heketi, and during normal runtime the
> heketi-template.yml(.j2) is used. But during deployment the first Gluster
> volume is created (for the heketi db), so LVM commands are executed and that
> could cause problems (not very likely, but possible).
> 

Yes! This will help to perform manual upgrades.

Comment 22 errata-xmlrpc 2020-02-19 19:53:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0402