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 intermittently copying incomplete files to pod #776

Open
danfinn opened this issue Aug 28, 2024 · 1 comment
Open

Comments

@danfinn
Copy link

danfinn commented Aug 28, 2024

SUMMARY

Occasionally I've noticed that when using the kubernetes.core.k8s_cp module the file that gets copied is not complete. This isn't happening all the time but it is causing issues for us.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

kubernetes.core.k8s_cp

ANSIBLE VERSION

quay.io/ansible/ansible-builder:latest

STEPS TO REPRODUCE
 - name: Copy metricbeat index template to elasticsearch master pod
   kubernetes.core.k8s_cp:
     kubeconfig: "{{ context_file }}"
     context: "{{ aks_name }}"
     namespace: "{{ namespace }}"
     pod: "{{ prefix_type }}-elasticsearch-master-0"
     container: "{{ prefix_type }}-elasticsearch"
     local_path: "{{ role_path }}/files/metricbeat_template.json"
     remote_path: /tmp/metricbeat_template.json
   no_log: "{{ no_log }}"
EXPECTED RESULTS

file to be copied in it's entirety

ACTUAL RESULTS

source file:

wc -l metricbeat_template.json
35766 metricbeat_template.json

file on pod after running above ansible task:

wc -l /tmp/metricbeat_template.json
35225 /tmp/metricbeat_template.json

this doesn't happen every time but I've caught this happening twice now.

re-running the playbook results in the file being copied in it's entirety (from the pod):

wc -l /tmp/metricbeat_template.json
35766 /tmp/metricbeat_template.json
@danfinn danfinn changed the title kubernetes.core.k8s_cp copying incomplete files to pod kubernetes.core.k8s_cp intermittently copying incomplete files to pod Aug 28, 2024
@danfinn
Copy link
Author

danfinn commented Aug 30, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant