Commit Graph

30 Commits

Author SHA1 Message Date
Ryan Petrello
a59bc33280 slightly refactor isolated event consumption 2019-03-29 10:48:42 -04:00
Ryan Petrello
546281d435 work around a bug where runner doesn't provide atomic event writes 2019-03-29 10:31:12 -04:00
Ryan Petrello
9160d91278 clean up old usage of idle_timeout
cmeyers and I looked at this and can't tell where/why/how you'd actually
set this setting - it looks like really old ~2014-2015 Tower history
that probably isn't actually in use
2019-03-28 17:31:32 -04:00
Ryan Petrello
ab11f18957 send an EOF event if isolated dispatch fails 2019-03-28 16:48:52 -04:00
Ryan Petrello
ea30547754 remove main.expect tests (this functionality exists in runner now) 2019-03-28 16:13:14 -04:00
Ryan Petrello
dd81f59d9a set PYTHONPATH properly for isolated usage of runner 2019-03-28 12:40:21 -04:00
Ryan Petrello
99478f5d25 replace our usage of pexpect in IsolatedManager with ansible-runner 2019-03-28 12:40:21 -04:00
Ryan Petrello
a983d4bc1f properly handle isolated cancellation 2019-03-27 11:44:26 -04:00
Ryan Petrello
b2a1824d21 store set_stat data for isolated job runs 2019-03-25 18:53:42 -04:00
Ryan Petrello
495dc2202f more iso cleanup and bug fixes 2019-03-25 17:47:58 -04:00
chris meyers
87e1ba4dea do not generate a random ident
* instead, set the ident passed to ansible runner to be the job id. That
way, on we know what directory to look in for results when the directory
structure is created.
2019-03-22 12:19:42 -04:00
chris meyers
60ef160e85 flake8 fix 2019-03-20 16:12:45 -04:00
Ryan Petrello
602ef9750f update isolated task execution for ansible-runner 2019-03-18 14:21:47 -04:00
Author: Jim Ladd
2c5bdf3611 fix some isolated py3 bugs 2019-01-15 14:09:05 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
Ryan Petrello
d5c6c589b2 add an AWX_ISOLATED_VERBOSITY setting for debugging isolated connections 2018-11-26 23:47:16 -05:00
Ryan Petrello
fc0a039097 collect isolated capacity using a cache plugin, not stdout parsing
reading capacity values using the jsonfile cache plugin is more robust
in scenarios where ansible-playbook may print non-JSON output (such as
-vvv or when a custom callback plugin like timer is enabled)
2018-11-26 17:08:42 -05:00
Ryan Petrello
c695ba2e10 fix flake8 2018-10-24 10:11:53 -04:00
Ryan Petrello
a36b0061fa fix failing unit tests 2018-08-20 19:57:28 -04:00
Ryan Petrello
aee986d53c fail immediately if an isolated host is unreachable at launch time
see: https://github.com/ansible/tower/issues/2643
2018-07-30 12:40:26 -04:00
Ryan Petrello
172defa0d4 don't use codecs.open for syncing isolated stdout data
see: https://github.com/ansible/tower/issues/2315
2018-07-06 08:25:51 -04:00
Ryan Petrello
84eacfc360 fix a few isolated dev issues
the main goal of this change is to make `make docker-isolated` work out
of the box

- specify the proper version for awx-expect --version
- update some deprecated playbook bits
- change the isolated container to privileged so bwrap will work
- fix awx-manage test_isolated_connection
- expedite the first isolated heartbeat so you don't have to wait 10m;
  this is accomplished by _not_ setting Instance.last_isolated_check to
  now() at insertion time (which causes the next check not to happen for
  10 minutes)
- fix a bug that caused isolated node execution to fail when bwrap was
  enabled

see: https://github.com/ansible/tower/issues/2150

This reverts commit 9863fe71dc.
2018-06-13 14:17:58 -04:00
chris meyers
7b0b4f562d get isolated execution at the point its needed
* Instead of passing around the isolated host that the task is to
execute on; grab the isolated execution host from the instance further
down the call stack. Without passing the isolated hostname around.
2018-06-04 10:06:59 -04:00
Matthew Jones
ffe5a92eb9 Update isolated instance capacity calculaltion 2018-02-13 21:51:50 -05:00
Ryan Petrello
c0a641ed52 properly handle unicode for isolated job buffers
from: https://docs.python.org/2/library/stringio.html#module-cStringIO
"Unlike the StringIO module, this module is not able to accept Unicode
strings that cannot be encoded as plain ASCII strings."

see: https://github.com/ansible/ansible-tower/issues/7846
2018-01-09 23:46:17 -05:00
Ryan Petrello
0b30e7907b change stdout composition to generate from job events on the fly
this approach totally removes the process of reading and writing stdout
files on the local file system at settings.JOBOUTPUT_ROOT when jobs are
run; now stdout content is only written on-demand as it's fetched for
the deprecated `stdout` endpoint

see: https://github.com/ansible/awx/issues/200
2018-01-03 09:09:43 -05:00
Wayne Witzel III
2818bb5833 fix missing parameter to update_capacity method 2017-10-06 00:23:12 -04:00
Wayne Witzel III
692007072d Set capacity to zero if the isolated node has an old version 2017-10-02 14:43:18 -04:00
AlanCoding
6944ffa010 change imports to reflect isolated->expect move 2017-08-15 12:08:58 -04:00
AlanCoding
e79ca131a6 initial commit to move folder isolated->expect 2017-08-15 11:32:44 -04:00