Commit Graph

2564 Commits

Author SHA1 Message Date
David Wilson d981a382c9 ci: work around various broken aspects of Travis VM image
- Symlink broken Ubuntu Python package pieces back together. See many
  Google hits about this issue.
- Remove apt sources that can no longer be updated.
2019-06-04 13:38:33 +01:00
David Wilson ad5a80f200 Use virtualenv Python for stub connections to workaround problem
../data/stubs/stub-kubectl.py exec -it localhost -- /usr/bin/python -c "...":

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    LookupError: unknown encoding: base64

It's not clear why this is happening. "stub-kubectl.py" is executed with
the 2.7 virtualenv, while the exec() that happens inside stub-kubectl
was for "/usr/bin/python".

That second Python can't find chunks of its stdlib:

    stat("/usr/lib/python2.7/encodings/base64", 0x7ffde8744c60) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64.py", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
    write(2, "Traceback (most recent call last):\n", 35) = 35
    write(2, "  File \"<string>\", line 1, in <module>\n", 39) = 39
2019-06-04 13:37:00 +01:00
David Wilson ab9a80cfd4 ci: Ansible 2.8 requires Python 2.7. 2019-06-04 00:50:06 +01:00
David Wilson 08e7fe4f80 tests: add 2.8 format async error timeout message 2019-06-04 00:47:15 +01:00
David Wilson 7ae926b325 ansible: prevent tempfile.mkstemp() leaks.
This avoids a leak present in Ansible 2.7.0..current HEAD, and all
similar leaks.

See ansible/ansible#57327.
2019-06-03 23:43:15 +01:00
David Wilson 2f05b93a08 update gitignore again 2019-06-03 23:42:25 +01:00
David Wilson 73a87d425d ci: try bumping more Travis jobs to Ansible 2.8. 2019-06-03 20:49:27 +01:00
David Wilson a766fd3be5 add .*.pid to gitignore 2019-06-03 20:48:46 +01:00
David Wilson 418fc15e80 tests: allow running without hdrhistograms library. 2019-06-03 20:45:48 +01:00
David Wilson 1a32a79fa6 issue #578: update Changelog. 2019-06-03 20:42:59 +01:00
David Wilson 95fd9b815c travis: exclude docs-master from CI 2019-06-03 18:08:41 +01:00
David Wilson 8fc491ac43 issue #589: ensure real FileService/PushFileService are in the docs 2019-06-03 18:06:17 +01:00
David Wilson 874e75276f issue #589: ensure real FileService/PushFileService are in the docs 2019-06-03 18:06:17 +01:00
David Wilson 687d4033d5 docs: add new contributor entry 2019-06-03 18:06:17 +01:00
David Wilson 2d083d19df issue #589: remove outdated/incomplete examples 2019-06-03 18:06:17 +01:00
David Wilson 06690901e4 issue #589: split services example out and make it run. 2019-06-03 18:05:52 +01:00
David Wilson 3616385af4 Merge remote-tracking branch 'origin/issue593'
* origin/issue593:
  issue #593: expose configurables for SSH keepalive and increase the default
2019-06-03 18:05:07 +01:00
David Wilson 3620fce071 issue #593: expose configurables for SSH keepalive and increase the default 2019-06-03 17:40:58 +01:00
David Wilson 823c18ec09 Merge remote-tracking branch 'origin/issue591'
* origin/issue591:
  issue #591: fix test for Ansible 2.3.
  issue #591: ansible: restore CWD prior to AnsibleModule initialization.
2019-06-03 03:18:42 +01:00
David Wilson e90c05dc9d issue #591: fix test for Ansible 2.3. 2019-06-03 02:45:15 +01:00
David Wilson 0b7fd3f290 issue #591: ansible: restore CWD prior to AnsibleModule initialization. 2019-06-03 02:34:40 +01:00
David Wilson 92ac716f0d Merge remote-tracking branch 'origin/issue590'
* origin/issue590:
  issue #590: disable distro test on vanilla
  ci: Ansible 2.8 jobs aren't running against all host types.
  tests: Py3.x fix.
  issue #590: fix test for <2.8 Ansibles.
  tests: Py3.x fix.
  issue #590: actually run Ansible test.
  tests: Py3.x fix.
  master: sysconfig did not exist until 2.7.
  tests: rearrange test modules again, they're used in multiple places
  module_finder_test: mask one more difference between unit2 vs. direct start
  master: fix _is_stdlib_path() failure on Ubuntu.
  issue #590: add dummy package for new test.
  issue #590: add FinderMethod docstrings.
  issue #590: update comment to indicate the hack is permanent
  issue #590: move example modules to module_finder/, fix/add tests
  issue #590: refactor ModuleFinder and teach it a new special case.
  issue #590: Ansible test for module_utils.distro use.
  issue #590: teach importer to handle self-replacing modules
