Closed greygoo closed 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
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:
bash -x
> 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:
in the log container of the adapter-0 pod (the one klog.sh fails):
log
adapter-0
tar
adapter-0:/ # ls -lh /var/vcap/sys/log/ total 12K drwxr-sr-x 2 vcap vcap 4.0K May 27 15:04 adapter drwxr-sr-x 2 vcap vcap 4.0K May 27 15:04 loggr-forwarder-agent drwxr-sr-x 2 vcap vcap 4.0K May 27 15:04 loggregator_agent
in the loggr-forwarder-agent-loggr-forwarder-agent container in the adapter-0 pod (works with klog.sh):
loggr-forwarder-agent-loggr-forwarder-agent
/:/var/vcap/jobs/adapter# ls -lh /var/vcap/sys/log/ total 12K drwxr-sr-x 2 vcap adm 4.0K May 27 15:04 adapter drwxr-sr-x 2 vcap adm 4.0K May 27 15:04 loggr-forwarder-agent drwxr-sr-x 2 vcap adm 4.0K May 27 15:04 loggregator_agent
If you are using kubecf, please be sure to use the kubecf version of klog.sh.
klog.sh
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:
running it with
bash -x
reveals that this is the failing command: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:
in the
log
container of theadapter-0
pod (the one klog.sh fails):tar
command was availablein the
loggr-forwarder-agent-loggr-forwarder-agent
container in theadapter-0
pod (works with klog.sh):tar
command available