-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix virt module to undefine a domain with nvram or other metadata
Libvirt function undefine() is not able to delete nvram or other metadata. Therefore it is replaced with undefineFlags() which is able to handle it by using flags. All possible flags are listed in 'ENTRY_UNDEFINE_FLAGS_MAP'. Integer 23 makes undefine successful in all cases (1 + 2 + 4 + 16). Source: https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainUndefineFlags The flags nvram(4) and keep_nvram(8) are mutually exclusive. To control the metadata handling during undefine, two new options 'force' and 'flags' are introduced including documentation and examples. Compatibility / Risk: The function undefineFlags() appeared in libvirt version 0.9.4 which was release in 2011. It seems rather unlikely that somebody is still using an older unsupported libvirt version. Additionally, if none of the new module options are provided, then it behaves as before and maintains backward compatibility, means the overall risk of this commit should be rather low. Source: https://libvirt.org/hvsupport.html#virHypervisorDriver
- Loading branch information
Showing
2 changed files
with
92 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bugfixes: | ||
- virt - fix virt module to undefine a domain with nvram, managed_save, snapshot_metadata or checkpoints_metadata (https://github.com/ansible-collections/community.libvirt/issues/40). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters