Bug 1511294 - Containerized uninstallation playbook does not clean up LB configuration
Summary: Containerized uninstallation playbook does not clean up LB configuration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.6.z
Assignee: Russell Teague
QA Contact: Wenkai Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-09 05:36 UTC by Kenjiro Nakayama
Modified: 2018-07-20 02:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: haproxy services files were not included in uninstall playbook Consequence: haproxy service files remained after running uninstall playbook Fix: added haproxy service files to uninstall playbook Result: haproxy service files are removed when running uninstall playbook
Clone Of:
Environment:
Last Closed: 2018-04-12 05:59:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1106 0 None None None 2018-04-12 05:59:32 UTC

Description Kenjiro Nakayama 2017-11-09 05:36:36 UTC
Description of problem:
- Containerized uninstallation playbook does not clean up HAProxy configuration

Version-Release number of the following components:
  [root@knakayam-ose36-master1 ~]# rpm -q openshift-ansible
  openshift-ansible-3.6.173.0.48-1.git.0.1609d30.el7.noarch
  [root@knakayam-ose36-master1 ~]# rpm -q ansible
  ansible-2.3.1.0-3.el7.noarch
  [root@knakayam-ose36-master1 ~]# ansible --version
  ansible 2.3.1.0
    config file = /etc/ansible/ansible.cfg
    configured module search path = Default w/o overrides
    python version = 2.7.5 (default, Feb 11 2014, 07:46:25) [GCC 4.8.2 20140120 (Red Hat 4.8.2-13)]

How reproducible: 100%

Steps to Reproduce:

1. Install with containerized installation

  # ansible-playbook     /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml

~~~
  [OSEv3:children]
  masters
  nodes
  etcd
  lb

  [OSEv3:vars]
  containerized=true

  ...
  [lb]
  knakayam-ose36-lb1.example.com
~~~

2. Uninstall cluster

  # ansible-playbook     /usr/share/ansible/openshift-ansible/playbooks/adhoc/uninstall.yml

3. Check /etc/systemd/system/haproxy.service

  #  ls /etc/systemd/system/haproxy.service

Actual results:
- /etc/systemd/system/haproxy.service remains.
- Due to this, if we re-install with "non-containerized" installation, haproxy service fails to start with following error.

  Nov 08 17:38:39 knakayam-ose36-lb1 systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE
  Nov 08 17:38:46 knakayam-ose36-lb1 docker[2321]: Error response from daemon: No such container: openshift_loadbalancer
  Nov 08 17:38:46 knakayam-ose36-lb1 systemd[1]: haproxy.service: control process exited, code=exited status=1
  Nov 08 17:38:46 knakayam-ose36-lb1 systemd[1]: Failed to start haproxy.service.

Expected results:
- /etc/systemd/system/haproxy.service and /etc/systemd/system/haproxy.service.d/limits.conf are removed during the uninstallation.

Additional info:
- proposal patch: https://github.com/openshift/openshift-ansible/pull/6054

Comment 2 Russell Teague 2018-01-22 19:50:55 UTC
Merged some time ago: https://github.com/openshift/openshift-ansible/pull/6054

Comment 4 Wenkai Shi 2018-01-26 09:22:17 UTC
Check with version openshift-ansible-3.6.173.0.97-1.git.0.401ed03.el7, code seems didn't merged.
Looks no build in Errata by the way.

# rpm -q openshift-ansible
openshift-ansible-3.6.173.0.97-1.git.0.401ed03.el7.noarch

# grep -nir "haproxy.service" /usr/share/ansible/openshift-ansible/playbooks/adhoc/uninstall.yml

Comment 5 Russell Teague 2018-01-26 16:43:59 UTC
Opened 3.6 PR: https://github.com/openshift/openshift-ansible/pull/6892

Comment 6 Russell Teague 2018-01-29 13:14:40 UTC
Fixed in openshift-ansible-3.6.173.0.100-1

Comment 7 Wenkai Shi 2018-01-30 08:16:50 UTC
Verified with version openshift-ansible-3.6.173.0.101-1.git.0.7c6b77f.el7, /etc/systemd/system/haproxy.service and /etc/systemd/system/haproxy.service.d/limits.conf are removed during the uninstallation.

# cat /etc/systemd/system/haproxy.service
cat: /etc/systemd/system/haproxy.service: No such file or directory
# cat /etc/systemd/system/haproxy.service.d/limits.conf
cat: /etc/systemd/system/haproxy.service.d/limits.conf: No such file or directory

Comment 10 errata-xmlrpc 2018-04-12 05:59:07 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-2018:1106


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