Bug 1478731 - nodectl motd bug causes traceback at login
nodectl motd bug causes traceback at login
Product: ovirt-node
Classification: oVirt
Component: General (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-4.1.5
: 4.1
Assigned To: Yuval Turgeman
Depends On:
  Show dependency treegraph
Reported: 2017-08-06 12:38 EDT by Giuseppe Ragusa
Modified: 2017-08-23 04:06 EDT (History)
12 users (show)

See Also:
Fixed In Version: ovirt-node-ng-nodectl-4.1-20170804
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-23 04:06:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Node
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1+
rbarry: devel_ack+
cshao: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 80037 None None None 2017-08-06 12:40 EDT

  None (edit)
Description Giuseppe Ragusa 2017-08-06 12:38:22 EDT
Description of problem:
At each console login a Python traceback gets printed before getting prompt.

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

How reproducible:
Simply login to a freshly installed node or interactively launch the "nodectl motd" command.

Steps to Reproduce:
1. Login
2. Look at the screen

Actual results:
Traceback before nodectl greetings line.

Expected results:
Normal nodectl motd message followed by the nodectl greetings message.

Additional info:
Variable name wrong in /usr/lib/python2.7/site-packages/nodectl/status.py at line 78: bug/traceback resolved substituting status.lower() with overall_status.lower()
Comment 1 cshao 2017-08-07 04:24:57 EDT
QE can reproduce this issue.

Test steps:
1. Install ovirt-node-ng-installer-ovirt-4.1-2017072816.iso.
2. Login ovirt-node-ng.
3. Run "nodectl motd" command.

Test result:
# imgbase w
2017-08-07 08:24:39,770 [INFO] You are on ovirt-node-ng-4.1.4-0.20170728.0+1
[root@dhcp-8-159 ~]# nodectl motd
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/nodectl/__main__.py", line 42, in <module>
  File "/usr/lib/python2.7/site-packages/nodectl/__init__.py", line 200, in CliApplication
    return cmdmap.command(args)
  File "/usr/lib/python2.7/site-packages/nodectl/__init__.py", line 118, in command
    return self.commands[command](**kwargs)
  File "/usr/lib/python2.7/site-packages/nodectl/__init__.py", line 102, in motd
    machine_readable=True).output, self.machine).write()
  File "/usr/lib/python2.7/site-packages/nodectl/status.py", line 51, in __init__
  File "/usr/lib/python2.7/site-packages/nodectl/status.py", line 78, in _update_info
    if "ok" not in status.lower():
AttributeError: Status instance has no attribute 'lower'
Comment 2 cshao 2017-08-18 03:37:19 EDT
Test version:

Test steps:
1. Install ovirt-node-ng-installer-ovirt-4.1-pre-2017080704.iso
2. Login ovirt-node-ng.
3. Run "nodectl motd" command.

# nodectl motd

  node status: OK
  See `nodectl check` for more information

So the bug is fixed, change bug status to VERIFIED.

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