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
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
Depends On:
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:
Last Closed: 2014-02-26 19:09:37 UTC
Target Upstream Version:

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):

How reproducible:

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

 "available_uids"=>"<6000 uids hidden>",
 "created_at"=>2014-01-20 07:08:15 UTC,
    "created_at"=>2014-01-20 07:08:44 UTC,
    "updated_at"=>2014-01-20 07:08:44 UTC,
 "updated_at"=>2014-01-20 07:08:15 UTC,

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

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
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.