Description of problem: With a two-nodes environment and the default region set, create one application without specifying a region, the gear did not land on a node within the default region, on the contrary, it went to the node of a non-default region. Version-Release number of selected component (if applicable): devenv_4932 How reproducible: Always Steps to Reproduce: 1. Setup a multi node env with 2 nodes 2. Create 2 regions with 2 nodes, create 1 district and add nodes to 2 regions oo-admin-ctl-region -c create -r region_1 oo-admin-ctl-region -c create -r region_2 oo-admin-ctl-region -c add-zone -r region_1 -z zone_1 oo-admin-ctl-region -c add-zone -r region_2 -z zone_2 oo-admin-ctl-district -c create -n test oo-admin-ctl-district -n test -c add-node -i ip-10-231-164-224 -r region_1 -z zone_1 oo-admin-ctl-district -n test -c add-node -i ip-10-203-169-242 -r region_2 -z zone_2 Then set region_1 as default region in broker-dev.conf and restart broker service. [root@ip-10-231-164-224 ~]# tail -n 1 /etc/openshift/broker-dev.conf DEFAULT_REGION_ID="region_1" 3. Create an app rhc create-app d1 diy-0.1 --no-git 4. Call RESTAPI to list the gear groups of the app curl -k -H 'Content-Type: Application/json' --user jhou:xxx https://ec2-54-196-70-231.compute-1.amazonaws.com/broker/rest/domains/jhou/applications/d1/gear_groups Actual results: After step 4: the gear's region is region_2 "gears": [ { "id": "53b3ecb8209dc53518000001", "state": "started", "ssh_url": "ssh://53b3ecb8209dc53518000001.rhcloud.com", "region": "region_2", "zone": "region_2" } ], Expected results: The gear should be created within region_1 Additional info:
Fixed in https://github.com/openshift/li/pull/2733
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/3181c5ca9cfb5408a16b194953accde4f2e45ce4 Bug 1115309 - Default region will be selected when optional param 'region' is not set during app creation.
Verified on devenv_4940 Now the gear will be created in a node within the default region.