{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16391","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16391/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16391/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16391/events","html_url":"https://github.com/ansible/ansible/issues/16391","id":161589208,"number":16391,"title":"Got MemoryError when copy huge local file to remote","user":{"login":"nyasukun","id":1095798,"avatar_url":"https://avatars.githubusercontent.com/u/1095798?v=3","gravatar_id":"","url":"https://api.github.com/users/nyasukun","html_url":"https://github.com/nyasukun","followers_url":"https://api.github.com/users/nyasukun/followers","following_url":"https://api.github.com/users/nyasukun/following{/other_user}","gists_url":"https://api.github.com/users/nyasukun/gists{/gist_id}","starred_url":"https://api.github.com/users/nyasukun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyasukun/subscriptions","organizations_url":"https://api.github.com/users/nyasukun/orgs","repos_url":"https://api.github.com/users/nyasukun/repos","events_url":"https://api.github.com/users/nyasukun/events{/privacy}","received_events_url":"https://api.github.com/users/nyasukun/received_events","type":"User","site_admin":false},"labels":[{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":87036843,"url":"https://api.github.com/repos/ansible/ansible/labels/P2","name":"P2","color":"fad8c7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-22T04:00:32Z","updated_at":"2016-11-04T17:33:43Z","closed_at":"2016-07-22T13:06:06Z","body":"<!--- Verify first that your issue/request is not already reported in GitHub -->\n##### ISSUE TYPE\n\n<!--- Pick one below and delete the rest: -->\n- Bug Report\n##### ANSIBLE VERSION\n\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\n\n```\nansible 2.1.0.0\n  config file = /etc/ansible/ansible.cfg\n  configured module search path = Default w/o overrides\n```\n##### CONFIGURATION\n\n<!---\nMention any settings you have changed/added/removed in ansible.cfg\n(or using the ANSIBLE_* environment variables).\n-->\n##### OS / ENVIRONMENT\n\n<!---\nMention the OS you are running Ansible from, and the OS you are\nmanaging, or say “N/A” for anything that is not platform-specific.\n-->\n\nUbuntu 14.04.4 LTS\n##### SUMMARY\n\n<!--- Explain the problem briefly -->\n\nGot MemoryError when copy huge local file to remote.\n##### STEPS TO REPRODUCE\n\n<!---\nFor bugs, show exactly how to reproduce the problem.\nFor new features, show how the feature would be used.\n-->\n\n<!--- Paste example playbooks or commands between quotes below -->\n\n```\n$ cat huge_copy.yml \n---\n- hosts: all\n  become: yes\n\n  tasks:\n    - name: Copy huge file\n      copy: src=5gb dest=dst\n\n$ dd if=/dev/zero of=5gb bs=1G count=5\n5+0 records in\n5+0 records out\n5368709120 bytes (5.4 GB) copied, 206.341 s, 26.0 MB/s\n\n$ ansible-playbook -i hosts huge_copy.yml\n```\n\n<!--- You can also paste gist.github.com links for larger files -->\n##### EXPECTED RESULTS\n\n<!--- What did you expect to happen when running the steps above? -->\n\nCopied successfully.\n##### ACTUAL RESULTS\n\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\n\n<!--- Paste verbatim command output between quotes below -->\n\n```\n$ ansible-playbook -i hosts huge_copy.yml -vvv\nUsing /etc/ansible/ansible.cfg as config file\n\nPLAYBOOK: huge_copy.yml ********************************************************\n1 plays in huge_copy.yml\n\nPLAY [all] *********************************************************************\n\nTASK [setup] *******************************************************************\n<192.168.80.129> ESTABLISH SSH CONNECTION FOR USER: ansible\n<192.168.80.129> SSH: EXEC ssh -C -q -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/y/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.80.129 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1466567672.43-71840509019686 `\" && echo ansible-tmp-1466567672.43-71840509019686=\"` echo $HOME/.ansible/tmp/ansible-tmp-1466567672.43-71840509019686 `\" ) && sleep 0'\"'\"''\n<192.168.80.129> PUT /tmp/tmp3Bk56k TO /home/ansible/.ansible/tmp/ansible-tmp-1466567672.43-71840509019686/setup\n<192.168.80.129> 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/y/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.80.129]'\n<192.168.80.129> ESTABLISH SSH CONNECTION FOR USER: ansible\n<192.168.80.129> SSH: EXEC ssh -C -q -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/y/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.80.129 '/bin/sh -c '\"'\"'sudo -H -S -n -u root /bin/sh -c '\"'\"'\"'\"'\"'\"'\"'\"'echo BECOME-SUCCESS-rmwgnaejatjdbjwnltokljxsdjjlhagx; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1466567672.43-71840509019686/setup; rm -rf \"/home/ansible/.ansible/tmp/ansible-tmp-1466567672.43-71840509019686/\" > /dev/null 2>&1'\"'\"'\"'\"'\"'\"'\"'\"' && sleep 0'\"'\"''\nok: [192.168.80.129]\n\nTASK [Copy huge file] **********************************************************\ntask path: /home/y/nfvdv4-single/huge_copy.yml:6\nAn exception occurred during task execution. The full traceback is:\nTraceback (most recent call last):\n  File \"/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py\", line 124, in run\n    res = self._execute()\n  File \"/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py\", line 446, in _execute\n    result = self._handler.run(task_vars=variables)\n  File \"/usr/lib/python2.7/dist-packages/ansible/plugins/action/copy.py\", line 156, in run\n    source_full = self._loader.get_real_file(source_full)\n  File \"/usr/lib/python2.7/dist-packages/ansible/parsing/dataloader.py\", line 334, in get_real_file\n    data = f.read()\nMemoryError\n\nfatal: [192.168.80.129]: FAILED! => {\"failed\": true, \"msg\": \"Unexpected failure during module execution.\", \"stdout\": \"\"}\n\nNO MORE HOSTS LEFT *************************************************************\n    to retry, use: --limit @huge_copy.retry\n\nPLAY RECAP *********************************************************************\n192.168.80.129             : ok=1    changed=0    unreachable=0    failed=1  \n```\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/258497462","html_url":"https://github.com/ansible/ansible/issues/16391#issuecomment-258497462","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16391","id":258497462,"user":{"login":"ak5","id":3480383,"avatar_url":"https://avatars.githubusercontent.com/u/3480383?v=3","gravatar_id":"","url":"https://api.github.com/users/ak5","html_url":"https://github.com/ak5","followers_url":"https://api.github.com/users/ak5/followers","following_url":"https://api.github.com/users/ak5/following{/other_user}","gists_url":"https://api.github.com/users/ak5/gists{/gist_id}","starred_url":"https://api.github.com/users/ak5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ak5/subscriptions","organizations_url":"https://api.github.com/users/ak5/orgs","repos_url":"https://api.github.com/users/ak5/repos","events_url":"https://api.github.com/users/ak5/events{/privacy}","received_events_url":"https://api.github.com/users/ak5/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T17:33:43Z","updated_at":"2016-11-04T17:33:43Z","body":"I am running into this for the first time *after* upgrading to 2.2 via ubuntu ppa :(\r\n\r\nI am trying to copy a saved docker image compressed with bz2 to a remote host in a role included in a playbook.\r\n\r\n```\r\nAn exception occurred during task execution. The full traceback is:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py\", line 119, in run\r\n    res = self._execute()\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py\", line 490, in _execute\r\n    result = self._handler.run(task_vars=variables)\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/plugins/action/copy.py\", line 153, in run\r\n    source_full = self._loader.get_real_file(source_full)\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/parsing/dataloader.py\", line 402, in get_real_file\r\n    if is_encrypted_file(f):\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py\", line 150, in is_encrypted_file\r\n    vaulttext = file_obj.read(count)\r\nMemoryError\r\n\r\nfatal: [128.199.197.52]: FAILED! => {\r\n    \"failed\": true, \r\n    \"msg\": \"Unexpected failure during module execution.\", \r\n    \"stdout\": \"\"\r\n}\r\n\r\n```"}}
{"actor":{"display_login":"ak5"}}