Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.9] kubectl: Follow up fix in connection plugin #72130

Merged
merged 1 commit into from Oct 9, 2020

Conversation

Akasurde
Copy link
Member

@Akasurde Akasurde commented Oct 7, 2020

SUMMARY

PR #71535 broke, _build_exec_cmd API in kubectl connection
plugin.

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/plugins/connection/kubectl.py

@Akasurde Akasurde changed the title [2.9] kubectl: Follow fix in connection plugin [2.9] kubectl: Follow up fix in connection plugin Oct 7, 2020
@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. collection Related to Ansible Collections work collection:community.kubernetes community_review In order to be merged, this PR must follow the community review workflow. has_issue k8s needs_triage Needs a first human triage before being processed. small_patch support:community This issue/PR relates to code supported by the Ansible community. labels Oct 7, 2020
PR ansible#71535 broke, _build_exec_cmd API in kubectl connection
plugin.

Fixes: ansible#72171

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde
Copy link
Member Author

Akasurde commented Oct 9, 2020

Details
ansible-playbook -i k8s.yaml main.yml -vvv --limit label_app_galaxy
ansible-playbook 2.9.14.post0
  config file = None
  configured module search path = ['/Users/akasurde/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Volumes/data/src/ansible/lib/ansible
  executable location = /Volumes/data/src/ansible/bin/ansible-playbook
  python version = 3.7.4 (default, Sep  7 2019, 18:27:02) [Clang 10.0.1 (clang-1001.0.46.4)]
No config file found; using defaults
host_list declined parsing /Volumes/data/src/playbooks/k8s/inventory/k8s.yaml as it did not pass its verify_file() method
script declined parsing /Volumes/data/src/playbooks/k8s/inventory/k8s.yaml as it did not pass its verify_file() method
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see
details
Parsed /Volumes/data/src/playbooks/k8s/inventory/k8s.yaml inventory source with auto plugin

PLAYBOOK: main.yml ****************************************************************************
1 plays in main.yml

PLAY [all] ************************************************************************************

TASK [Gathering Facts] ************************************************************************
task path: /Volumes/data/src/playbooks/k8s/inventory/main.yml:2
<utilitypod-2_utilitypod> ESTABLISH kubectl CONNECTION
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', '/bin/sh -c '( umask 77 && mkdir -p "echo /tmp/"&& mkdir "echo /tmp/ansible-tmp-1602261561.102318-5448-221419235327149" && echo ansible-tmp-1602261561.102318-5448-221419235327149="echo /tmp/ansible-tmp-1602261561.102318-5448-221419235327149" ) && sleep 0'']
<utilitypod-2_utilitypod> Attempting python interpreter discovery
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', '/bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'']
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c '/usr/bin/python && sleep 0'"]
Using module file /Volumes/data/src/ansible/lib/ansible/modules/system/setup.py
<utilitypod-2_utilitypod> PUT /Users/akasurde/.ansible/tmp/ansible-local-5443urneuem9/tmp0jnigoa6 TO /tmp/ansible-tmp-1602261561.102318-5448-221419235327149/AnsiballZ_setup.py
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c 'chmod u+x /tmp/ansible-tmp-1602261561.102318-5448-221419235327149/ /tmp/ansible-tmp-1602261561.102318-5448-221419235327149/AnsiballZ_setup.py && sleep 0'"]
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c '/usr/bin/python /tmp/ansible-tmp-1602261561.102318-5448-221419235327149/AnsiballZ_setup.py && sleep 0'"]
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c 'rm -f -r /tmp/ansible-tmp-1602261561.102318-5448-221419235327149/ > /dev/null 2>&1 && sleep 0'"]
ok: [utilitypod-2_utilitypod]
META: ran handlers

TASK [shell] **********************************************************************************
task path: /Volumes/data/src/playbooks/k8s/inventory/main.yml:4
<utilitypod-2_utilitypod> ESTABLISH kubectl CONNECTION
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', '/bin/sh -c '( umask 77 && mkdir -p "echo /tmp/"&& mkdir "echo /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322" && echo ansible-tmp-1602261571.7849832-5463-14504567036322="echo /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322" ) && sleep 0'']
Using module file /Volumes/data/src/ansible/lib/ansible/modules/commands/command.py
<utilitypod-2_utilitypod> PUT /Users/akasurde/.ansible/tmp/ansible-local-5443urneuem9/tmp8bb0w0ae TO /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322/AnsiballZ_command.py
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c 'chmod u+x /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322/ /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322/AnsiballZ_command.py && sleep 0'"]
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c '/usr/bin/python /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322/AnsiballZ_command.py && sleep 0'"]
<utilitypod-2_utilitypod> EXEC ['/usr/local/bin/kubectl', 'exec', '-i', 'utilitypod-2', '-c', 'utilitypod', '--', '/bin/sh', '-c', "/bin/sh -c 'rm -f -r /tmp/ansible-tmp-1602261571.7849832-5463-14504567036322/ > /dev/null 2>&1 && sleep 0'"]
changed: [utilitypod-2_utilitypod] => {
"changed": true,
"cmd": "hostname",
"delta": "0:00:00.437388",
"end": "2020-10-09 16:39:33.144862",
"invocation": {
"module_args": {
"_raw_params": "hostname",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2020-10-09 16:39:32.707474",
"stderr": "",
"stderr_lines": [],
"stdout": "utilitypod-2",
"stdout_lines": [
"utilitypod-2"
]
}
META: ran handlers
META: ran handlers

PLAY RECAP ************************************************************************************
utilitypod-2_utilitypod : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

@relrod relrod merged commit 7529d31 into ansible:stable-2.9 Oct 9, 2020
@Akasurde Akasurde deleted the 71535_follow branch October 9, 2020 16:50
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Oct 19, 2020
@ansible ansible locked and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. collection:community.kubernetes collection Related to Ansible Collections work community_review In order to be merged, this PR must follow the community review workflow. has_issue k8s support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants