ANSIBALLZ, zipped ansible library

517 views
Skip to first unread message

Ted Timmons

unread,
Nov 28, 2016, 6:45:05 PM11/28/16
to ansibl...@googlegroups.com
ANSIBALLZ puts a compressed zip blob on the remote machine. It seems that python can read a compressed library? I mean, it isn't exploded, yet it works.

This is relevant because it fails on pypy, which means coreos machines are unusable (since 2.1.0). If I duplicate the logic from 'debug:explode' into the main func of module_common, it works.


This is talked about, partially, in this:

-ted

Matt Martz

unread,
Nov 28, 2016, 8:32:28 PM11/28/16
to Ted Timmons, ansibl...@googlegroups.com
From the issue you link, It looks like this is due to trying to use toolbox to run python on coreos.  I believe this is due to having a shell script at /opt/bin/python that tries to execute /usr/bin/python inside of the toolbox container:

core@coreos ~ $ /opt/bin/python -c 'import sys; print sys.executable'
/usr/bin/python

I believe that is the problem where the reports of "No such file or directory" are coming from.  The "python" path on the coreos machine is in a different location than the actual python binary in the toolbox container, so when `/opt/bin/python` is executed in the container, it fails.

In a simple test to see if this could be resolved, I linked /usr/bin/python to /opt/bin/python inside the toolbox container, and it resolves the issues:

$ toolbox --quiet /bin/sh
/bin/sh: can't access tty; job control turned off
/ # mkdir -p /opt/bin
/ # ln -s /usr/bin/python /opt/bin/


On the other hand, using the coreos instructions for installing pypy via https://github.com/defunctzombie/ansible-coreos-bootstrap work like a charm with ansible, with no complexities.


As for python being able to use a zipped file for imports, that is built in functionality of python:


--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net

Bryce Walter

unread,
Nov 29, 2016, 2:43:26 AM11/29/16
to Matt Martz, ansibl...@googlegroups.com, Ted Timmons

+1 for defunct's bootstrap. Works like a charm.

Bryce Walter

Reply all
Reply to author
Forward
0 new messages