You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hmm, reinstalling it won't hurt since I just installed it this week.
ansible-galaxy collection install -v -f community.libvirt
Using /home/svc.ansible/.ansible.cfg as config file
Process install dependency map
Starting collection install process
Installing 'community.libvirt:1.2.0' to '/home/svc.ansible/.ansible/collections/ansible_collections/community/libvirt'
Ansible controller: Oracle Linux Server 8.6
Target: CentOS 7.9.2009 (fully patched two days ago)
centos-release-qemu-ev-1.0-4.el7.centos.noarch
libvirt-daemon-driver-qemu-4.5.0-36.el7_9.5.x86_64
qemu-guest-agent-2.12.0-3.el7.x86_64
qemu-img-ev-2.12.0-44.1.el7_8.1.x86_64
qemu-kvm-common-ev-2.12.0-44.1.el7_8.1.x86_64
qemu-kvm-ev-2.12.0-44.1.el7_8.1.x86_64
STEPS TO REPRODUCE
Add to .ansible.cfg
[inventory]
enable_plugins = host_list, script, yaml, ini, toml, community.libvirt.libvirt, auto
cache=True
cache_plugin=yaml
running with ansible-playbook -i svc/inventory.yaml svc/do-something-with-libvirt-inventory.yaml
following is svc/inventory.yaml
---
# Connect to qemu
plugin: community.libvirt.libvirt
uri: "qemu+ssh://[email protected]/system"
inventory_hostname: name
following is svc/do-something-with-libvirt-inventory.yaml
---
- name: do something with community.libvirt plugin
hosts: all
become: true
tasks:
- name: RedHat systems
when: ansible_os_family == "RedHat"
block:
- name: update
ansible.builtin.yum:
name: '*'
state: latest
register: update
notify: "reboot"
EXPECTED RESULTS
Current output is too verbose. Handle these (down vm) errors more quietly. i.e. Errors about a shutdown VM should not be displayed, because we know they are down and that's ok.
I'm not sure if the 418 errors below are due to the domain being down, or do to the UUIDs in the inventory.
ACTUAL RESULTS
The Tasks run fine on the VMs that are up.
without extra verbose -vvvv
libvirt: XML-RPC error : unknown procedure: 418
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: XML-RPC error : unknown procedure: 418
libvirt: XML-RPC error : unknown procedure: 418
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: XML-RPC error : unknown procedure: 418
libvirt: Domain Config error : Requested operation is not valid: domain is not running
PLAY [do something with community.libvirt plugin] *********************************************************************************************
TASK [Gathering Facts]
*********************************************************************************************
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost1]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost2]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost3]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
libvirt: Domain Config error : Requested operation is not valid: domain is not running
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost4]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost5]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
libvirt: Domain Config error : Requested operation is not valid: domain is not running
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost6]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
libvirt: Domain Config error : Requested operation is not valid: domain is not running
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost7]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
TASK [yum]
*********************************************************************************************
ok: [upvm1]
ok: [upvm2]
ok: [upvm3]
interesting bits with -vvvv
Not replacing invalid character(s) "{'6', '-'}" in group name (670808f6-b7ca-490f-8767-f74fb8b5d7ff)
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
libvirt: XML-RPC error : unknown procedure: 418
Not replacing invalid character(s) "{'-'}" in group name (a4795992-2541-4201-897f-2e2ed7645d06)
and this gets repeated for each shutdown vm, likely part of FIND DOMAIN
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 147, in run
res = self._execute()
File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 665, in _execute
result = self._handler.run(task_vars=variables)
File "/usr/lib/python3.6/site-packages/ansible/plugins/action/gather_facts.py", line 79, in run
res = self._execute_module(module_name=fact_module, module_args=mod_args, task_vars=task_vars, wrap_async=False)
File "/usr/lib/python3.6/site-packages/ansible/plugins/action/__init__.py", line 790, in _execute_module
self._make_tmp_path()
File "/usr/lib/python3.6/site-packages/ansible/plugins/action/__init__.py", line 353, in _make_tmp_path
tmpdir = self._remote_expand_user(self.get_shell_option('remote_tmp', default='~/.ansible/tmp'), sudoable=False)
File "/usr/lib/python3.6/site-packages/ansible/plugins/action/__init__.py", line 674, in _remote_expand_user
data = self._low_level_execute_command(cmd, sudoable=False)
File "/usr/lib/python3.6/site-packages/ansible/plugins/action/__init__.py", line 1085, in _low_level_execute_command
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/home/svc.ansible/.ansible/collections/ansible_collections/community/libvirt/plugins/connection/libvirt_qemu.py", line 151, in exec_command
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/lib/python3.6/site-packages/ansible/plugins/connection/__init__.py", line 34, in wrapped
self._connect()
File "/home/svc.ansible/.ansible/collections/ansible_collections/community/libvirt/plugins/connection/libvirt_qemu.py", line 135, in _connect
response_cap = json.loads(libvirt_qemu.qemuAgentCommand(self.domain, request_cap, 5, 0))
File "/usr/lib64/python3.6/site-packages/libvirt_qemu.py", line 78, in qemuAgentCommand
raise libvirt.libvirtError('virDomainQemuAgentCommand() failed')
libvirt.libvirtError: Requested operation is not valid: domain is not running
fatal: [downhost1]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
The text was updated successfully, but these errors were encountered:
SUMMARY
Output of community.libvirt plugin is too noisy when it encounters guest machines that are shutdown
ISSUE TYPE
COMPONENT NAME
connection/libvirt_qemu.py
ANSIBLE VERSION
COLLECTION VERSION
hmm, reinstalling it won't hurt since I just installed it this week.
CONFIGURATION
OS / ENVIRONMENT
Ansible controller: Oracle Linux Server 8.6
Target: CentOS 7.9.2009 (fully patched two days ago)
centos-release-qemu-ev-1.0-4.el7.centos.noarch
libvirt-daemon-driver-qemu-4.5.0-36.el7_9.5.x86_64
qemu-guest-agent-2.12.0-3.el7.x86_64
qemu-img-ev-2.12.0-44.1.el7_8.1.x86_64
qemu-kvm-common-ev-2.12.0-44.1.el7_8.1.x86_64
qemu-kvm-ev-2.12.0-44.1.el7_8.1.x86_64
STEPS TO REPRODUCE
Add to .ansible.cfg
running with
ansible-playbook -i svc/inventory.yaml svc/do-something-with-libvirt-inventory.yaml
following is
svc/inventory.yaml
following is
svc/do-something-with-libvirt-inventory.yaml
EXPECTED RESULTS
Current output is too verbose. Handle these (down vm) errors more quietly. i.e. Errors about a shutdown VM should not be displayed, because we know they are down and that's ok.
I'm not sure if the
418
errors below are due to the domain being down, or do to the UUIDs in the inventory.ACTUAL RESULTS
The Tasks run fine on the VMs that are up.
without extra verbose -vvvv
interesting bits with -vvvv
and this gets repeated for each shutdown vm, likely part of FIND DOMAIN
The text was updated successfully, but these errors were encountered: