Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1514487

Summary: The installer should delete etcd2 kube data if platform is using etcd3
Product: OpenShift Container Platform Reporter: Justin Pierce <jupierce>
Component: InstallerAssignee: Vadim Rutkovsky <vrutkovs>
Status: CLOSED ERRATA QA Contact: ge liu <geliu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: aos-bugs, bhoefer, erich, gpei, jokerman, mmccomas, pdwyer, scuppett, sdodson
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: A new playbook was added to cleanup etcd2 data Reason: If the cluster was upgraded from 3.5 it might still carry etcd2 data and use up space. Result: A new playbook was added to safely remove etcd2 data
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-10 09:03:57 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 Justin Pierce 2017-11-17 14:30:01 UTC
Description of problem:
Even if there is a successful migration to etcdv3, etcd2 keys are left behind in the etcd database. It has been recommended that this data be removed to conserve IO & memory use. 

Version-Release number of the following components:
v3.7.9

Comment 5 Scott Dodson 2018-08-23 20:43:51 UTC
*** Bug 1541550 has been marked as a duplicate of this bug. ***

Comment 6 Stephen Cuppett 2018-08-24 13:04:55 UTC
If we don't add it on the current release we already would have missed it for people which have upgraded past 3.9 to 3.10. Is the etcdctl2 command still present in 3.11 for us to use?

We can either try and add this for 3.11 to automatically catch the cleanup and/or clone a doc bug for 3.7 docs to provide cleanup guidance for those who attempt to find it.

Comment 7 Eric Rich 2018-09-04 02:26:49 UTC
Why not make this an optional release note (docs update) in 3.7+ and with 3.11 automate the task?

Comment 8 Vadim Rutkovsky 2018-09-04 12:26:38 UTC
Created https://github.com/openshift/openshift-ansible/pull/9899 to add a playbook to clean up the existing data

Comment 9 Vadim Rutkovsky 2018-09-17 07:50:19 UTC
Fix is available in openshift-ansible-3.11.0-0.33.0

Comment 13 Vadim Rutkovsky 2018-09-21 09:27:47 UTC
Right, can reproduce. `failed_when` didn't work as I expected it to.

PR to master branch - https://github.com/openshift/openshift-ansible/pull/10184

Comment 14 Vadim Rutkovsky 2018-09-24 10:34:46 UTC
3.11 release cherrypick - https://github.com/openshift/openshift-ansible/pull/10199

Comment 15 Vadim Rutkovsky 2018-10-19 08:52:32 UTC
Fix is available in openshift-ansible-3.11.26-1

Comment 16 ge liu 2018-10-23 07:42:14 UTC
Verified with openshift-ansible-3.11.28-1

1).# etcdctl2 mkdir /kubernetes.io/events/default
# etcdctl2 get /kubernetes.io
/kubernetes.io: is a directory

2). Run playbook: /usr/share/ansible/openshift-ansible/playbooks/openshift-etcd/remove-etcdv2-data.yml successfully.

3). Check the v2 data:
# etcdctl2 get /kubernetes.io
migrated

Comment 18 errata-xmlrpc 2019-01-10 09:03:57 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-2019:0024