gluster / gluster-kubernetes

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

gk-deploy abort is not deleting the heketi-storage-endpoints svc in some cases #429

Open hemanth-avs opened 6 years ago

hemanth-avs commented 6 years ago

gk-deploy --abort is not deleting the heketi-storage-endpoints svc when previous job is failed before applying the label to svc

Previos job failed at waiting for job 'heketi-storage-copy-job'

Timed out waiting for pods matching '--selector=job-name=heketi-storage-copy-job'.
Error waiting for job 'heketi-storage-copy-job' to complete.

During Cleanup Abort the deployed and svc heketi-storage-endpoints is not deleted

root@host1-avsh-test-dal12:~/k8s/deploy# ./gk-deploy --abort -y
Using Kubernetes CLI.
Using namespace "default".
No resources found
No resources found
No resources found

root@host1-avsh-test-dal12:~/k8s/deploy# kubectl get svc heketi-storage-endpoints
NAME                       TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
heketi-storage-endpoints   ClusterIP   10.233.44.128   <none>        1/TCP     1h
root@host1-avsh-test-dal12:~/k8s/deploy#

After cleanup, rerunning the job causing below issue

secret "heketi-storage-secret" created
job "heketi-storage-copy-job" created
Error from server (AlreadyExists): endpoints "heketi-storage-endpoints" already exists
Error from server (AlreadyExists): services "heketi-storage-endpoints" already exists
Failed on creating heketi storage resources.

So, Getting above error when trying to deploy after a clean up ( ./gk-deploy --abort -y )

hemanth-avs commented 6 years ago

PR for change to delete svc https://github.com/gluster/gluster-kubernetes/pull/430