Bug 1661965

Summary: Remove glusterfs packages while uninstalling
Product: OpenShift Container Platform Reporter: Suresh <sgaikwad>
Component: InstallerAssignee: Scott Dodson <sdodson>
Installer sub component: openshift-ansible QA Contact: Johnny Liu <jialiu>
Status: CLOSED WONTFIX Docs Contact:
Severity: medium    
Priority: medium    
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-18 19:02:07 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 Suresh 2018-12-25 02:30:31 UTC
Description of problem:

Remove glusterfs client packages while uninstalling glusterfs. We wipe out the entire storage and delete few directories. However, we don't remove the glusterfs packages. Hence, after uninstalling the glusterfs using the playbooks and rerunning the installation playbook again fails. 

This is because the installer skips the glusterfs-fuse package installation since the packages are already installed on the nodes. However, installer fails to create the log files since the parent directories are removed which are provided by glusterfs package. 

This is the error installer throws:
~~~
    "msg": "Error mounting /tmp/openshift-glusterfs-registry-nn90GP: ERROR: failed to create logfile \"/var/log/glusterfs/tmp-openshift-glusterfs-registry-nn90GP.log\" (No s
uch file or directory)\nERROR: failed to open logfile /var/log/glusterfs/tmp-openshift-glusterfs-registry-nn90GP.log\nMount failed. Please check the log file for more detail
~~~
This fails because /var/log/glusterfs directory is not present. This directory is created by glusterfs package.
~~~
[root@localhost ~]# rpm -qf /var/log/glusterfs/
glusterfs-3.12.2-18.el7.x86_64
~~~
During installation, this is the task which installs glusterfs-fuse package.
~~~
- name: Install GlusterFS storage plugin dependencies
  package:
    name: glusterfs-fuse
    state: present
  register: result
until: result is succeeded
~~~
The other packages are installed as a dependency of glusterfs-fuse and glusterfs package.
~~~
[root@localhost ~]# rpm -q glusterfs-fuse --requires
config(glusterfs-fuse) = 3.12.2-18.el7
glusterfs(x86-64) = 3.12.2-18.el7
glusterfs-client-xlators(x86-64) = 3.12.2-18.el7
[root@localhost ~]# rpm -q glusterfs --requires
glusterfs-libs(x86-64) = 3.12.2-18.el7
~~~
the uninstall playbook followed by a install play


Removing the glusterfs packages and then running the install playbook works as expected. It installs the glusterfs* packages and creates all the necessary files and directories.

Created a PR for this:

https://github.com/openshift/openshift-ansible/pull/10929


Version-Release number of the following components:
rpm -q openshift-ansible
openshift-ansible-3.11.51-2.git.0.51c90a3.el7.noarch

Comment 2 Scott Dodson 2019-02-18 19:02:07 UTC
There appear to be no active cases related to this bug. As such we're closing this bug in order to focus on bugs that are still tied to active customer cases. Please re-open this bug if you feel it was closed in error or a new active case is attached.