Bug 1372018 - get_url fails with some ftp servers ( get_url generates a "Request failed" message despite that the server replies with OK)
Summary: get_url fails with some ftp servers ( get_url generates a "Request failed" me...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: ansible
Version: el6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-31 17:42 UTC by manuel wolfshant
Modified: 2016-10-21 15:53 UTC (History)
7 users (show)

Fixed In Version: ansible-2.1.2.0-1.fc25 ansible-2.1.2.0-1.fc24 ansible-2.1.2.0-1.fc23 ansible-2.1.2.0-1.el6 ansible-2.1.2.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-09 02:46:45 UTC
Type: Bug


Attachments (Terms of Use)

Description manuel wolfshant 2016-08-31 17:42:36 UTC
Description of problem:
get_url fails to retrieve files from some ftp servers

Version-Release number of selected component (if applicable):
ansible-2.1.1.0-1.el6.noarch


How reproducible:
always, with some servers ( pureftp in my case )

Steps to Reproduce:
1. create a playbook with:
      get_url: url=ftp://internal.domain.tld/linux/distributions/centos/6/custom.repo dest=/etc/yum.repos.d

2. play the playbook

Actual results:
fatal: [wolfy]: FAILED! => {"changed": false, "dest": "/etc/yum.repos.d", "failed": true, "gid": 0, "group": "root", "invocation": {"module_args": {"backup": false, "checksum": "", "content": null, "delimiter": null, "dest": "/etc/yum.repos.d", "directory_mode": null, "follow": false, "force": false, "force_basic_auth": false, "group": null, "headers": null, "http_agent": "ansible-httpget", "mode": null, "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "sha256sum": "", "src": null, "timeout": 10, "tmp_dest": "", "url": "ftp://internal.domain.tld/linux/distributions/centos/6/custom.repo", "url_password": null, "url_username": null, "use_proxy": true, "validate_certs": true}, "module_name": "get_url"}, "mode": "01777", "msg": "Request failed", "owner": "root", "response": "OK (unknown bytes)", "secontext": "system_u:object_r:tmp_t:s0", "size": 12288, "state": "directory", "status_code": null, "uid": 0, "url": "ftp://internal.domain.tld/linux/distributions/centos/6/custom.repo"}     

Expected results:
changed: [wolfy] => {"changed": true, "checksum_dest": null, "checksum_src": "7e6b25d0b8c452f8f5dea637c5ba33c78eaba7d4", "dest": "/etc/yum.repos.d/custom.repo", "gid": 0, "group": "root", "invocation": {"module_args": {"backup": false, "checksum": "", "content": null, "delimiter": null, "dest": "/etc/yum.repos.d", "directory_mode": null, "follow": false, "force": false, "force_basic_auth": false, "group": null, "headers": null, "http_agent": "ansible-httpget", "mode": null, "owner": null, "path": "/etc/yum.repos.d/custom.repo", "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "sha256sum": "", "src": null, "timeout": 10, "tmp_dest": "", "url": "ftp://internal.domain.tld/linux/distributions/centos/6/custom.repo", "url_password": null, "url_username": null, "use_proxy": true, "validate_certs": true}, "module_name": "get_url"}, "md5sum": "7267a7722304523c1e8f61d88983fe9b", "mode": "0644", "msg": "OK (unknown bytes)", "owner": "root", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 130, "src": "/tmp/tmpXS0lEc", "state": "file", "uid": 0, "url": "ftp://internal.domain.tld/linux/distributions/centos/6/custom.repo"}   

Additional info:
https://github.com/ansible/ansible-modules-core/issues/3661 is the longer description
https://github.com/afunix/ansible-modules-core/commit/0e9b99fecae0dcb59f5c1223f6e2a7096ce51d51 contains the fix ( verified on my system )

Comment 1 Kevin Fenzi 2016-09-02 23:11:05 UTC
So, I take it you would like us to carry the patch until it lands upstream? 

If the maintainer acks it we should hopefully be able to get it into 2.2 which is due out mid month last I heard...

Comment 2 manuel wolfshant 2016-09-03 09:18:09 UTC
If the new version is due to arrive "soon", patching the current one is probably a waste of time ( lack of previous bug reports make me believe that the user base of affected people is very small... and I've already patched mine ).

If the opposite is true then yes, please add the patch. And last but not least if the new upstream version does not include this fix then by all means, yes, the patch MUST be included by Fedora & EPEL as otherwise <"msg": "OK (unknown bytes)"> breaks usage of the playbooks that make use of get_url.

Comment 3 manuel wolfshant 2016-09-03 12:28:06 UTC
Forgot to mention: I'll be glad to help in any way possible, including for instance actually patching or testing any [scratch] build.

Comment 4 Kevin Fenzi 2016-09-03 16:20:57 UTC
Great, all sounds reasonable to me. I'll see what I can do to get it merged upstream before the next release. 

Perhaps Toshio (already cc'ed) could take a look?

Comment 5 Toshio Ernie Kuratomi 2016-09-08 20:05:38 UTC
Merged upstream to both the stable-2.1 branch and devel.  We're planning another rc of 2.1.2 so it should make that. (and 2.2.0 is now in feature freeze).

Comment 6 Fedora Update System 2016-09-30 20:24:33 UTC
ansible-2.1.2.0-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e256af79eb

Comment 7 Fedora Update System 2016-10-01 04:49:34 UTC
ansible-2.1.2.0-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-aa11ff7124

Comment 8 Fedora Update System 2016-10-01 05:26:57 UTC
ansible-2.1.2.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-678b448d7a

Comment 9 Fedora Update System 2016-10-01 05:28:02 UTC
ansible-2.1.2.0-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8adffef502

Comment 10 Fedora Update System 2016-10-01 05:49:35 UTC
ansible-2.1.2.0-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b01a9377cb

Comment 11 Fedora Update System 2016-10-09 02:46:45 UTC
ansible-2.1.2.0-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2016-10-09 06:21:01 UTC
ansible-2.1.2.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-10-09 09:22:23 UTC
ansible-2.1.2.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-10-15 17:16:51 UTC
ansible-2.1.2.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-10-21 15:53:22 UTC
ansible-2.1.2.0-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.