Bug 1102553 - met undefined method when trying to add non-exist node to district
Summary: met undefined method when trying to add non-exist node to district
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-29 08:11 UTC by Meng Bo
Modified: 2015-05-15 00:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 16:50:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Meng Bo 2014-05-29 08:11:11 UTC
Description of problem:
bash-4.1# oo-admin-ctl-district -c add-node -n dist1 -i non-exist
/usr/sbin/oo-admin-ctl-district:215:in `block in <main>': undefined method `casecmp' for nil:NilClass (NoMethodError)
        from /usr/sbin/oo-admin-ctl-district:178:in `block in collate_errors'
        from /usr/sbin/oo-admin-ctl-district:176:in `each'
        from /usr/sbin/oo-admin-ctl-district:176:in `collate_errors'
        from /usr/sbin/oo-admin-ctl-district:213:in `<main>'


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

How reproducible:
always

Steps to Reproduce:
1. Create district on broker
2. Try to add non-existing node to the district
3.

Actual results:
bash-4.1# oo-admin-ctl-district -c add-node -n dist1 -i non-exist
/usr/sbin/oo-admin-ctl-district:215:in `block in <main>': undefined method `casecmp' for nil:NilClass (NoMethodError)

Expected results:
Should return meaningful error message

Additional info:

Comment 1 Zamir SUN 2014-08-28 06:22:52 UTC
I think this is the same with bug 1122339.
https://bugzilla.redhat.com/show_bug.cgi?id=1122339
I've submitted a pull request there.
https://github.com/openshift/origin-server/pull/5663

Comment 2 Qixuan Wang 2014-09-16 03:28:24 UTC
Tested on devenv_5167, the bug has been fixed, thanks.

Add a non-exist node to the district:
[root@ip-10-81-186-51 ~]# oo-broker oo-admin-ctl-district -c add-node -n dist_1 -i node


{"_id"=>"5417e19fe22aa22272000001",
 "uuid"=>"1499132e3d7011e48e60da48c8899057",
 "available_uids"=>"<6000 uids hidden>",
 "name"=>"dist_1",
 "platform"=>"linux",
 "gear_size"=>"small",
 "available_capacity"=>6000,
 "max_uid"=>6999,
 "max_capacity"=>6000,
 "active_servers_size"=>0,
 "updated_at"=>2014-09-16 07:07:11 UTC,
 "created_at"=>2014-09-16 07:07:11 UTC}

ERROR OUTPUT:
Cannot connect to node.


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