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

kubernetes.core.k8s_cp freezes #621

Open
raman-babich opened this issue May 18, 2023 · 0 comments
Open

kubernetes.core.k8s_cp freezes #621

raman-babich opened this issue May 18, 2023 · 0 comments
Labels
needs_verify type/bug Something isn't working

Comments

@raman-babich
Copy link

raman-babich commented May 18, 2023

SUMMARY

I am trying to run kubernetes.core.k8s_cp task in my role for copy dir(25Mb) from pod but it stucks on execution of this task.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

kubernetes.core.k8s_cp

ANSIBLE VERSION

I am using HIDDEN for possibly sensetive info.

ansible [core 2.14.2]
  config file = None
  configured module search path = ['/Users/<HIDDEN>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/7.2.0/libexec/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/<HIDDEN>/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.11.2 (main, Feb 13 2023, 03:31:04) [Clang 14.0.0 (clang-1400.0.29.202)] (/opt/homebrew/Cellar/ansible/7.2.0/libexec/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection        Version
----------------- -------
community.general 6.3.0  

Attaching pip list also maybe it could help.

Package            Version
------------------ --------
cachetools         5.3.0
certifi            2023.5.7
charset-normalizer 3.1.0
docker             5.0.3
google-auth        2.18.1
idna               3.4
kubernetes         24.2.0
oauthlib           3.2.2
pip                23.1.2
pyasn1             0.5.0
pyasn1-modules     0.3.0
python-dateutil    2.8.2
PyYAML             6.0
requests           2.30.0
requests-oauthlib  1.3.1
rsa                4.9
setuptools         65.6.3
six                1.16.0
urllib3            1.26.15
websocket-client   1.5.1
wheel              0.38.4

CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

MacOs Ventura 13.1 (Apple M1 Pro)

STEPS TO REPRODUCE
- name: 'Copy a file or a dir from a pod to local file or dir'
  kubernetes.core.k8s_cp:
    kubeconfig: '{{ copy_from_pod_kubeconfig }}'
    namespace: '{{ copy_from_pod_namespace }}'
    pod: '{{ copy_from_pod_pod }}'
    container: '{{ copy_from_pod_container }}'
    remote_path: '{{ copy_from_pod_remote_path }}'
    local_path: '{{ copy_from_pod_local_path }}'
    state: 'from_pod'
EXPECTED RESULTS

It works the same as kubectl cp does. Trying to do the same thing via kubectl cp takes 2-5s but I am waited for the end of kubernetes.core.k8s_cp task for 15min and then interupted it just because it seems to me that it will work infinitely.

ACTUAL RESULTS

It stucks on this task.

I am using HIDDEN for possibly sensetive info.

TASK [../common/roles/copy_from_pod : Copy a file or a dir from a pod to local file or dir] ********************************************************************************************************************
task path: <HIDDEN>
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: <HIDDEN>
<127.0.0.1> EXEC /bin/sh -c 'echo ~<HIDDEN> && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/<HIDDEN>/.ansible/tmp `"&& mkdir "` echo /Users/<HIDDEN>/.ansible/tmp/ansible-tmp-1684430824.069988-93466-254343338669300 `" && echo ansible-tmp-1684430824.069988-93466-254343338669300="` echo /Users/<HIDDEN>/.ansible/tmp/ansible-tmp-1684430824.069988-93466-254343338669300 `" ) && sleep 0'
Loading collection cloud.common from /opt/homebrew/Cellar/ansible/7.2.0/libexec/lib/python3.11/site-packages/ansible_collections/cloud/common
Using module file /Users/<HIDDEN>/.ansible/collections/ansible_collections/kubernetes/core/plugins/modules/k8s_cp.py
<127.0.0.1> PUT /Users/<HIDDEN>/.ansible/tmp/ansible-local-93356iq776s3r/tmpfiy3fyfr TO /Users/<HIDDEN>/.ansible/tmp/ansible-tmp-1684430824.069988-93466-254343338669300/AnsiballZ_k8s_cp.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/<HIDDEN>/.ansible/tmp/ansible-tmp-1684430824.069988-93466-254343338669300/ /Users/<HIDDEN>/.ansible/tmp/ansible-tmp-1684430824.069988-93466-254343338669300/AnsiballZ_k8s_cp.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/opt/homebrew/Cellar/ansible/7.2.0/libexec/bin/python3.11 /Users/<HIDDEN>/.ansible/tmp/ansible-tmp-1684430824.069988-93466-254343338669300/AnsiballZ_k8s_cp.py && sleep 0'

@gravesm gravesm added needs_verify type/bug Something isn't working labels Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_verify type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants