Closed richardlau closed 3 years ago
FWIW for comparison on a working Orka 10.15 host, test-orka-macos10.15-x64-1
:
administrator@test-orka-macos10 ~ % cat /usr/local/bin/tap2junit
#!/Library/Developer/CommandLineTools/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from tap2junit.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
administrator@test-orka-macos10 ~ % ls -al /Library/Developer/CommandLineTools/usr/bin/python*
lrwxr-xr-x 1 root wheel 67 Dec 14 07:52 /Library/Developer/CommandLineTools/usr/bin/python3 -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3
lrwxr-xr-x 1 root wheel 74 Dec 14 07:52 /Library/Developer/CommandLineTools/usr/bin/python3-config -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3-config
lrwxr-xr-x 1 root wheel 69 Dec 14 07:52 /Library/Developer/CommandLineTools/usr/bin/python3.7 -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7
lrwxr-xr-x 1 root wheel 76 Dec 14 07:52 /Library/Developer/CommandLineTools/usr/bin/python3.7-config -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7-config
lrwxr-xr-x 1 root wheel 70 Dec 14 07:52 /Library/Developer/CommandLineTools/usr/bin/python3.7m -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7m
lrwxr-xr-x 1 root wheel 77 Dec 14 07:52 /Library/Developer/CommandLineTools/usr/bin/python3.7m-config -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7m-config
administrator@test-orka-macos10 ~ %
I think the #! line (and the tap2junit binary itself) is coming from the package installer (pip
) rather than the tap2junit code (https://github.com/nodejs/tap2junit) itself.
So I assume this just requires a reinstall of tap2junit
?
So I assume this just requires a reinstall of
tap2junit
?
🤞.
Just tried to run the ansible playbook against one of the hosts but got an error complaining about Python.
$ ansible-playbook -l test-orka-macos10.14-x64-1 playbooks/jenkins/worker/create.yml
[DEPRECATION WARNING]: DEFAULT_SQUASH_ACTIONS option, Loop squashing is deprecated and this configuration will no longer be used , use a list directly with
the module argument instead. This feature will be removed in version 2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
[DEPRECATION WARNING]: The use of 'static' has been deprecated. Use 'import_tasks' for static inclusion, or 'include_tasks' for dynamic inclusion. This
feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [test,release,infra-softlayer-ubuntu1404-x64-2,!*-win*] ***********************************************************************************************
TASK [check if secret is properly set] *********************************************************************************************************************
ok: [test-orka-macos10.14-x64-1]
TASK [run os-specific bootstrap] ***************************************************************************************************************************
TASK [run raspberry pi bootstrap] **************************************************************************************************************************
skipping: [test-orka-macos10.14-x64-1]
TASK [package-upgrade : include package manager tasks] *****************************************************************************************************
included: /home/rlau/sandbox/github/build/ansible/roles/package-upgrade/tasks/partials/brew.yml for test-orka-macos10.14-x64-1
TASK [package-upgrade : Check for xcode-tools] *************************************************************************************************************
changed: [test-orka-macos10.14-x64-1]
TASK [package-upgrade : Install xcode-tools] ***************************************************************************************************************
skipping: [test-orka-macos10.14-x64-1]
TASK [package-upgrade : Check if Homebrew is already installed] ********************************************************************************************
fatal: [test-orka-macos10.14-x64-1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 199.7.167.99 closed.\r\n", "module_stdout": "/bin/sh: /usr/bin/python3: No such file or directory\r\n", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127}
PLAY RECAP *************************************************************************************************************************************************
test-orka-macos10.14-x64-1 : ok=3 changed=1 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0
$
is set to usr/bin/python3
but the 10.14 macs seem to be:
test-orka-macos10:~ administrator$ which python3
/usr/local/bin/python3
Temporarily commented out the entry for ansible_python_interpreter
in ansible.cfg
for macOS and set it in the inventory.xml
for the host I'm running against (test-orka-macos10.14-x64-1
) and the playbook gets a bit further and then errors on:
TASK [package-upgrade : Upgrade installed packages] ********************************************************************************************************
task path: /home/rlau/sandbox/github/build/ansible/roles/package-upgrade/tasks/partials/brew.yml:26
fatal: [test-orka-macos10.14-x64-1]: FAILED! => {"changed": false, "msg": "Updating Homebrew...\nError: Could not remove python keg! Do so manually:\n sudo rm -rf /usr/local/Cellar/python/3.7.7"}
Rerunning got past that failure (in "Upgrade installed packages") and I'm now stuck at
TASK [package-upgrade : Update Casks] **********************************************************************************************************************
task path: /home/rlau/sandbox/github/build/ansible/roles/package-upgrade/tasks/partials/brew.yml:41
fatal: [test-orka-macos10.14-x64-1]: FAILED! => {"changed": false, "msg": "Error: Calling brew cask upgrade is disabled! Use brew upgrade [--cask] instead."}
This looks to have been a recent breakage caused by Homebrew. Refs: https://github.com/ansible-collections/community.general/issues/1524 Refs: https://github.com/Homebrew/discussions/discussions/340#discussioncomment-232364
Apparently the latest ansible 2.10 contains a fix, but for other reasons the most recent versions of ansible in Fedora 33 (where I've been running the script) is 2.9.16. I'll try to set up a container and install ansible via pip.
It looks like the Orka 10.14 macOS hosts can't run tap2junit: e.g. https://ci.nodejs.org/job/node-test-commit-osx/38260/nodes=osx1014/console
If I log into any of the three Orka macOS 10.14 hosts it looks like the tap2junit script is referencing a non-existent Python in its #! line: