Bug 786709

Summary: [REF] No activate-node action for district.
Product: OKD Reporter: Johnny Liu <jialiu>
Component: PodAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 1.x   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhc-broker-0.86.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-17 02:07:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Johnny Liu 2012-02-02 08:16:44 UTC
Description of problem:
Now there is deactivate-node action for district, no activate-node action.

Version-Release number of selected component (if applicable):
rhc-broker-0.85.27-1.el6_2.noarch

How reproducible:
Always

Steps to Reproduce:
1. Log into instance
2. rhc-admin-ctl-district --help
3.
  
Actual results:
# rhc-admin-ctl-district -h
== Synopsis

rhc-admin-ctl-district: Control districts

== Usage

rhc-admin-ctl-district OPTIONS

Options:
-u|--uuid     <district uuid>
    District uuid  (alphanumeric)
-c|--command <command>
    (add-node|remove-node|deactivate-node|add-capacity|remove-capacity|create|destroy)
-n|--name <district name>
    District name (Used on create or in place of uuid on other commands)
-p|--node_profile <profile_size>
    (std(default)|jumbo|exlarge|large|micro) Only needed for create
-i|--server_identity
    Node server_identity (required)
-s|--size
    Size to add or remove (positive number) (required)
-b|--bypass
    Ignore warnings
-h|--help
    Show Usage info


Expected results:
activate-node action for district should be there.

Additional info:

Comment 1 Dan McPherson 2012-02-02 15:51:16 UTC
While the use for deactivate was only to keep apps from going to a node so you can remove it later I like the idea of activate so I'll go ahead and add it.

Comment 2 Johnny Liu 2012-02-06 03:28:15 UTC
Verified this bug with rhc-broker-0.86.1-1.el6_2.noarch on devenv_1581, and PASSED.

# rhc-admin-ctl-district -c deactivate-node -n d1 --server_identity ip-10-72-34-84
Success!

{"max_uid"=>6999,
 "name"=>"d1",
 "uuid"=>"0470bfa4d2484d91b47f5646988c7a07",
 "externally_reserved_uids_size"=>0,
 "node_profile"=>"std",
 "available_capacity"=>5999,
 "creation_time"=>"2012-02-05T22:14:42-05:00",
 "available_uids"=>"<5999 uids hidden>",
 "active_server_identities_size"=>0,
 "server_identities"=>{"ip-10-72-34-84"=>{"active"=>false}},
 "max_capacity"=>6000}

# rhc-admin-ctl-district -c activate-node -n d1
--server_identity is required with command: activate-node

# rhc-admin-ctl-district -c activate-node -n d1 --server_identity ip-10-72-34-84
Success!

{"name"=>"d1",
 "available_capacity"=>5999,
 "node_profile"=>"std",
 "server_identities"=>{"ip-10-72-34-84"=>{"active"=>true}},
 "max_uid"=>6999,
 "uuid"=>"0470bfa4d2484d91b47f5646988c7a07",
 "active_server_identities_size"=>1,
 "max_capacity"=>6000,
 "available_uids"=>"<5999 uids hidden>",
 "creation_time"=>"2012-02-05T22:14:42-05:00",
 "externally_reserved_uids_size"=>0}