forked from saltstack/salt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* virt.get_xml doesn't take a domain object In some places in the virt module, the get_xml function was called with a domain object, leading to runtime errors like the following one: 'ERROR: The VM "<libvirt.virDomain object at 0x7fad04208650>" is not present' * qemu-img info needs -U flag on running VMs When getting VM disks informations on a running VM, the following error occured: The minion function caused an exception: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/salt/minion.py", line 1673, in _thread_return return_data = minion_instance.executors[fname](opts, data, func, args, kwargs) File "/usr/lib/python3.6/site-packages/salt/executors/direct_call.py", line 12, in execute return func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/salt/modules/virt.py", line 2411, in full_info 'vm_info': vm_info()} File "/usr/lib/python3.6/site-packages/salt/modules/virt.py", line 2020, in vm_info info[domain.name()] = _info(domain) File "/usr/lib/python3.6/site-packages/salt/modules/virt.py", line 2004, in _info 'disks': _get_disks(dom), File "/usr/lib/python3.6/site-packages/salt/modules/virt.py", line 465, in _get_disks output = _parse_qemu_img_info(qemu_output) File "/usr/lib/python3.6/site-packages/salt/modules/virt.py", line 287, in _parse_qemu_img_info raw_infos = salt.utils.json.loads(info) File "/usr/lib/python3.6/site-packages/salt/utils/json.py", line 92, in loads return json_module.loads(s, **kwargs) File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) This is due to the fact that qemu-img can't get infos on a disk that is already used like by a running VM. Using the qemu-img -U flag gets it running in all cases.
- Loading branch information
Showing
2 changed files
with
132 additions
and
120 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
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