Bug 1478731 - nodectl motd bug causes traceback at login
Summary: nodectl motd bug causes traceback at login
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-node
Classification: oVirt
Component: General
Version: 4.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.5
: 4.1
Assignee: Yuval Turgeman
QA Contact: cshao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-06 16:38 UTC by Giuseppe Ragusa
Modified: 2017-08-23 08:06 UTC (History)
12 users (show)

Fixed In Version: ovirt-node-ng-nodectl-4.1-20170804
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-23 08:06:57 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.1+
rbarry: devel_ack+
cshao: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80037 0 None None None 2017-08-06 16:40:08 UTC

Description Giuseppe Ragusa 2017-08-06 16:38:22 UTC
Description of problem:
At each console login a Python traceback gets printed before getting prompt.

Version-Release number of selected component (if applicable):
4.1.4-0.20170728.0.el7

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 08:24:57 UTC
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>
    CliApplication()
  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__
    self._update_info(status)
  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 07:37:19 UTC
Test version:
ovirt-node-ng-4.1.5-0.20170807.0+1
imgbased-0.9.36-1.el7.centos.noarch

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.