Bug 1618420

Summary: AWS settings are lost on 3.10 -> 3.11 upgrade
Product: OpenShift Container Platform Reporter: Vadim Rutkovsky <vrutkovs>
Component: Cluster Version OperatorAssignee: Vadim Rutkovsky <vrutkovs>
Status: CLOSED ERRATA QA Contact: Gaoyun Pei <gpei>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: aos-bugs, gpei, jokerman, jupierce, kalexand, mifiedle, mmccomas, pasik, wsun, xtian
Target Milestone: ---Keywords: DeliveryBlocker
Target Release: 3.11.0   
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-10-11 07:25:20 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 Vadim Rutkovsky 2018-08-16 15:11:00 UTC
Description of problem:

/etc/sysconfig/{{ openshift_service_type }}-node is rewritten on 3.10 -> 3.11 upgrade. Need to find out what's causing it and ensure roles/openshift_node/tasks/aws.yml is being run during upgrade

Comment 4 Vadim Rutkovsky 2018-08-17 10:08:36 UTC
RPM update erases this file so AWS settings need to be written again.

Created https://bugzilla.redhat.com/show_bug.cgi?id=1618420

Comment 5 Vadim Rutkovsky 2018-08-17 13:36:22 UTC
PR - https://github.com/openshift/openshift-ansible/pull/9641

Comment 6 Vadim Rutkovsky 2018-08-17 15:36:16 UTC
RPM uninstall erased the existing config and renames it to 

  Cleanup    : origin-node-3.10.0-1.8.20c7bd1.x86_64                        5/8 
warning: /etc/sysconfig/origin-node saved as /etc/sysconfig/origin-node.rpmsave

Fresh RPMs has dropped `%config(noreplace)` section for this file, so it gets erased.

Created https://github.com/openshift/origin/pull/20683 to fix this in Origin

Comment 7 Vadim Rutkovsky 2018-08-20 09:49:07 UTC
Origin RPM doesn't care about this file, so it would be removed when 3.10 RPM is removed.

Correct fix for this would be setting options in openshift-ansible - https://github.com/openshift/openshift-ansible/pull/9641

Comment 8 Scott Dodson 2018-08-21 15:29:29 UTC
*** Bug 1619731 has been marked as a duplicate of this bug. ***

Comment 9 Scott Dodson 2018-08-21 18:19:24 UTC
After discussion on aos-cluster-lifecycle with Seth and Clayton we've agreed to re-introduce the sysconfig in the RPMs.

https://github.com/openshift/origin/pull/20717 extends Vadim's work with other necessary specfile changes.

Comment 10 Scott Dodson 2018-08-22 21:01:19 UTC
https://github.com/openshift/origin/pull/20717 merged

Comment 15 Mike Fiedler 2018-08-29 11:25:50 UTC
I successfully upgraded on AWS to v3.11.0-0.24.0 using the same version of openshift-ansible.

Comment 16 Gaoyun Pei 2018-08-30 10:09:52 UTC
Verify this bug with an upgrade test to 3.11.0-0.25.0. on aws using openshift-ansible-3.11.0-0.25.0.git.0.7497e69.el7.noarch.rpm 

After upgrade, atomic-openshift-node sysconfig file was kept as before.

[root@ip-172-18-11-149 ~]# cat /etc/sysconfig/atomic-openshift-node
OPTIONS=
# /etc/origin/node/ should contain the entire contents of
# /var/lib/origin.local.certificates/node-${node-fqdn} generated by
# running 'openshift admin create-node-config' on your master
#
# If if your node is running on a separate host you can rsync the contents
# rsync -a root@openshift-master:/var/lib/origin/origin.local.certificates/node-`hostname`/ /etc/origin/node
CONFIG_FILE=/etc/origin/node/node-config.yaml

# Proxy configuration
# Origin uses standard HTTP_PROXY environment variables. Be sure to set
# NO_PROXY for your master
#NO_PROXY=master.example.com
#HTTP_PROXY=http://USER:PASSWORD@IPADDR:PORT
#HTTPS_PROXY=https://USER:PASSWORD@IPADDR:PORT
DEBUG_LOGLEVEL=5
IMAGE_VERSION=v3.11
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=xxx
KUBECONFIG=/etc/origin/node/bootstrap.kubeconfig
BOOTSTRAP_CONFIG_NAME=qe-master

[root@ip-172-18-11-149 ~]# rpm -qf /etc/sysconfig/atomic-openshift-node
atomic-openshift-node-3.11.0-0.25.0.git.0.a95c194.el7.x86_64

Comment 18 errata-xmlrpc 2018-10-11 07:25:20 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:2652