Make salt.states.virt consistent with salt.modules.virt and add virt.reset #67302
Replies: 2 comments
-
|
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the report. so. state modules always differ greatly from the execution modules, by design. they are not meant to be one to one comparisons. states are meant to be a description of how the thing should be. it uses the execution modules to get to that state. reset and reboot are actions taken, not states. they should be handled by a mod_watch function. take the service state as an example of how this should be. there is no service state function for restart or reload. there is a mod_watch that gets triggered when watched states happen. that triggers a restart or reload. So there is work to be done. the documentation being one piece, that definitely needs updated. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
salt.states.virthas inconsistencies making it difficult to appropriately interface with libvirt. Within libvirt one can perform both a soft and hard shutdown or reboot/reset of a guest domain. The modulesalt.modules.virtfunctions seem to appropriately reflect these features, but the statesalt.states.virtfunctions are inconsistent and intermingle terminology. Documentation is also inconsistent as well adding more confusion.Below is a mapping showing some basic inconsistencies:
shutdownsalt.modules.virt.shutdownsalt.states.virt.stoppeddestroysalt.modules.virt.stopsalt.states.virt.powered_offrebootsalt.modules.virt.rebootsalt.states.virt.rebootedresetsalt.modules.virt.resetIt's inconsistency makes it difficult to anticipate what command will be sent to libvirt. It's so difficult that even the documentation for
salt.states.virt.powered_offshows the wrong example in the SLS YAML and listsvirt.stoppedhttps://docs.saltproject.io/en/latest/ref/states/all/salt.states.virt.html#salt.states.virt.powered_offIt would be easy to add the missing
salt.states.virt.resetfunction, but ideally this entire state would be revamped to be consistent with the module. Also, the documentation should be fixed to reflect the right command.Beta Was this translation helpful? Give feedback.
All reactions