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
I have two very similar VMs and for one VM the ansible connects normally, but for another raising the following error. The traceback is not helpful to me.
The command and output is the following:
ansible-playbook --extra-vars='repo_root=/var/tmp/tmt/run-070/plans/integration/inhibit-if-kmods-is-not-supported/vm_oracle8/good/discover/default/tests' -c community.libvirt.libvirt_qemu -i c2r_oracle8_template-clone, /home/azhukov/Documents/convert2rhel/tests/ansible_collections/basic_setup.yml -vvv
ansible-playbook 2.10.7
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/azhukov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/azhukov/.pyenv/versions/3.9.1/lib/python3.9/site-packages/ansible
executable location = /home/azhukov/.pyenv/versions/3.9.1/bin/ansible-playbook
python version = 3.9.1 (default, Jan 14 2021, 15:48:15) [GCC 10.2.0]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed c2r_oracle8_template-clone, inventory source with host_list plugin
Loading callback plugin default of type stdout, v2.0 from /home/azhukov/.pyenv/versions/3.9.1/lib/python3.9/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: basic_setup.yml ******************************************************
Positional arguments: /home/azhukov/Documents/convert2rhel/tests/ansible_collections/basic_setup.yml
verbosity: 4
connection: community.libvirt.libvirt_qemu
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('c2r_oracle8_template-clone,',)
extra_vars: ('repo_root=/var/tmp/tmt/run-070/plans/integration/inhibit-if-kmods-is-not-supported/vm_oracle8/good/discover/default/tests',)
forks: 5
1 plays in /home/azhukov/Documents/convert2rhel/tests/ansible_collections/basic_setup.yml
PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
task path: /home/azhukov/Documents/convert2rhel/tests/ansible_collections/basic_setup.yml:1
Loading collection community.libvirt from /home/azhukov/.pyenv/versions/3.9.1/lib/python3.9/site-packages/ansible_collections/community/libvirt
<c2r_oracle8_template-clone> CONNECT TO qemu:///system
<c2r_oracle8_template-clone> FIND DOMAIN c2r_oracle8_template-clone
<c2r_oracle8_template-clone> ESTABLISH community.libvirt.libvirt_qemu CONNECTION
<c2r_oracle8_template-clone> EXEC /bin/sh -c 'echo ~ && sleep 0'<c2r_oracle8_template-clone> GA send: {"execute": "guest-exec", "arguments": {"path": "/bin/sh", "capture-output": true, "arg": ["-c", "echo ~ && sleep 0"]}}
<c2r_oracle8_template-clone> GA return: {'return': {'pid': 1007}}
<c2r_oracle8_template-clone> GA send: {"execute": "guest-exec-status", "arguments": {"pid": 1007}}
<c2r_oracle8_template-clone> GA return: {'return': {'exited': False}}
<c2r_oracle8_template-clone> GA return: {'return': {'exitcode': 0, 'out-data': 'L3Jvb3QK', 'exited': True}}
<c2r_oracle8_template-clone> GA stdout: /root
<c2r_oracle8_template-clone> GA stderr:
<c2r_oracle8_template-clone> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1617899822.4112039-61006-63082701834685 `" && echo ansible-tmp-1617899822.4112039-61006-63082701834685="` echo /root/.ansible/tmp/ansible-tmp-1617899822.4112039-61006-63082701834685 `" ) && sleep 0'<c2r_oracle8_template-clone> GA send: {"execute": "guest-exec", "arguments": {"path": "/bin/sh", "capture-output": true, "arg": ["-c", "( umask 77 && mkdir -p \"`echo /root/.ansible/tmp `\"&& mkdir \"`echo /root/.ansible/tmp/ansible-tmp-1617899822.4112039-61006-63082701834685 `\" && echo ansible-tmp-1617899822.4112039-61006-63082701834685=\"`echo /root/.ansible/tmp/ansible-tmp-1617899822.4112039-61006-63082701834685 `\" ) && sleep 0"]}}
<c2r_oracle8_template-clone> GA return: {'return': {'pid': 1008}}
<c2r_oracle8_template-clone> GA send: {"execute": "guest-exec-status", "arguments": {"pid": 1008}}
<c2r_oracle8_template-clone> GA return: {'return': {'exited': False}}
<c2r_oracle8_template-clone> GA return: {'return': {'exitcode': 1, 'err-data': 'bWtkaXI6IGNhbm5vdCBjcmVhdGUgZGlyZWN0b3J5IOKAmC9yb290Ly5hbnNpYmxl4oCZOiBQZXJtaXNzaW9uIGRlbmllZAo=', 'exited': True}}
<c2r_oracle8_template-clone> GA stdout:
<c2r_oracle8_template-clone> GA stderr: mkdir: cannot create directory ‘/root/.ansible’: Permission denied
fatal: [c2r_oracle8_template-clone]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"`echo /root/.ansible/tmp `\"&& mkdir \"`echo /root/.ansible/tmp/ansible-tmp-1617899822.4112039-61006-63082701834685 `\" && echo ansible-tmp-1617899822.4112039-61006-63082701834685=\"`echo /root/.ansible/tmp/ansible-tmp-1617899822.4112039-61006-63082701834685 `\" ), exited with result 1, stderr output: mkdir: cannot create directory ‘/root/.ansible’: Permission denied\n",
"unreachable": true
}
PLAY RECAP *********************************************************************
c2r_oracle8_template-clone : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
I see from the systemctl status qemu-guest-agent, that the command was called:
What else needs to be checked? Thanks for any hint
zhukovgreen
changed the title
Maybe a bug: Failed to create temporary directory
Not clear failure descritpion: Failed to create temporary directory
Apr 11, 2021
SUMMARY
I have two very similar VMs and for one VM the ansible connects normally, but for another raising the following error. The traceback is not helpful to me.
The command and output is the following:
I see from the systemctl status qemu-guest-agent, that the command was called:
I also ensured, that in qemu-ga config I have commented the following line:
Also the machine has in its configuration:
ISSUE TYPE
COMPONENT NAME
libvirt-qemu
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
kvm VM, using ansible libvirt plugin to connect
STEPS TO REPRODUCE
EXPECTED RESULTS
In another machine, it works, but I can't find the difference with the faulty one
ACTUAL RESULTS
Already provided
The text was updated successfully, but these errors were encountered: