Conversation
|
@rallytime could you have a look at this PR? Not sure if it's still OK for 2019.2.1 |
|
Does this also fix the virt.stopped state? I've tested with two paused VMs, and the result should have been that they are stopped. But I get a result "False" with comment "No changes had happened" and Changes details that have an issue "Requested operation is not valid: domain is not running". Completely bogus and not idempotent at all. :-( |
|
Same result if the VMs are fully stopped. This should just report green (nothing to do). |
|
@joesusecom no that one is not fixed. I'll need to go over all the existing virt states to fix that and add support for the test parameter. |
39f1cdf to
769685c
Compare
Fixed in this PR now. The test parameter is not yet handled though. |
769685c to
bb46ac6
Compare
|
Strange, there are a number of failing tests that aren't related to the PR. |
92a7155 to
9fb451e
Compare
9fb451e to
cbd149a
Compare
virt.network_running state calls virt.network_define with vport as a positional argument resulting in an error at runtime. Fix the state to use the vport named argument instead.
virt.pool_running needs the source to be a dictionary, which the documentation was not reflecting. Along the same lines the source hosts need to be a list, adjust the example to show it.
Commit 25b9681 is wrong in assuming the pool build also starts it. The pool needs to be stopped before building it, but we still need to start it after the build: libvirt won't do it automagically for us.
virt.network_infos and virt.pool_infos return the infos as a dictionary with the network or pool name as a key even when there is only one value. Adapt the network_running and pool_running states to this.
vm_state return a dictionary with the VM name as a key. Fix virt.running state and its tests to match this. See issue saltstack#53107.
The virt.stopped and virt.powered_off states need to do nothing and not fail if one of the targeted VMs is already in shutdown state.
cbd149a to
991ef2c
Compare
What does this PR do?
Fixes a number of tiny annoying issues preventing the
virt.pool_runningandvirt.network_runningstates to be used.Also fixes idempotency of
virt.runningstate.What issues does this PR fix or reference?
One of the commits fixes issue #53107.
I was too lazy to write an issue for each of the other issues I fixed. Hopefully the commits messages are helpful enough to explain those.
Tests written?
Yes
Commits signed with GPG?
Yes