Bug 1033557

Summary: 08-broker-fix-conf-mcollective throw error during update broker from ose-1.2 to ose-2.0
Product: OpenShift Container Platform Reporter: Johnny Liu <jialiu>
Component: Cluster Version OperatorAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.0.0CC: bleanhar, jdetiber, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 14:41:36 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:

Description Johnny Liu 2013-11-22 11:32:02 UTC
Description of problem:
During broker upgrade process, script does not backup mcollective config file, that will lead upgrade failure.

Version-Release number of selected component (if applicable):
openshift-enterprise-release-2.0.0-2.git.4.f54bb4f.el6op.noarch
openshift-enterprise-upgrade-broker-2.0.0-2.git.4.f54bb4f.el6op.noarch

How reproducible:
Always

Steps to Reproduce:
1. Setup ose-1.2 env
2. Install openshift upgrade package
# yum install http://download.devel.redhat.com/brewroot/work/tasks/7537/6627537/openshift-enterprise-release-2.0.0-2.git.4.f54bb4f.el6op.noarch.rpm http://download.devel.redhat.com/brewroot/work/tasks/7537/6627537/openshift-enterprise-upgrade-broker-2.0.0-2.git.4.f54bb4f.el6op.noarch.rpm 
3. Run ose-upgrade all

Actual results:
The script is move a non-existing file.
<--snip-->
ERROR: run_script
/opt/rh/ruby193/root/usr/local/share/ruby/site_ruby/ose-upgrade/broker/upgrades/2/conf/08-broker-fix-conf-mcollective had errors:
--BEGIN OUTPUT--
+ command mv -f /etc/openshift/upgrade/2/client.cfg /opt/rh/ruby193/root/etc/mcollective/client.cfg
+ mv -f /etc/openshift/upgrade/2/client.cfg /opt/rh/ruby193/root/etc/mcollective/client.cfg
mv: cannot stat `/etc/openshift/upgrade/2/client.cfg': No such file or directory

--END /opt/rh/ruby193/root/usr/local/share/ruby/site_ruby/ose-upgrade/broker/upgrades/2/conf/08-broker-fix-conf-mcollective OUTPUT--
INFO: Setting broker step 'conf' status to FAILED
<--snip-->

Expected results:
No error.

Additional info:
Compared with node upgrade process, node upgrade will backup config file to /etc/openshift/upgrade/2/, so looks like broker upgrade miss such process.

Comment 2 Jason DeTiberus 2013-11-22 22:05:44 UTC
This has been fixed in the latest build (2.0.0a-1.git.3.908bd88.el6op)

Comment 3 Johnny Liu 2013-11-26 11:03:49 UTC
Verified this bug with openshift-enterprise-release-2.0.0a-1.git.7.8f100ae.el6op.noarch and openshift-enterprise-upgrade-broker-2.0.0a-1.git.7.8f100ae.el6op.noarch and PASS.

# ose-upgrade all

INFO: /opt/rh/ruby193/root/usr/local/share/ruby/site_ruby/ose-upgrade/broker/upgrades/2/pre/02-broker-backup-conf-files ran without error:
--BEGIN OUTPUT--
+ mkdir -p /etc/openshift/upgrade/2/
+ for file in /etc/mcollective/client.cfg
+ command cp -f /etc/mcollective/client.cfg /etc/openshift/upgrade/2/
+ cp -f /etc/mcollective/client.cfg /etc/openshift/upgrade/2/

--END /opt/rh/ruby193/root/usr/local/share/ruby/site_ruby/ose-upgrade/broker/upgrades/2/pre/02-broker-backup-conf-files OUTPUT--


INFO: /opt/rh/ruby193/root/usr/local/share/ruby/site_ruby/ose-upgrade/broker/upgrades/2/conf/08-broker-fix-conf-mcollective ran without error:
--BEGIN OUTPUT--
+ command mv -f /etc/openshift/upgrade/2/client.cfg /opt/rh/ruby193/root/etc/mcollective/client.cfg
+ mv -f /etc/openshift/upgrade/2/client.cfg /opt/rh/ruby193/root/etc/mcollective/client.cfg
+ conf=/etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf
++ date +%Y-%m-%d-%H:%M:%S
+ command cp -f /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf.ugsave.2013-11-26-06:00:54
+ cp -f /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf.ugsave.2013-11-26-06:00:54
+ sed -i /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf -e '/^\s*MCOLLECTIVE_CONFIG=/ cMCOLLECTIVE_CONFIG="/opt/rh/ruby193/root/etc/mcollective/client.cfg"'

--END /opt/rh/ruby193/root/usr/local/share/ruby/site_ruby/ose-upgrade/broker/upgrades/2/conf/08-broker-fix-conf-mcollective OUTPUT--