SUSE / scf

SUSE Cloud Foundry
Other
77 stars 41 forks source link

klog.sh fails with kubecf/cap 2.0 #3474

Closed greygoo closed 4 years ago

greygoo commented 4 years ago

Describe the bug When running klog.sh with a kubecf deployment, it fails on copying log files from the log container in the adapter-0 pod with command terminated with exit code 126

To Reproduce this is how klog.sh behaves:

> ./bin/klog.sh 
Pod acceptance-tests-530a82ca6917486c-w6ksb = Failed
  - acceptance-tests-acceptance-tests logs: Kube
  - output-persist logs: Kube
  Descriptions ...
Pod adapter-0 = Running
  - adapter-adapter logs: CF Kube
  - loggregator-agent-loggregator-agent logs: CF Kube
  - loggr-forwarder-agent-loggr-forwarder-agent logs: CF Kube
  - logs logs: CF

> echo $?
126

running it with bash -x reveals that this is the failing command:

> kubectl cp --namespace scf --container logs adapter-0:/var/vcap/sys/log/ /home/chullerlocal/klog/scf/adapter-0/logs/
command terminated with exit code 126

Expected behavior klog.sh should collect and package the log files..

Environment

Additional context I checked for differences between the pod klog.sh fails upon and ones where it works:

mook-as commented 4 years ago

If you are using kubecf, please be sure to use the kubecf version of klog.sh.