Bug 1115309 - [origin_broker_241] Default region node does not get selected on gear creation when no specific region specified on multiple nodes environment
Summary: [origin_broker_241] Default region node does not get selected on gear creatio...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1116124 1116836
TreeView+ depends on / blocked
 
Reported: 2014-07-02 07:57 UTC by Jianwei Hou
Modified: 2015-05-15 00:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-10 00:48:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jianwei Hou 2014-07-02 07:57:29 UTC
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:

Comment 1 Ravi Sankar 2014-07-03 07:48:01 UTC
Fixed in https://github.com/openshift/li/pull/2733

Comment 2 openshift-github-bot 2014-07-03 15:40:04 UTC
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.

Comment 3 Jianwei Hou 2014-07-07 03:03:05 UTC
Verified on devenv_4940

Now the gear will be created in a node within the default region.


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