Closed Infiniverse closed 4 years ago
I'm really confused as to what might be going on. I've tried bisecting back a few months, but I can't find a version that works - however the version that pip installed works fine.
cc @JoergFiedler click here for bot help
Looks like it might be something to do with how SSH is being handled.
(formatted traceback for easier reading)
Traceback (most recent call last):
File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 328, in <module>
main()
File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 307, in main
_changed, _msg = install_packages(module, pkgng_path, pkgs, p["cached"], p["pkgsite"], dir_arg)
File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 156, in install_packages
old_pkgng = pkgng_older_than(module, pkgng_path, [1, 1, 4])
File "/tmp/ansible_wM41cV/ansible_module_pkgng.py", line 116, in pkgng_older_than
while compare_version[i] == version[i]:
TypeError: 'itertools.imap' object has no attribute '__getitem__'
(formatted stderr/ssh stderr for easier reading)
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /Users/joe/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug1: auto-mux: Trying existing master
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 95173
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Shared connection to 10.17.0.2 closed.
I'm concerned about the 'broken pipe's, but looking at the successful logs it seems that that's a normal behaviour for the ssh connection rather than the cause of the issue.
The 'Broken pipe' from stderr looks like it could be related to https://github.com/ansible/ansible/issues/16731
I don't know if the errors are related or not.
I don't see anything that I'd expect to cause the 'itertools.imap' error though (nothing seems to reference itertools, all the types involved look to be plain lists, etc...)
Using module file /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/modules/extras/packaging/os/pkgng.py
For 2.4, there should not be a modules/extras/ directory. Is 'library' configured to point to /Users/joe/Documents/TrueSpeed/repositories/ansible/lib/ansible/modules/extras somewhere?
Maybe the 2.4 checkout still has the old lib/ansible/modules/core/ and lib/ansible/modules/extras directories?
mv/rm them if they exist in a 2.4 checkout.
It does appear to have both:
unnamed-84:ansible joe$ git log origin/devel HEAD | head -6
commit 3b5dd4e0a0c796d145b19c224ff95a2d2ca62e4f
Author: Hao Wang <hao.1.wang@gmail.com>
Date: Sun Mar 19 17:44:26 2017 +0000
file module doesn't create hard link to given target directory
unnamed-84:ansible joe$ git log lib/ansible/modules/extras | head -7
commit 011ea55a8f1630842c67603ac601d4d7ef6ccef9
Author: James Cammarata <jimi@sngx.net>
Date: Thu Dec 8 00:36:57 2016 -0500
Relocating extras into lib/ansible/modules/ after merge
unnamed-84:ansible joe$ git log lib/ansible/modules/core | head -7
commit c7eec45b73d59929679e94c91037b8329dc97188
Author: Michael DeHaan <michael.dehaan@gmail.com>
Date: Fri Sep 26 10:13:26 2014 -0400
Restructuring.
Removing core
and extras
fixes the problem. How did they end up in the devel/ branch if they've been removed already?
cc @bleader click here for bot help
cc @AMDmi3 @acozine @bcoca @berenddeboer @dagwieers @eest @jasperla @overhacked @tuxillo click here for bot help
cc @mekanix @opoplawski click here for bot help
cc @MacLemon click here for bot help
cc @dch click here for bot help
This issue appears to be out of date. We're closing it. Future issues related to the pkgng module should be filed on the repo for the relevant community collection.
ISSUE TYPE
COMPONENT NAME
modules/packaging/os/pkgng.py
ANSIBLE VERSION
CONFIGURATION
Default config - no changes
OS / ENVIRONMENT
Host:
Darwin unnamed-84.karthauser.co.uk 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
Managing:FreeBSD 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
SUMMARY
pkgng appears not to work when running against the version in the git repository, and throws an error instead of running. I'm not sure why - the version I installed using pip (which is also 2.4.0, but I don't know what SHA) works fine.
STEPS TO REPRODUCE
Inventory:
Playbook:
EXPECTED RESULTS
Using the devel version installed by pip everything works fine, and the pkg is installed:
ACTUAL RESULTS
What happens, is that instead of installing the package we get an error: