Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Virt-who crashes, when there is no option "owner" in configuration file for RHEVM hypervisor.
Version-Release number of selected component (if applicable):
virt-who: 0.21.2-1
How reproducible:
always
Steps to Reproduce:
1. Create following configuration file (e.g.: /root/rhevm4.conf) on your system:
[rhevm4]
type=rhevm
server=https://your.rhevm.somewhere.com:443/ovirt-engine/
username=user@foo
password=secret
owner=admin
2. Register the system using subscription-manager to candlepin server
3. Verify that you are able to report guest-to-host mapping from your RHEVM hypervisor to candlepin server:
[root@localhost ~]# virt-who -d -o -c /root/rhevm4.conf
4. Comment owner option from: /root/rhevm4.conf
[rhevm4]
type=rhevm
server=https://your.rhevm.somewhere.com:443/ovirt-engine/
username=user@foo
password=secret
#owner=admin <====== Commented owner
5. Try to run virt-who again:
[root@localhost ~]# virt-who -d -o -c /root/rhevm4.conf
Actual results:
[root@localhost ~]# virt-who -d -o -c /root/rhevm4.conf
2018-03-26 10:27:23,887 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:all_drop_dir_config_sections:1272 - Configuration directory '/etc/virt-who.d/' appears empty
2018-03-26 10:27:23,888 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [global]: Value for "interval" not set, using default: 3600
2018-03-26 10:27:23,888 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [global]: Value for "log_per_config" not set, using default: False
2018-03-26 10:27:23,888 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [global]: Value for "print_" not set, using default: False
2018-03-26 10:27:23,888 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [global]: Value for "reporter_id" not set, using default: localhost.localdomain-1b4147c762254fafae65f754dc1eabc5
2018-03-26 10:27:23,888 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [global]: Value for "log_dir" not set, using default: /var/log/rhsm
2018-03-26 10:27:23,889 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [global]: Value for "log_file" not set, using default: rhsm.log
2018-03-26 10:27:23,889 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [rhevm4]: Value for "hypervisor_id" not set, using default: uuid
2018-03-26 10:27:23,889 [virtwho.rhsm_log WARNING] MainProcess(22945):MainThread @config.py:init_config:1434 - [rhevm4]: Value for "is_hypervisor" not set, using default: True
2018-03-26 10:27:23,889 [virtwho.rhsm_log DEBUG] MainProcess(22945):MainThread @executor.py:__init__:54 - Using config named 'rhevm4'
2018-03-26 10:27:23,889 [virtwho.rhsm_log INFO] MainProcess(22945):MainThread @main.py:main:159 - Using configuration "rhevm4" ("rhevm" mode)
2018-03-26 10:27:23,889 [virtwho.rhsm_log INFO] MainProcess(22945):MainThread @main.py:main:161 - Using reporter_id='localhost.localdomain-1b4147c762254fafae65f754dc1eabc5'
2018-03-26 10:27:23,892 [rhsm.https DEBUG] MainProcess(22945):MainThread @https.py:<module>:56 - Using standard libs to provide httplib and ssl
2018-03-26 10:27:23,897 [virtwho.main DEBUG] MainProcess(22945):Thread-2 @virt.py:run:378 - Thread 'rhevm4' started
2018-03-26 10:27:32,160 [virtwho.main INFO] MainProcess(22945):Thread-2 @virt.py:_send_data:929 - Report for config "rhevm4" gathered, placing in datastore
2018-03-26 10:27:32,164 [virtwho.main DEBUG] MainProcess(22945):Thread-2 @virt.py:run:397 - Thread 'rhevm4' terminated
2018-03-26 10:27:32,909 [virtwho.destination_4499800964655798746 DEBUG] MainProcess(22945):Thread-3 @virt.py:run:378 - Thread 'destination_4499800964655798746' started
2018-03-26 10:27:32,911 [virtwho.destination_4499800964655798746 ERROR] MainProcess(22945):Thread-3 @virt.py:run:392 - Thread 'destination_4499800964655798746' fails with exception:
Traceback (most recent call last):
File "virtwho/virt/virt.py", line 383, in run
self._run()
File "virtwho/virt/virt.py", line 339, in _run
self._send_data(data_to_send)
File "virtwho/virt/virt.py", line 578, in _send_data
self.config['owner'] = report.config['owner']
File "virtwho/config.py", line 552, in __getitem__
raise KeyError('{0} not in {1}'.format(key, self.name))
KeyError: 'owner not in rhevm4'
2018-03-26 10:27:32,914 [virtwho.destination_4499800964655798746 INFO] MainProcess(22945):Thread-3 @virt.py:_send_data:557 - Error report received
2018-03-26 10:27:32,914 [virtwho.destination_4499800964655798746 DEBUG] MainProcess(22945):Thread-3 @virt.py:run:406 - Thread 'destination_4499800964655798746' stopped after running once
2018-03-26 10:27:33,913 [virtwho.main DEBUG] MainProcess(22945):MainThread @__main__.py:main:25 - virt-who terminated
2018-03-26 10:27:33,913 [virtwho.main DEBUG] MainProcess(22945):MainThread @executor.py:terminate:224 - virt-who is shutting down
Expected results:
Virt-who should check for owner option. When the option is not available, then it should print some error message and virt-who should be properly terminated.
Additional info:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3169