-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: InvocationError for command; xattr or inventory #116
Comments
Because we try to cache the qcow2 images, rather than either 1) downloading an 8GB image every time or 2) never downloading them again, and instead relying on you to know when to download a new one. We don't have a good place to store the cache metadata, so we use xattrs for that.
The first step is to file the issue here which you have done - thanks! Looks like
Also, you are missing the python fmf library:
I'm assuming Rocky 9 is compatible with EL9, so you could try using EPEL9 to get fmf https://docs.fedoraproject.org/en-US/epel/ - then Do you have any local persistent storage? Perhaps If you have no good place to use as a cache, then I guess you could download the qcow image file to some location, and use the
I apologize - almost all of the system roles developers use a Fedora or similar laptop as a development environment, and use ~/.cache/linux-system-roles as the cache which assumes /home is a local "regular" file system, etc. So it will be good to get these differences into the developer docs. |
No need to apologize! I am glad you help. In my case, $ getfattr /tmp/centos-7.qcow2c
getfattr: Removing leading '/' from absolute path names
# file: tmp/centos-7.qcow2c
user.dublincore.date
user.xdg.origin.url
$ attr -l /tmp/centos-7.qcow2c
Attribute "selinux" has a 36 byte value for /tmp/centos-7.qcow2c
Attribute "xdg.origin.url" has a 81 byte value for /tmp/centos-7.qcow2c
Attribute "dublincore.date" has a 29 byte value for /tmp/centos-7.qcow2c In that sense I would say that I installed In any case, I still ran into $ tox -e qemu-ansible-core-2.14 -- --image-name centos-7 tests/tests_match.yml
qemu-ansible-core-2.14 recreate: /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14
qemu-ansible-core-2.14 installdeps: productmd, PyYAML, ruamel.yaml, beautifulsoup4, ansible-core==2.14.*
qemu-ansible-core-2.14 installed: ansible-core==2.14.5,beautifulsoup4==4.12.2,cffi==1.15.1,cryptography==40.0.2,Jinja2==3.1.2,MarkupSafe==2.1.2,packaging==23.1,productmd==1.35,pycparser==2.21,PyYAML==6.0,resolvelib==0.8.1,ruamel.yaml==0.17.21,six==1.16.0,soupsieve==2.4.1
qemu-ansible-core-2.14 run-test-pre: PYTHONHASHSEED='2890108930'
qemu-ansible-core-2.14 run-test: commands[0] | python /network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py --image-name centos-7 tests/tests_match.yml
ansible-playbook [core 2.14.5]
config file = None
configured module search path = ['/network/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/lib/python3.11/site-packages/ansible
ansible collection location = /network/user/src/ansible-dev/ssh/.tox
executable location = /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/bin/ansible-playbook
python version = 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0] (/network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/bin/python)
jinja version = 3.1.2
libyaml = True
No config file found; using defaults
[WARNING]: * Failed to parse /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2 with script plugin: Inventory script
(/network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2) had an execution error: Traceback (most recent call last): File
"/network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2", line 11, in <module> import fmf ModuleNotFoundError: No module named
'fmf'
[WARNING]: * Failed to parse /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2 with yaml plugin: We were unable to read either
as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML.
mapping values are not allowed in this context The error appears to be in '/network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2':
line 30, column 4, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: try: ^ here
[WARNING]: * Failed to parse /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2 with ini plugin: /network/user/src/ansible-
dev/ssh/.tox/standard-inventory-qcow2:9: Expected key=value host variable assignment, got: os
ERROR! Completely failed to parse inventory source /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2
Traceback (most recent call last):
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 1486, in <module> main()
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 1457, in main
runqemu(
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 1172, in runqemu
run_ansible_playbooks(
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 968, in run_ansible_playbooks
raise Exception("One or more tests failed")
Exception: One or more tests failed
ERROR: InvocationError for command /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/bin/python /network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py --image-name centos-7 tests/tests_match.yml (exited with code 1)
____________________________________________________________________ summary ____________________________________________________________________ERROR: qemu-ansible-core-2.14: commands failed
but note $ conda list | grep fmf
fmf 1.2.1 pypi_0 pypi and $ python
Python 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fmf
>>> so what is going on here. Note, I also tried Only after I installed the system package $ tox -e qemu-ansible-core-2.14 -- --image-name centos-7 tests/tests_match.yml
qemu-ansible-core-2.14 installed: ansible-core==2.14.5,beautifulsoup4==4.12.2,cffi==1.15.1,cryptography==40.0.2,Jinja2==3.1.2,MarkupSafe==2.1.2,packaging==23.1,productmd==1.35,pycparser==2.21,PyYAML==6.0,resolvelib==0.8.1,ruamel.yaml==0.17.21,six==1.16.0,soupsieve==2.4.1
qemu-ansible-core-2.14 run-test-pre: PYTHONHASHSEED='2738353912'
qemu-ansible-core-2.14 run-test: commands[0] | python /network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py --image-name centos-7 tests/tests_match.yml
ansible-playbook [core 2.14.5]
config file = None
configured module search path = ['/network/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/lib/python3.11/site-packages/ansible
ansible collection location = /network/user/src/ansible-dev/ssh/.tox
executable location = /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/bin/ansible-playbook
python version = 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0] (/network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/bin/python)
jinja version = 3.1.2
libyaml = True
No config file found; using defaults
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
xorriso : NOTE : Local character set is now assumed as: 'utf-8'
[ERROR] standard-inventory-qcow2: Could not access VM launched from qcow2 image: /tmp/centos-7.qcow2c
qemu exited with code 0 pid 589197
Last lines of centos-7.qcow2c.guest.log:
-----END SSH HOST KEY KEYS-----
[ 10.437341] cloud-init[1617]: Cloud-init v. 19.4 finished at Fri, 28 Apr 2023 05:30:58 +0000. Datasource DataSourceNoCloud [seed=/dev/sr0][dsmode=net]. Up 10.43 seconds
[ OK ] Started Execute cloud user/final scripts.
[ OK ] Reached target Cloud-init target.
CentOS Linux 7 (Core)
Kernel 3.10.0-1160.45.1.el7.x86_64 on an x86_64
localhost login:
Last lines of centos-7.qcow2c.qemu.log:
qemu-kvm: Machine type 'pc-i440fx-rhel7.6.0' is deprecated: machine types for previous major releases are deprecated
qemu-kvm: terminating on signal 15 from pid 589189 (/usr/bin/python3)
[WARNING]: * Failed to parse /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2 with script plugin: Inventory script
(/network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2) had an execution error:
[WARNING]: * Failed to parse /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2 with yaml plugin: We were unable to read either
as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML.
mapping values are not allowed in this context The error appears to be in '/network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2':
line 30, column 4, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: try: ^ here
[WARNING]: * Failed to parse /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2 with ini plugin: /network/user/src/ansible-
dev/ssh/.tox/standard-inventory-qcow2:9: Expected key=value host variable assignment, got: os
ERROR! Completely failed to parse inventory source /network/user/src/ansible-dev/ssh/.tox/standard-inventory-qcow2
Traceback (most recent call last):
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 1486, in <module> main()
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 1457, in main
runqemu(
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 1172, in runqemu
run_ansible_playbooks(
File "/network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py", line 968, in run_ansible_playbooks
raise Exception("One or more tests failed")
Exception: One or more tests failed
ERROR: InvocationError for command /network/user/src/ansible-dev/ssh/.tox/qemu-ansible-core-2.14/bin/python /network/user/.conda/envs/ansible-tox-lsr/lib/python3.11/site-packages/tox_lsr/test_scripts/runqemu.py --image-name centos-7 tests/tests_match.yml (exited with code 1)
____________________________________________________________________ summary ____________________________________________________________________ERROR: qemu-ansible-core-2.14: commands failed |
ok - tox-lsr has been updated to support tox 4, add fmf, and several other fixes. Not sure it will help in this situation. Take a look at the files in the Another thing - I noticed when I upgraded to fedora 37, I started to get OOM errors running qemu testing VMs. Try checking if you are hitting OOM or other system errors (I guess look at |
I did a fresh install (with tox 4) but I still get the same issue. Where should I look for |
Where you found the centos-7.qcow2c.guest.log that you reported in #116 (comment) I guess let's take a step back - can you run qemu/kvm VMs on your machine? If so, can you run any of the images we use in system roles? |
Hmm I never looked at a .guest.log everything I posted above was terminal ouptut. In any case, I can run VMs. Though only after adjusting permissions and only as root. If I start as regular (network) user I get Traceback (most recent call last):
File "/usr/bin/virt-install", line 6, in <module>
from virtinst import virtinstall
File "/usr/share/virt-manager/virtinst/__init__.py", line 60, in <module>
from virtinst.install.installer import Installer
File "/usr/share/virt-manager/virtinst/install/installer.py", line 12, in <module>
from . import unattended
File "/usr/share/virt-manager/virtinst/install/unattended.py", line 18, in <module>
from . import urlfetcher
File "/usr/share/virt-manager/virtinst/install/urlfetcher.py", line 16, in <module>
import requests
File "$HOME/.local/lib/python3.9/site-packages/requests/__init__.py", line 118, in <module>
from . import utils
File "$HOME/.local/lib/python3.9/site-packages/requests/utils.py", line 25, in <module>
from . import certs
File "$HOME/.local/lib/python3.9/site-packages/requests/certs.py", line 15, in <module>
from certifi import where
ModuleNotFoundError: No module named 'certifi' |
I just don't know - there's just too many odd things that I don't see on a Fedora system - it's beyond my ability to diagnose without having the exact environment to try to debug |
The cause is different to the one in #72.
I am running on RHEL9 (Rocky9.1) and have
tox
/tox-lsr
in a conda environment.I just downloaded the latest version of https://raw.githubusercontent.com/linux-system-roles/linux-system-roles.github.io/master/download/linux-system-roles.json.
On Filesystems mounted via Network (NFS / BeeGFS) I get the following when setting
export LSR_QEMU_CACHE=/network/user/.cache/linux-system-roles
when I set
export LSR_QEMU_CACHE=/tmp
I get
At least I get rid of the xattr error indicating that xattr are no supported on the network mounts.
Why are xattr actually required here?
I am new to
tox
and of course alsotox-lsr
. How do I fix the mentioned issue(s)?The text was updated successfully, but these errors were encountered: