'system host-add' error msg is cryptic when mgmt_mac is not provided
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Abraham Arce |
Bug Description
Brief Description
-----------------
Attempt to add a new host/node to a system using CLI "system host-add -n compute-0 -p worker -l 'manual-
The CLI produced messgage:
'NoneType' object has no attribute 'rstrip'
The return code is 1
Checking the usage of the CLI, could not find any problematic usage:
usage: system host-add [-n <hostname>] [-p <personality>] [-s <subfunctions>]
Note: Although there is no CLI 'system host-modify' any more, users still can alternatively use 'Edit Host' on Horizon to provision the node.
Severity
--------
Major
Steps to Reproduce
------------------
....
system host-add -n compute-0 -p worker -l 'manual-
TC-name:
Expected Behavior
------------------
The host/node was successfully added into the system
Actual Behavior
----------------
The CLI failed with messages and return code was 1.
No new host/node with the specified name was added into the system host-list
Reproducibility
---------------
Reproducible
System Configuration
-------
found on Multi-node system IPv4 system, but it was likely to happen on all types (except AIO-SX)
Lab-name:
ip-1-4
Branch/Pull Time/Commit
-------
stx master as of 20190506T233000Z
Last Pass
---------
Timestamp/Logs
--------------
20190508 14:45:48
Test Activity
-------------
Feature Testing
description: | updated |
tags: | added: stx.retestneeded |
summary: |
- 'system host-add' error msg is unclear + 'system host-add' error msg is cryptic when mgmt_mac is not provided |
Changed in starlingx: | |
assignee: | Bruce Jones (brucej) → Abraham Arce (xe1gyq) |
Issue is reproducible. The following AttributeError occurs before sysinv-api performs the validate_ and_normalize_ mac() which would have raised an exception for the missing MAC address. The client needs to provide the proper mgmt_mac address for the new host.
2019-05-08 20:47:54.112 223748 ERROR wsme.api [-] Server-side error: "'NoneType' object has no attribute 'rstrip'". Detail: python2. 7/site- packages/ wsmeext/ pecan.py" , line 85, in callfunction python2. 7/site- packages/ sysinv/ api/controllers /v1/host. py", line 1717, in post post(ihost_ dict) python2. 7/site- packages/ sysinv/ api/controllers /v1/host. py", line 1346, in _do_post dict['mgmt_ mac']) python2. 7/site- packages/ sysinv/ objects/ __init_ _.py", line 101, in wrapper python2. 7/site- packages/ sysinv/ db/sqlalchemy/ api.py" , line 1297, in ihost_get_ by_mgmt_ mac
Traceback (most recent call last):
File "/usr/lib/
result = f(self, *args, **kwargs)
File "/usr/lib64/
return self._do_
File "/usr/lib64/
ihost_
File "/usr/lib64/
result = fn(*args, **kwargs)
File "/usr/lib64/
mgmt_mac = mgmt_mac.rstrip()
AttributeError: 'NoneType' object has no attribute 'rstrip'