Bug 1154157

Summary: Misused app name as gear uuid in the output of oo-admin-move.
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.2.0CC: adellape, jhonce, jokerman, libra-bugs, libra-onpremise-devel, lxia, mmccomas, pruan, yanpzhan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-msg-broker-mcollective-1.31.1.1-1 Doc Type: Bug Fix
Doc Text:
Due to a bug in the broker MCollective plug-in, confusing output was displayed to administrators when running the oo-admin-move command during a gear move. Specifically, the application name was used in output where the gear UUID should have been displayed. This bug fix updates the plug-in to properly display the gear UUID, and the confusing output is no longer displayed. After applying this update, the openshift-broker service must be restarted.
Story Points: ---
Clone Of: 1111562 Environment:
Last Closed: 2014-12-10 13:24:29 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:
Bug Depends On: 1111562    
Bug Blocks:    

Description Brenton Leanhardt 2014-10-17 17:03:19 UTC
+++ This bug was initially created as a clone of Bug #1111562 +++

Description of problem:
Check the output during moving gears (non-scalable apps or head gear of scalable apps) via oo-admin-move, app name is misused where gear uuid should be used.
DEBUG: Moving content for app 'app1', gear 'app1' to ip-10-136-79-159

Moving non-head gear of scalable apps show the correct info:
DEBUG: Moving content for app 'app1s', gear '783478236010308742152192' to ip-10-164-160-203

Version-Release number of selected component (if applicable):
devenv-stage_890

How reproducible:
always

Steps to Reproduce:
1.Set up multi-node env.
2.Create some apps and move the gears(non-scalalbe apps or head gear of scalable apps).
# oo-broker oo-admin-move --gear_uuid UUID -i $NODE
3.Check the output of step 2

Actual results:
URL: http://app11641-lxia.dev.rhcloud.com
Login: lxia
App UUID: 53a439c14783f8093f0000bc
Gear UUID: 53a439c14783f8093f0000bc
DEBUG: Source district uuid: 53a418d697f7b10001000001
DEBUG: Destination district uuid: 53a418d697f7b10001000001
DEBUG: Getting existing app 'app11641' status before moving
DEBUG: Gear component 'jboss-dv-6.0.0' was running
DEBUG: Stopping existing app cartridge 'jboss-dv-6.0.0' before moving
DEBUG: Force stopping existing app before moving
DEBUG: Gear platform is 'linux'
DEBUG: Creating new account for gear 'app11641' on ip-10-136-79-159
DEBUG: Moving content for app 'app11641', gear 'app11641' to ip-10-136-79-159
Identity added: /etc/openshift/rsync_id_rsa (/etc/openshift/rsync_id_rsa)
Warning: Permanently added '10.164.162.115' (RSA) to the list of known hosts.
Agent pid 112
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 112 killed;
DEBUG: Moving system components for app 'app11641', gear 'app11641' to ip-10-136-79-159
Identity added: /etc/openshift/rsync_id_rsa (/etc/openshift/rsync_id_rsa)
Agent pid 134
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 134 killed;
DEBUG: Starting cartridge 'jboss-dv-6.0.0' in 'app11641' after move on ip-10-136-79-159
DEBUG: Fixing DNS and mongo for gear 'app11641' after move
DEBUG: Changing server identity of 'app11641' from 'ip-10-164-162-115' to 'ip-10-136-79-159'
DEBUG: Deconfiguring old app 'app11641' on ip-10-164-162-115 after move
Successfully moved gear with uuid '53a439c14783f8093f0000bc' of app 'app11641' from 'ip-10-164-162-115' to 'ip-10-136-79-159'

Expected results:
Correct info should be used.

Additional info:

Comment 1 Brenton Leanhardt 2014-10-17 17:03:51 UTC
Upstream pull request:
https://github.com/openshift/origin-server/pull/5783

Comment 2 Jhon Honce 2014-10-17 17:41:24 UTC
Upstream pull request:
https://github.com/openshift/origin-server/pull/5884

Comment 5 Yanping Zhang 2014-11-25 06:56:22 UTC
Verified on http://etherpad.corp.redhat.com/puddle-2-2-2014-11-24
Steps to verify:
1.Prepare env with 2 nodes. Create no-scalable app php1 on node2.
2.Move the gear to node1.

Actual results:
2.Output display gear with uuid correctly.
# oo-admin-move --gear_uuid 5474245811490d2c10000009 -i node1.hosts.ose22.com
URL: http://php1-dom1.ose22.com
Login: zyp
App UUID: 5474245811490d2c10000009
Gear UUID: 5474245811490d2c10000009
DEBUG: Source district uuid: 5474230d11490dba9d000001
DEBUG: Destination district uuid: 5474230d11490dba9d000001
DEBUG: Getting existing app 'php1' status before moving
DEBUG: Gear component 'php-5.4' was running
DEBUG: Stopping existing app cartridge 'php-5.4' before moving
DEBUG: Force stopping existing app before moving
DEBUG: Gear platform is 'linux'
DEBUG: Creating new account for gear '5474245811490d2c10000009' on node1.hosts.ose22.com
DEBUG: Moving content for app 'php1', gear '5474245811490d2c10000009' to node1.hosts.ose22.com
Identity added: /etc/openshift/rsync_id_rsa (/etc/openshift/rsync_id_rsa)
Warning: Permanently added '192.168.1.4' (RSA) to the list of known hosts.
Warning: Permanently added '192.168.1.2' (RSA) to the list of known hosts.
Agent pid 19642
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 19642 killed;
DEBUG: Moving system components for app 'php1', gear '5474245811490d2c10000009' to node1.hosts.ose22.com
Identity added: /etc/openshift/rsync_id_rsa (/etc/openshift/rsync_id_rsa)
Agent pid 19675
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 19675 killed;
DEBUG: Starting cartridge 'php-5.4' in 'php1' after move on node1.hosts.ose22.com
DEBUG: Fixing DNS and mongo for gear '5474245811490d2c10000009' after move
DEBUG: Changing server identity of '5474245811490d2c10000009' from 'node2.hosts.ose22.com' to 'node1.hosts.ose22.com'
DEBUG: Deconfiguring old app 'php1' on node2.hosts.ose22.com after move
Successfully moved gear with uuid '5474245811490d2c10000009' of app 'php1' from 'node2.hosts.ose22.com' to 'node1.hosts.ose22.com'

Comment 7 errata-xmlrpc 2014-12-10 13:24:29 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://rhn.redhat.com/errata/RHBA-2014-1979.html