gluster / gluster-kubernetes

GlusterFS Native Storage Service for Kubernetes
Apache License 2.0
875 stars 389 forks source link

heketi-storage-copy-job succeeds, but script ends with "Error waiting for job 'heketi-storage-copy-job' to complete" #508

Open robertgartman opened 6 years ago

robertgartman commented 6 years ago

Issue When running gk-deploy the script is actually successful in running the heketi-storage-copy-job though the script timeouts and fails with Error waiting for job 'heketi-storage-copy-job' to complete

Environment

/tmp/gluster-kubernetes/deploy$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-08T16:31:10Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:08:19Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

 /tmp/gluster-kubernetes/deploy$ git rev-parse HEAD
1504fd1ec1e6247642303c81e4bdd50893006a94

Investigation If I read the code right, gk-deploy does a kubectl get pods --no-headers --selector=job-name=heketi-storage-copy-job. That fails when testing from console. I'm too fresh on K8S to pinpoint why - but it is not working in my setup. The job was clearly successful (confirmed with 'kubectl get jobs heketi-storage-copy-job -o yaml')

Hack For anyone hitting this issue - this is a hack in gk-deploy that worked out for me: avtalsbanken/gluster-kubernetes@cd310a8 Credits to: https://stackoverflow.com/a/50979143 Note: just available in kubectl (v 1.11)