Bug 1705019 - Avoid error when collecting logs on data-centers with no hosts active
Summary: Avoid error when collecting logs on data-centers with no hosts active
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-log-collector
Version: 4.3.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.3.5
: ---
Assignee: Douglas Schilling Landgraf
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1723789
TreeView+ depends on / blocked
 
Reported: 2019-05-01 06:48 UTC by Germano Veit Michel
Modified: 2019-08-12 11:55 UTC (History)
3 users (show)

Fixed In Version: ovirt-log-collector-4.3.3-1.el7ev
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-12 11:55:10 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:2443 0 None None None 2019-08-12 11:55:12 UTC
oVirt gerrit 99716 0 ovirt-log-collector-4.3 MERGED dump-chains: avoid error if DC has no hosts up 2019-05-14 03:11:25 UTC
oVirt gerrit 99974 0 ovirt-log-collector-4.3 MERGED dump-chains: avoid error if DC has no hosts up 2019-05-14 03:24:04 UTC

Description Germano Veit Michel 2019-05-01 06:48:26 UTC
Description of problem:

Due to my own https://gerrit.ovirt.org/#/c/91979/, if a DC has no hosts in Up state, ovirt-log-collector will print an error message on the screen due to the dump_chains dictionary not containing the key with the data center name.

Just the collection thread for the host raises the exception, log collection seems to work regardless. But the error on the screen is not nice.

Version-Release number of selected component (if applicable):
ovirt-log-collector-4.3.2-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create DC
2. Add a host to DC, keep it in maintenance

Actual results:

About to collect information from 3 hypervisors. Continue? (Y/n): INFO: Data center 'Default' volume chains to be collected by 'host1.rhvlab'
INFO: Gathering information from selected hypervisors...
INFO: collecting information from host3.rhvlab
INFO: collecting information from host1.rhvlab
ERROR: 'EmptyDC'
Use the -h option to see usage.

Comment 1 Germano Veit Michel 2019-05-01 06:49:25 UTC
I have the patch ready, just let me run some more tests with empty DCs/Clusters and things in down state to ensure there are no other problems with this. Will send it to gerrit soon.

Comment 2 Germano Veit Michel 2019-05-01 06:55:38 UTC
Patch up for review, but I want to run more tests.

Comment 3 Germano Veit Michel 2019-05-02 02:35:15 UTC
I ran same more tests and it looks fine.

Douglas, could you please help with the reviews and 4.3.z this? I'm going on leave in a few hours.

Comment 4 Sandro Bonazzola 2019-06-21 13:53:41 UTC
Douglas, anything missing for closing this bug? all referenced patches are merged.

Comment 6 Lucie Leistnerova 2019-07-16 12:26:25 UTC
Logs collected with no error on DC with no UP host.

verified in ovirt-log-collector-4.3.3-1.el7ev.noarch

Comment 8 errata-xmlrpc 2019-08-12 11:55:10 UTC
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/RHEA-2019:2443


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