Skip to content
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

Bug - infra.osbuild.export_compose no space left on device #395

Open
Thulium-Drake opened this issue Jul 3, 2024 · 0 comments
Open

Bug - infra.osbuild.export_compose no space left on device #395

Thulium-Drake opened this issue Jul 3, 2024 · 0 comments

Comments

@Thulium-Drake
Copy link

Hi there,

I'm running into an issue when downloading an image with the export_compose module:

The task:

---
- name: 'Download result'
  hosts: 'edge_image_builder'
  tasks:
    - name: 'Download result'
      infra.osbuild.export_compose:
        compose_id: 84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187
        dest: /var/cache/edge_result/84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187.tar

When running the task above, I see the following error:

TASK [Download result] ***************************************************************************************************
fatal: [m-a15-01.rh.lab]: FAILED! => changed=false 
  msg: Failure downloading http://localhost/api/v1/compose/image/84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187, [Errno 28] No space left on device

However, when running this 'by hand':

[root@m-a15-01 edge_result]# composer-cli compose image 84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187
84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187-commit.tar
[root@m-a15-01 edge_result]# ls -alh
total 2.4G
drwx------.  2 root root   61 Jul  3 18:53 .
drwxr-xr-x. 16 root root 4.0K Jul  3 17:21 ..
-rw-------.  1 root root 2.4G Jul  3 18:53 84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187-commit.tar

I even made /tmp and /var/tmp bigger (in case the module wants to stash it there, there's plenty room everywhere:

[root@m-a15-01 edge_result]# df -h /var/tmp /var /tmp
Filesystem                Size  Used Avail Use% Mounted on
/dev/mapper/rhel-var_tmp   12G  120M   12G   1% /var/tmp
/dev/mapper/rhel-var      110G   22G   89G  20% /var
/dev/mapper/rhel-tmp       12G  120M   12G   1% /tmp

What's going on?

The traceback:

TASK [Download result] ***************************************************************************************************
task path: /home/ansible/projects/rhlab/playbooks/.73190.edge_test_blueprints.yml:5
<m-a15-01.rh.lab> ESTABLISH SSH CONNECTION FOR USER: ansible
<m-a15-01.rh.lab> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/ansible/.ansible/cp/aa78398323"' m-a15-01.rh.lab '/bin/sh -c '"'"'echo ~ansible && sleep 0'"'"''
<m-a15-01.rh.lab> (0, b'/home/ansible\n', b'')
<m-a15-01.rh.lab> ESTABLISH SSH CONNECTION FOR USER: ansible
<m-a15-01.rh.lab> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/ansible/.ansible/cp/aa78398323"' m-a15-01.rh.lab '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352 `" && echo ansible-tmp-1720025541.1307213-73206-214073774428352="` echo /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352 `" ) && sleep 0'"'"''
<m-a15-01.rh.lab> (0, b'ansible-tmp-1720025541.1307213-73206-214073774428352=/home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352\n', b'')
Using module file /home/ansible/projects/rhlab/collections/ansible_collections/infra/osbuild/plugins/modules/export_compose.py
<m-a15-01.rh.lab> PUT /home/ansible/.ansible/tmp/ansible-local-73197xflk251n/tmp7nqy944h TO /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352/AnsiballZ_export_compose.py
<m-a15-01.rh.lab> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/ansible/.ansible/cp/aa78398323"' '[m-a15-01.rh.lab]'
<m-a15-01.rh.lab> (0, b'sftp> put /home/ansible/.ansible/tmp/ansible-local-73197xflk251n/tmp7nqy944h /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352/AnsiballZ_export_compose.py\n', b'')
<m-a15-01.rh.lab> ESTABLISH SSH CONNECTION FOR USER: ansible
<m-a15-01.rh.lab> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/ansible/.ansible/cp/aa78398323"' m-a15-01.rh.lab '/bin/sh -c '"'"'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352/ /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352/AnsiballZ_export_compose.py && sleep 0'"'"''
<m-a15-01.rh.lab> (0, b'', b'')
<m-a15-01.rh.lab> ESTABLISH SSH CONNECTION FOR USER: ansible
<m-a15-01.rh.lab> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/ansible/.ansible/cp/aa78398323"' -tt m-a15-01.rh.lab '/bin/sh -c '"'"'sudo -H -S -n  -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-ahjnzhpacfqvpbgrfwxmipujhtehysxr ; /usr/bin/python3 /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352/AnsiballZ_export_compose.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<m-a15-01.rh.lab> (1, b'\r\n{"failed": true, "msg": "Failure downloading http://localhost/api/v1/compose/image/84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187, [Errno 28] No space left on device", "exception": "  File \\"/tmp/ansible_infra.osbuild.export_compose_payload_f028mys7/ansible_infra.osbuild.export_compose_payload.zip/ansible_collections/infra/osbuild/plugins/module_utils/weldr.py\\", line 146, in fetch_file\\n    fetch_temp_file.write(data)\\n  File \\"/usr/lib64/python3.9/tempfile.py\\", line 478, in func_wrapper\\n    return func(*args, **kwargs)\\n", "invocation": {"module_args": {"compose_id": "84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187", "dest": "/var/cache/edge_result/84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187.tar"}}}\r\n', b'Shared connection to m-a15-01.rh.lab closed.\r\n')
<m-a15-01.rh.lab> Failed to connect to the host via ssh: Shared connection to m-a15-01.rh.lab closed.
<m-a15-01.rh.lab> ESTABLISH SSH CONNECTION FOR USER: ansible
<m-a15-01.rh.lab> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/ansible/.ansible/cp/aa78398323"' m-a15-01.rh.lab '/bin/sh -c '"'"'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1720025541.1307213-73206-214073774428352/ > /dev/null 2>&1 && sleep 0'"'"''
<m-a15-01.rh.lab> (0, b'', b'')
The full traceback is:
  File "/tmp/ansible_infra.osbuild.export_compose_payload_f028mys7/ansible_infra.osbuild.export_compose_payload.zip/ansible_collections/infra/osbuild/plugins/module_utils/weldr.py", line 146, in fetch_file
    fetch_temp_file.write(data)
  File "/usr/lib64/python3.9/tempfile.py", line 478, in func_wrapper
    return func(*args, **kwargs)
fatal: [m-a15-01.rh.lab]: FAILED! => changed=false 
  invocation:
    module_args:
      compose_id: 84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187
      dest: /var/cache/edge_result/84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187.tar
  msg: Failure downloading http://localhost/api/v1/compose/image/84e02a8f-3dc7-44a3-a6cf-0bdee7e0b187, [Errno 28] No space left on device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant