Description of problem: oo-admin-move forbids region changes by default, but the placement algorithm doesn't filter by region, so it's possible that a move will fail because a node in a different region was chosen at random. Version-Release number of selected component (if applicable): rubygem-openshift-origin-msg-broker-mcollective-1.29.3-1.el6oso.noarch openshift-origin-broker-util-1.29.3-1.el6oso.noarch How reproducible: The degree of reproducibility is dependent on which regions the nodes with the lowest active usage percentage for a given gear profile belong to. Steps to Reproduce: 1. oo-admin-move --gear_uuid <UUID> -p medium --change_district Actual results: Login: agrimm App UUID: <UUID> Gear UUID: <UUID> DEBUG: Destination container: euw-med-node2.prod.rhcloud.com DEBUG: Source district uuid: 532cf5185973ca2c17000001 DEBUG: Destination district uuid: 5416f5eae0b8cd9892000001 Error moving gear. Old and new servers must belong to the same region, source region: aws-us-east-1 destination region: aws-eu-west-1 Expected results: move should succeed if there is available capacity in the source region
Can I get the UUID of the gear that was being moved?
We attempted this with multiple gears; I know one of them was 53e4f1ab500446680a000440, which was just a test app of mine and has been deleted. I think we could easily reproduce this in stg if you'd like.
Here, opts should contain region_id (in plugins/msg-broker/mcollective/lib/openshift/mcollective_application_container_proxy.rb#OpenShift::MCollectiveApplicationContainerProxy::resolve_destination): opts = { :node_profile => destination_gear_size, :district_uuid => destination_district_uuid, :gear => gear, :gear_exists_in_district => gear_exists_in_district, :required_uid => required_uid } # the ApplicationContainerProxy method is used so that the node selector plugin can be invoked destination_container = ApplicationContainerProxy.find_available(opts)
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/ed0cbe431e91bd093dae4923ee4a8c64221fba49 Bug 1150140: Region was not being correctly handled during gear moves
Fixed with --> https://github.com/openshift/origin-server/pull/5894
Checked on devenv-stage_1074, with steps as below: 1. Setup multi-node env with 3 nodes placed in 3 separated districts 2. And dist1 and dist2 to region1, and dist2 to region2 3. Create app on region1 4. Move app with --change_district option After 10 times move, all the operations succeeded with moving gear to the district in same region. It will not try to move gear to different region. Verify the bug.