Skip to content

Virt disks fixes#57350

Merged
dwoz merged 6 commits intosaltstack:masterfrom
cbosdo:virt-disks-fixes
May 18, 2020
Merged

Virt disks fixes#57350
dwoz merged 6 commits intosaltstack:masterfrom
cbosdo:virt-disks-fixes

Conversation

@cbosdo
Copy link
Copy Markdown
Contributor

@cbosdo cbosdo commented May 18, 2020

What does this PR do?

Fixes miscellaneous problems related to the recent PR adding disk volume support in virt module and state.

  • Show proper URL for remote CDROMs in virt.get_disks()
  • Show libvirt pool name for rbd and gluster volumes in virt.get_disks()
  • Remove libvirt secret when removing rbd storage pool

What issues does this PR fix or reference?

Fixes: #56666

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

  • Docs
  • Changelog - Actually fixing another PR that hasn't been released yet
  • Tests written/updated

Commits signed with GPG?

Yes

cbosdo added 4 commits May 18, 2020 12:01
From the user point of view the internal RBD pool name doesn't make
sense when listing the disks of a VM. We need then to resolve it to the
libvirt pool name if possible.

Move the corresponding code from purge to get_disks.
libvirt adds the index attribute in the XML definition when there is a
backing store file for a disk. We need to elude it before comparing the
sources to avoid trying to recreate disks in such cases.
cdrom devices can't use virtio. Set the default bus to ide for cdroms.
@cbosdo cbosdo requested a review from a team as a code owner May 18, 2020 10:07
@ghost ghost requested review from twangboy and removed request for a team May 18, 2020 10:07
cbosdo added 2 commits May 18, 2020 13:59
virt._gen_xml converts the cdroms with remote URL into a network device,
but to be coherent with the user input the virt.get_disk() function
needs to reassemble the URL in thoses cases.
Some pool type require a secret for the authentication on the remote
source. Remove the secrets that were added by pool_defined but leave the
others in place.
@cbosdo cbosdo force-pushed the virt-disks-fixes branch from 140a2ea to b50a731 Compare May 18, 2020 11:59
@cbosdo
Copy link
Copy Markdown
Contributor Author

cbosdo commented May 18, 2020

@twangboy the ubuntu1604 failure seems completely unrelated to the PR, could you restart it?

Copy link
Copy Markdown
Contributor

@waynew waynew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small question, otherwise 👍

Comment thread salt/modules/virt.py
@waynew waynew added the ZRelease-Sodium retired label label May 18, 2020
@cbosdo
Copy link
Copy Markdown
Contributor Author

cbosdo commented May 18, 2020

yeah! all green 💚

@dwoz dwoz merged commit 303824b into saltstack:master May 18, 2020
@cbosdo cbosdo deleted the virt-disks-fixes branch May 19, 2020 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ZRelease-Sodium retired label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants