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

Virt pool build fix #57374

Merged
merged 3 commits into from
May 20, 2020
Merged

Virt pool build fix #57374

merged 3 commits into from
May 20, 2020

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented May 19, 2020

What does this PR do?

This PR fixes several tiny problems related to virt storage pool functions:

  • Don't fail virt.pool_defined and virt.pool_update if a pool build fails. Also don't build a pool if the pool type knowingly doesn't support that function
  • Handle mistakenly delete pool secrets in virt.update to avoid failure
  • Don't remove the pool secret in virt.pool_delete() but in virt.pool_undefine()

What issues does this PR fix or reference?

Fixes: issue #56454

Merge requirements satisfied?

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

Commits signed with GPG?

Yes

@cbosdo cbosdo requested a review from a team as a code owner May 19, 2020 09:55
@ghost ghost requested review from cmcmarrow and removed request for a team May 19, 2020 09:55
@cbosdo
Copy link
Contributor Author

cbosdo commented May 19, 2020

@cmcmarrow @waynew could you please restart the two failed tests? the errors seem unrelated to the PR

Got confused between pool_delete and pool_undefine. Delete only deletes
the data and is not implemented for remote volume pools like iSCSI or
RBD... the secret needs to be removed when removing the libvirt
definition of the pool instead.
@cbosdo
Copy link
Contributor Author

cbosdo commented May 20, 2020

rebased on latest master

@cbosdo
Copy link
Contributor Author

cbosdo commented May 20, 2020

all green 💚

Some libvirt storage pools backends don't implement the build function.
In thoses cases the virt.pool_defined and virt.pool_running states must
not run the virt.pool_build() function.

There are also cases where build only works once. For example when
creating a LVM VG or a disk partition pool, if the VG or partition is
already present build will fail.

Fixes issue saltstack#56454
When updating a storage pool needing a secret don't fail if the secret
is missing in libvirt: user may have mistakenly killed it. Instead
create a new secret and log and information in the log.
@dwoz dwoz merged commit 0b75496 into saltstack:master May 20, 2020
@sagetherage sagetherage added the ZRelease-Sodium retired label label May 20, 2020
@sagetherage sagetherage added this to In progress in Sodium via automation May 20, 2020
@sagetherage sagetherage moved this from In progress to Done in Sodium May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZRelease-Sodium retired label
Projects
No open projects
Sodium
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants