-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
virt.volume_infos: silence libvirt error message #53867
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dwoz
requested changes
Jul 16, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should at least log to this situation to debug or trace.
cbosdo
force-pushed
the
neon-silence-virt-vol_info
branch
from
July 16, 2019 20:57
3cf5bae
to
a88d901
Compare
@dwoz done. |
cbosdo
force-pushed
the
neon-silence-virt-vol_info
branch
from
July 16, 2019 21:31
a88d901
to
ff49fab
Compare
cbosdo
force-pushed
the
neon-silence-virt-vol_info
branch
from
August 26, 2019 07:12
ff49fab
to
8d247ed
Compare
ghost
requested a review
from Akm0d
August 26, 2019 07:12
cbosdo
force-pushed
the
neon-silence-virt-vol_info
branch
from
October 30, 2019 15:20
fad38da
to
8baa140
Compare
Rebased on master + PR #55165 |
cbosdo
force-pushed
the
neon-silence-virt-vol_info
branch
from
November 5, 2019 09:41
8baa140
to
6f4ae18
Compare
Expose informations of the libvirt storage volumes, either for one or all the volumes. Among the provided data, this function exposes the names of the virtual machines using the volumes of file type.
All users to remove a libvirt storage volume.
It may happen on pools that have not refresh for a long time that the volume list is not matching reality. Then when calling the info() or XMLDesc() functions libvirt errors out. virt.volume_info() now handles this case.
Since the pool and volume parameters can be None, make them optional and default to None.
Even though the volume_infos handles the libvirt exception when a volume is missing, libvirt was still outputting the error message in the log. Since this can add noise to the log only record the libvirt error message in debug level.
cbosdo
force-pushed
the
neon-silence-virt-vol_info
branch
from
December 6, 2019 08:46
6f4ae18
to
b1e0073
Compare
Closing since this has been merged in PR #55165 with the other |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Even though the
volume_infos
handles the libvirt exception when a volumeis missing, libvirt was still outputting the error message in the log.
Since this can add noise to the log discard the libvirt error message
too.
What issues does this PR fix or reference?
None
Previous Behavior
Calling
virt.volume_infos
on a minion where an disk image has been removed from a storage pool is outputting errors like this one in the log for each missing image:Note that this happens until the pool is refreshed for every volume_infos call.
New Behavior
The error is no longer in the log.
Tests written?
No
Can't be tested without a running libvirt and hypervisor.
Commits signed with GPG?
Yes