Bug 1214087 - oo-admin-move complain about conflicting uid
Summary: oo-admin-move complain about conflicting uid
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Andy Grimm
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1221931
TreeView+ depends on / blocked
 
Reported: 2015-04-21 22:31 UTC by Peter Ruan
Modified: 2016-11-08 03:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-08 20:14:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Ruan 2015-04-21 22:31:51 UTC
Description of problem:
the latest version of oo-admin-move complains about conflicting UID falsely.  When I run the same testcase using an older stage devenv, the test is able to pass.  So it's something that's added in the recent fix




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

How reproducible:
always.

Steps to Reproduce:
Setup multi node env(without district)

2.Create 1 district and add the node without gears into this district
  oo-admin-ctl-district --command create --name vxp0lvoq
  oo-admin-ctl-district --command add-node --name vxp0lvoq --server_identity ip-10-237-226-15

3.Create applications
  rhc app create tkybe1ro php-5.3 -g small --namespace edojdg --rhlogin demo11 -p 'changeme' --insecure

4.Move this application to the non-district node
  oo-admin-move --gear_uuid 5536aee97edbdb5ae400002e --target_server_identity ip-10-179-152-50

Actual results:

13:12:03] INFO> Remote cmd: `oo-admin-move --gear_uuid 5536aee97edbdb5ae400002e --target_server_identity ip-10-179-152-50` @ssh://root.amazonaws.com
      URL: http://tkybe1ro-edojdg.dev.rhcloud.com
      Login: demo11
      App UUID: 5536aee97edbdb5ae400002e
      Gear UUID: 5536aee97edbdb5ae400002e
      DEBUG: Source district uuid: 5536aebd4f00520001000001
      DEBUG: Destination district uuid: 5536ab4051fc9f0001000001
      DEBUG: Getting existing app 'tkybe1ro' status before moving
      DEBUG: Gear component 'php-5.3' was running
      DEBUG: Stopping existing app cartridge 'php-5.3' before moving
      DEBUG: Force stopping existing app before moving
      /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.34.1/lib/openshift/mcollective_application_container_proxy.rb:268:in `reserve_uid': uid could not be reserved in target district '5536ab4051fc9f0001000001'.  Please ensure the target district has available capacity or does not contain a conflicting uid. (OpenShift::OOException)
      	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.34.1/lib/openshift/mcollective_application_container_proxy.rb:2018:in `move_gear'
      	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.34.1/lib/openshift/mcollective_application_container_proxy.rb:1949:in `block in move_gear_secure'
      	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.36.1/app/models/lock.rb:62:in `run_in_app_lock'
      	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.34.1/lib/openshift/mcollective_application_container_proxy.rb:1946:in `move_gear_secure'
      	from /usr/sbin/oo-admin-move:146:in `block in <main>'
      	from /usr/sbin/oo-admin-move:93:in `each'
      	from /usr/sbin/oo-admin-move:93:in `<main>'



Expected results:


Additional info:

Comment 1 Peter Ruan 2015-04-21 22:33:20 UTC
using ami-id ami-f0ed9198, I can run the same scenario w/o problems.

Comment 2 Peter Ruan 2015-04-21 22:37:02 UTC
Images created after this PR seem to exhibit the problem describe above
https://github.com/openshift/origin-server/pull/6126

Comment 3 Peter Ruan 2015-04-28 20:09:19 UTC
with the latest devenv, the problem seems to have gone.  Howver, the exit status is 0 it should give a non-zero exit status.
[12:58:12] INFO> Remote cmd: `oo-admin-move --gear_uuid 553fe627a8a8effd81000001 --target_server_identity ip-10-232-131-166` @ssh://root.amazonaws.com
      URL: http://w0ye0d1b-d0rjba.dev.rhcloud.com
      Login: demo13
      App UUID: 553fe627a8a8effd81000001
      Gear UUID: 553fe627a8a8effd81000001
      DEBUG: Source district uuid: 990700797964537949061120
      DEBUG: Destination district uuid: NONE
      Error moving gear. Move gear only allowed from non-districted/districted node to districted node.

      [12:58:35] INFO> Exit Status: 0

Comment 4 Peter Ruan 2015-04-28 21:29:46 UTC
the exit code should be non-zero.  Lowering the severity.

Comment 6 openshift-github-bot 2015-07-20 21:35:19 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/14726cc0f56df96f370fdf00d21555cf34d96789
Bug 1214087 - return non-zero on all exceptions in oo-admin-move

Comment 7 Jianwei Hou 2015-08-05 07:34:09 UTC
Verified on devenv_5597

[root@ip-10-142-10-156 ~]# oo-admin-move --gear_uuid 55c1bbccd4f401a229000024 -i ip-10-51-181-207
URL: http://d1-jhou.dev.rhcloud.com
Login: jhou
App UUID: 55c1bbccd4f401a229000024
Gear UUID: 55c1bbccd4f401a229000024
DEBUG: Source district uuid: 6a29cece3b3e11e5ba870242ac110001
DEBUG: Destination district uuid: NONE
Error moving gear. Move gear only allowed from non-districted/districted node to districted node.
[root@ip-10-142-10-156 ~]# echo $?
1


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