Bug 1033557 - 08-broker-fix-conf-mcollective throw error during update broker from ose-1.2 to ose-2.0
Summary: 08-broker-fix-conf-mcollective throw error during update broker from ose-1.2 ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 11:32 UTC by Johnny Liu
Modified: 2014-02-04 14:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-04 14:41:36 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


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