2019-06-02 21:58:49 +01:00
David Wilson fe7c3610ff issue #590: disable distro test on vanilla 2019-06-02 20:52:18 +01:00
David Wilson c1d763f929 ci: Ansible 2.8 jobs aren't running against all host types. 2019-06-02 19:53:12 +01:00
David Wilson f1287e6e9a tests: Py3.x fix. 2019-06-02 19:45:05 +01:00
David Wilson a1f2ec222d issue #590: fix test for <2.8 Ansibles. 2019-06-02 19:38:42 +01:00
David Wilson 90105e2031 tests: Py3.x fix. 2019-06-02 19:22:59 +01:00
David Wilson e94200aeb9 issue #590: actually run Ansible test. 2019-06-02 19:13:23 +01:00
David Wilson 50cdf63c27 tests: Py3.x fix. 2019-06-02 19:12:43 +01:00
David Wilson ed8acb5153 master: sysconfig did not exist until 2.7. 2019-06-02 19:05:54 +01:00
David Wilson 2f29f3e8e6 tests: rearrange test modules again, they're used in multiple places
They're back on sys.path.
2019-06-02 18:56:56 +01:00
David Wilson 2f68a5a660 module_finder_test: mask one more difference between unit2 vs. direct start 2019-06-02 18:55:42 +01:00
David Wilson 5eb10aacef master: fix _is_stdlib_path() failure on Ubuntu. 2019-06-02 18:33:52 +01:00
David Wilson cf1e7129a7 issue #590: add dummy package for new test. 2019-06-02 17:56:44 +01:00
David Wilson 72ab917c89 issue #590: add FinderMethod docstrings. 2019-06-02 17:53:18 +01:00
David Wilson 4f23f0bec1 issue #590: update comment to indicate the hack is permanent 2019-06-02 17:52:58 +01:00
David Wilson c1db0d3858 issue #590: move example modules to module_finder/, fix/add tests 2019-06-02 17:52:08 +01:00
David Wilson 875ff5c060 issue #590: refactor ModuleFinder and teach it a new special case.
Now it's possible to find both packages and modules when the
sys.modules[...] state for the package/module is junk. Previously only
modules were possible.

This also refactors things to make writing better tests for all these
cases much simpler.
2019-06-02 17:17:52 +01:00
David Wilson 7a5c436a39 issue #590: Ansible test for module_utils.distro use. 2019-06-02 13:24:32 +01:00
David Wilson 8f940e2ccb issue #590: teach importer to handle self-replacing modules 2019-06-02 13:08:44 +01:00
David Wilson d71d0ea2f9 Merge remote-tracking branch 'origin/azure-280-35'
* origin/azure-280-35:
  issue #590: include nasty workaround for sys.modules junk
  azure: try enabling Ansible 2.8/Py3.5 job
2019-05-30 06:28:26 +01:00
David Wilson 1a92995a24 issue #590: include nasty workaround for sys.modules junk 2019-05-30 06:00:54 +01:00
David Wilson 167d0eff32 azure: try enabling Ansible 2.8/Py3.5 job 2019-05-27 23:57:47 +01:00
David Wilson 6f4cbc1ead Merge remote-tracking branch 'origin/issue587'
* origin/issue587:
  issue #587: docs: update Changelog.
  issue #587: disable SSH key setup, it breaks unit tests
  issue #587: attempt to fix Mac Azure job
  issue #587: Add 2.8.0/Py2.7 job to Azure
  issue #587: use deadsnakes PPA Python because VSTS version is junk
  issue #587: workaround for ansible/ansible#56629
  issue #587: enable spawn_reverse_shell and tidy up Azure step names
  issue #587: ensure Azure worker has a working SSH configuration
  issue #587: import spawn_reverse_shell.py script.
  issue #587: support pausing ansible_tests if flag file exists
  issue #587: "state: absent" was removed in 2.8.0
  issue #587: consistent become_exe() behaviour for older Ansibles.
  issue #587: update stub_connections/ test to use new doas var
  issue #587: update MODULE FAILURE message format for post >2.7
  issue #587: fix syntax error due to presence of comment
  issue #587: update mitogen_doas doc to match varible change.
  issue #587: disable deprecation_warnings for CI.
  issue #587: mitogen_doas should not become_exe for doas_path
  issue #587: 2.8 whitespace handling was improved.
  issue #587: 2.8 PlayContext lacks sudo_flags attribute.
  issue #587: 2.8 PluginLoader.get() introduced new collection_list kwarg
  issue #587: 2.8 PlayContext.connection no longer contains connection name
  issue #587: bump max Ansible version
2019-05-27 23:08:45 +01:00
David Wilson 2c15c1d4a5 issue #587: docs: update Changelog. 2019-05-27 22:46:58 +01:00
David Wilson 8d766d3d32 issue #587: disable SSH key setup, it breaks unit tests 2019-05-27 22:33:02 +01:00
David Wilson 45d88b1f3f issue #587: attempt to fix Mac Azure job 2019-05-27 22:23:23 +01:00
David Wilson ea718081d8 issue #587: Add 2.8.0/Py2.7 job to Azure 2019-05-27 22:16:58 +01:00
David Wilson 4a6eba9653 issue #587: use deadsnakes PPA Python because VSTS version is junk 2019-05-27 22:16:56 +01:00
David Wilson 61b651bdd2 issue #587: workaround for ansible/ansible#56629 2019-05-27 20:15:02 +01:00