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

Bug 1558880

Summary: Need to backup master-config&node-config file during upgrade which is a must for downgrade
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Scott Dodson <sdodson>
Status: CLOSED DUPLICATE QA Contact: liujia <jiajliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, sdodson, wmeng
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-22 01:56:09 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 liujia 2018-03-21 08:10:59 UTC
Description of problem:
During upgrade from v3.7 to v3.9, master-config.yaml and node-config.yaml were not backup before upgrade. This should be required for downgrade if upgrade failed.

Version-Release number of the following components:
openshift-ansible-3.9.12-1.git.0.6155f6e.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Upgrade ocp from v3.7 to v3.9
2.
3.

Actual results:
master-config.yaml and node-config.yaml were not backup before upgrade

Expected results:
backup master-config&node-config file

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Scott Dodson 2018-03-21 13:57:54 UTC
These files should be backed up each time that they're modified. Are you not finding backups generated at all?

Comment 2 N. Harrison Ripps 2018-03-21 14:18:36 UTC
Will release note and seek a solution in 3.9.z; potential dupe of a BZ that Fabian is working.

Comment 3 liujia 2018-03-22 01:56:09 UTC
# ansible -i hosts masters -m shell -a "ls -la /etc/origin/master/|grep master-config"
preserve-jliu-ha-master-etcd-2.0319-cwz.qe.rhcloud.com | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root   6085 Mar 18 22:18 master-config.yaml
-rw-r--r--. 1 root root   6545 Mar 18 22:18 master-config.yaml.orig

preserve-jliu-ha-master-etcd-3.0319-cwz.qe.rhcloud.com | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root   6085 Mar 18 22:18 master-config.yaml
-rw-r--r--. 1 root root   6545 Mar 18 22:18 master-config.yaml.orig

preserve-jliu-ha-master-etcd-1.0319-cwz.qe.rhcloud.com | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root   6085 Mar 18 22:18 master-config.yaml
-rw-r--r--. 1 root root   6545 Mar 18 22:18 master-config.yaml.orig

Above are all master-config files after upgrade to v3.9. 

# cat master-config.yaml.orig |grep defaultNodeSelector
  defaultNodeSelector: node-role.kubernetes.io/compute=true

There is a backup named "master-config.yaml.orig", but this file is not the file before upgrade when ocp stay on v3.7. Should be overwritten by the phase two upgrade(v3.8-v3.9). So user can not downgrade to v3.7 with this file.

Anyway, I think timestamp should be a better way to track any changes when happened. Just as bz1555426. Mark this one as dup.


Another issue need to confirm:

# ansible -i hosts nodes -m shell -a "ls -la /etc/origin/node/|grep node-config"
preserve-jliu-ha-master-etcd-3.0319-cwz.qe.rhcloud.com | SUCCESS | rc=0 >>
-rw-------. 1 root root 1582 Mar 18 21:11 node-config.yaml

preserve-jliu-ha-master-etcd-1.0319-cwz.qe.rhcloud.com | SUCCESS | rc=0 >>
-rw-------. 1 root root 1582 Mar 18 21:11 node-config.yaml

preserve-jliu-ha-master-etcd-2.0319-cwz.qe.rhcloud.com | SUCCESS | rc=0 >>
-rw-------. 1 root root 1582 Mar 18 21:11 node-config.yaml
...

I noticed that there were not node-config backup file. If that means node-config.yaml.<timestamp> or master-config.yaml.<timestamp> did not always generate during upgrade, only happened when updated in master-config or node-config. We need to explain it in the doc, Am I right? 

https://docs.openshift.com/container-platform/3.9/upgrading/downgrade.html

*** This bug has been marked as a duplicate of bug 1555426 ***