You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Stefan Hajnoczi 47cc422b8a Stream image data in load_image() to avoid out-of-memory
Reading the entire tar file into memory can result in out-of-memory
conditions such as this traceback:

Traceback (most recent call last):
  File "/tmp/ansible_YELTSu/ansible_module_docker_image.py", line 486, in load_image
    self.client.load_image(image_data)
  File "/usr/local/lib/python2.7/dist-packages/docker/api/image.py", line 147, in load_image
    res = self._post(self._url("/images/load"), data=data)
  ...
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 848, in _send_output
    msg += message_body
MemoryError

Luckily docker-py's load_image(), which calls requests post(), accepts a
file-like object instead of a string.  Pass in the file object to avoid
reading the full file into memory.  This allows larger tar files to load
succesfully.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
8 years ago
.github Update the issue and pull-request templates in sync with ansible/ansible 9 years ago
cloud Stream image data in load_image() to avoid out-of-memory 8 years ago
commands command: Correct suggestion of non-existant module apt-get 9 years ago
database Removing double definition in postgresql_user module (#3714) 8 years ago
files Fix grammar in docs for fetch 'fail_on_missing' (#3872) 8 years ago
inventory Add missing GPLv3 License header 9 years ago
network Fix the six import 8 years ago
packaging apt: fix deb=file with --diff does not show diff on upgrades (#3826) 8 years ago
source_control Improve error reporting when git binary fail (#3266) 8 years ago
system Fixed Typo in Examples of systemd module (#3870) 8 years ago
test/unit/cloud/openstack add some unit tests for the os_server module 9 years ago
utilities Fix wait_for to compile on python3 (#3722) 8 years ago
web_infrastructure Port htpasswd to python3 compatible syntax (#3672) 8 years ago
windows Return reboot pending as true/false 8 years ago
.gitignore Add basic top level files. 10 years ago
.travis.yml Remove rackspace modules from travis py3 blacklist as they should now compile 8 years ago
CONTRIBUTING.md point to local issue temmplate 9 years ago
COPYING Add basic top level files. 10 years ago
README.md readme: add build state image from travis 9 years ago
VERSION Version bump for new beta 2.0.0-0.5.beta3 9 years ago
__init__.py package files 10 years ago
test-docs.sh Add testing of docs to the core repo 9 years ago
test-requirements.txt add some unit tests for the os_server module 9 years ago

README.md

Build Status

ansible-modules-core

This repo contains Ansible's most popular modules that are shipped with Ansible.

New module submissions for modules that do not yet exist should be submitted to ansible-modules-extras, rather than this repo.

Take care to submit tickets to the appropriate repo where modules are contained. The docs.ansible.com website indicates this at the bottom of each module documentation page.

Reporting bugs

Take care to submit tickets to the appropriate repo where modules are contained. The repo is mentioned at the bottom of module documentation page at docs.ansible.com.

Testing modules

Ansible module development guide contains the latest info about that.

License

As with Ansible, modules distributed with Ansible are GPLv3 licensed. User generated modules not part of this project can be of any license.

Installation

There should be no need to install this repo separately as it should be included in any Ansible install using the official documented methods.