Giter VIP home page Giter VIP logo

Comments (5)

sshnaidm avatar sshnaidm commented on July 1, 2024

@choeffer thanks for reporting.
I think the main problem is here:

Traceback (most recent call last):
  File "/home/fedora/.ansible/tmp/ansible-tmp-1589272265.3273017-48299-39753569833961/AnsiballZ_podman_image.py", line 102, in <module>
    _ansiballz_main()
  File "/home/fedora/.ansible/tmp/ansible-tmp-1589272265.3273017-48299-39753569833961/AnsiballZ_podman_image.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/fedora/.ansible/tmp/ansible-tmp-1589272265.3273017-48299-39753569833961/AnsiballZ_podman_image.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.cloud.podman.podman_image', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.8/runpy.py", line 206, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.8/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib64/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_podman_image_payload_yta_pzsw/ansible_podman_image_payload.zip/ansible/modules/cloud/podman/podman_image.py", line 725, in <module>
  File "/tmp/ansible_podman_image_payload_yta_pzsw/ansible_podman_image_payload.zip/ansible/modules/cloud/podman/podman_image.py", line 721, in main
  File "/tmp/ansible_podman_image_payload_yta_pzsw/ansible_podman_image_payload.zip/ansible/module_utils/basic.py", line 2071, in exit_json
  File "/tmp/ansible_podman_image_payload_yta_pzsw/ansible_podman_image_payload.zip/ansible/module_utils/basic.py", line 2065, in _return_formatted
BlockingIOError: [Errno 11] write could not complete without blocking

Like we can see the problem is happening in basic.py of ansible, not in the module itself. So you were right opening it in Ansible issues ansible/ansible#69444 :)
Secondly, you use 2.9 version which is maintained in ansible repo and it's not version from the current collection. For using collection version you need to install containers.podman collection and use it as containers.podman.podman_image:.
But finally, blocking error happens here:
https://github.com/ansible/ansible/blob/ed2a39d68e17e1b1d4c5670e1847cf448cf20f53/lib/ansible/module_utils/basic.py#L2065
print('\n%s' % self.jsonify(kwargs))
It means you're short of resources somewhere, that's why it happens sporadically I think. Please check your disk, network and overall I/O load on slaves.

from ansible-podman-collections.

choeffer avatar choeffer commented on July 1, 2024

Thanks for having a look. I have quoted you in the other issue, that the problem is in basic.py.

The OpenStack instance has:

  • RAM: 4GB
  • VCPUs: 2 VCPU
  • Storage: 40GB

Should it not be enough resources? Running htop in parallel shows CPU usage peaks, but not running out of memory.

from ansible-podman-collections.

sshnaidm avatar sshnaidm commented on July 1, 2024

Well, I don't know your environment, although BlockingIOError usually refers to fighting for I/O resources. I may be wrong, but there are might be conflicts with parallel usage of resources.

from ansible-podman-collections.

zenkuro avatar zenkuro commented on July 1, 2024

In case this issue have not being fixed yet:
It is possible to mitigate it by making asynchronous call to make container:

    - name: Make container
      shell: /home/user/cool-podman-container-making-script.sh
      async: 600
      poll: 10

from ansible-podman-collections.

jsbueno avatar jsbueno commented on July 1, 2024

I had this error in my project and documented the fix here:
https://stackoverflow.com/questions/67351928/getting-a-blockingioerror-when-printing-or-writting-to-stdout/67351929#67351929

from ansible-podman-collections.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.