Skip to content
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

Master -- pr52033 -- Volume infos fix #55165

merged 10 commits into from Dec 29, 2019

Master -- pr52033 -- Volume infos fix #55165

merged 10 commits into from Dec 29, 2019


Copy link

@cbosdo cbosdo commented Oct 30, 2019

What does this PR do?

Master port of PR #52033. Needs PR #55163 to be merged in before.

Tests written?


Commits signed with GPG?


@cbosdo cbosdo requested a review from as a code owner Oct 30, 2019
@ghost ghost requested a review from Ch3LL Oct 30, 2019
@cbosdo cbosdo mentioned this pull request Oct 30, 2019
@cbosdo cbosdo changed the title Master pr52033 Master -- pr52033 -- Volume infos fix Oct 30, 2019
Copy link
Collaborator Author

@cbosdo cbosdo commented Dec 6, 2019

Also master port of PR #51691

Copy link
Collaborator Author

@cbosdo cbosdo commented Dec 6, 2019

Also master-port of PR #52414

Copy link
Collaborator Author

@cbosdo cbosdo commented Dec 6, 2019

@dwoz pinging you on this PR since I merged a few other related ones that you were looking at.

@cbosdo cbosdo force-pushed the master-pr52033 branch 2 times, most recently from c608f04 to c3bb736 Compare Dec 23, 2019
cbosdo added 8 commits Dec 26, 2019
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.
libvirt raises an error when getting the list of volumes of a pool that
is not active. Rule out those pools from virt.volume_infos since we
still need to give infos on the other pools' volumes.
_get_domain returns a domain object when only one VM has been found.
virt.volume_infos needs to take care of it or it will fail to list the
volumes informations if the host in such a case.
virt._get_domain() throws an CommandExecutionError if there is no
virtual machine. In volume_infos() this is not an error at all since the
VMs list is only used to find out which VM uses each volume.
dwoz approved these changes Dec 29, 2019
@dwoz dwoz merged commit fd4395e into saltstack:master Dec 29, 2019
49 checks passed
@cbosdo cbosdo deleted the master-pr52033 branch Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants