Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1055387 - oo-admin-ctl-district accepts '--zone' option without '--region' option
Summary: oo-admin-ctl-district accepts '--zone' option without '--region' option
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:
TreeView+ depends on / blocked
 
Reported: 2014-01-20 07:20 UTC by Jianwei Hou
Modified: 2015-05-15 00:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:09:37 UTC


Attachments (Terms of Use)

Description Jianwei Hou 2014-01-20 07:20:16 UTC
Description of problem:
Add a node to district with '--zone' option without a region name, the command executed successfully. Node is added to district with its region name/uuid and zone name/uuid being both nil.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a district
oo-admin-ctl-district -c create -n d1
2. Add a node to the district with a zone name, the region name is not provided.
oo-admin-ctl-district -c add-node -i ip-10-137-4-247 -z zone1 -n d1


Actual results:
Node is added successfully, leaving the region uuid/name and zone uuid/name being nil

[root@ip-10-137-4-247 ~]# oo-admin-ctl-district -c add-node -i ip-10-137-4-247 -z zone1 -n d1
Success!

{"_id"=>"52dccb5f212fd1554e000001",
 "active_server_identities_size"=>1,
 "available_capacity"=>6000,
 "available_uids"=>"<6000 uids hidden>",
 "created_at"=>2014-01-20 07:08:15 UTC,
 "gear_size"=>"small",
 "max_capacity"=>6000,
 "max_uid"=>6999,
 "name"=>"d1",
 "server_identities"=>
  [{"_id"=>"52dccb7c212fd11dd5000001",
    "_type"=>"Server",
    "active"=>true,
    "created_at"=>2014-01-20 07:08:44 UTC,
    "name"=>"ip-10-137-4-247",
    "region_id"=>nil,
    "region_name"=>nil,
    "unresponsive"=>false,
    "updated_at"=>2014-01-20 07:08:44 UTC,
    "zone_id"=>nil,
    "zone_name"=>nil}],
 "updated_at"=>2014-01-20 07:08:15 UTC,
 "uuid"=>"a17be9f081a111e3b17e22000a8904f7"}

Expected results:
Action should fail, the '--region' is required when '--zone' is specified.

Additional info:

Comment 1 Ravi Sankar 2014-02-06 22:07:10 UTC
Fixed in https://github.com/openshift/origin-server/pull/4454

Comment 2 Jianwei Hou 2014-02-07 08:02:15 UTC
Verified on devenv_4341, try to add a zone without a district:
[root@ip-10-238-191-238 zend]# oo-admin-ctl-district -c add-node -n district_test -i ip-10-238-191-238 -z zone_without_region
ERROR OUTPUT:
Region name is required when zone name is specified


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