Bug 1558880 - Need to backup master-config&node-config file during upgrade which is a must for downgrade
Summary: Need to backup master-config&node-config file during upgrade which is a must ...
Keywords:
Status: CLOSED DUPLICATE of bug 1555426
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.z
Assignee: Scott Dodson
QA Contact: liujia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-21 08:10 UTC by liujia
Modified: 2018-04-09 13:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-22 01:56:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1555426 0 unspecified CLOSED yedit module should generate uniquely named backup files 2021-02-22 00:41:40 UTC

Internal Links: 1555426

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 ***


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