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
Remove stale volumes if endpoint/svc creation fails. #35285
Remove stale volumes if endpoint/svc creation fails. #35285
Conversation
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Can a kubernetes member verify that this patch is reasonable to test? If so, please reply with "@k8s-bot ok to test" on its own line. Regular contributors should join the org to skip this step. |
@k8s-bot ok to test |
@jsafrane can you set an IGNORE here to retrigger the tests? |
@k8s-bot test this issue: #IGNORE |
Jenkins GCI GKE smoke e2e failed for commit 9026347. Full PR test history. The magic incantation to run this job again is |
@rootfs can you please review/merge this change? |
@@ -550,6 +550,10 @@ func (p *glusterfsVolumeProvisioner) CreateVolume() (r *api.GlusterfsVolumeSourc | |||
endpoint, service, err := p.createEndpointService(epNamespace, epServiceName, dynamicHostIps, p.options.PVC.Name) | |||
if err != nil { | |||
glog.Errorf("glusterfs: failed to create endpoint/service") | |||
err = cli.VolumeDelete(volume.Id) | |||
if err != nil { | |||
glog.Errorf("glusterfs: error when deleting the volume :%v , manual deletion required", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why volumeDelete will get stale endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs no.. its other way around, on volume creation code path, if it created volume and then while trying to create an endpoint if it fails, previously created volume will exist in the backend. When next provisioning request comes it will create one more volume .. so on. This patch delete the volume it created if there is a failure in endpoint/svc creation.
lgtm @jsafrane ? |
This PR is almost 3 days in the submit queue, still not merged. Not sure whats wrong ? |
Jenkins GCE e2e failed for commit 9026347. Full PR test history. The magic incantation to run this job again is |
@k8s-bot cvm gce e2e test this |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
@humblec should that be cherry-picked into 1.4 ? |
@soltysh Thanks, yeah, really good if we can ! |
@jessfraz another 1.4 cherry-pick candidate |
cool I'll do all these as a group today |
cherry-picked in #36510 |
…ck-of-#34375-kubernetes#35285-kubernetes#35420-kubernetes#35608-kubernetes#35919-kubernetes#36161-origin-release-1.4 Automated cherry pick of kubernetes#34375 kubernetes#35285 kubernetes#35420 kubernetes#35608 kubernetes#35919 kubernetes#36161
Signed-off-by: Humble Chirammal hchiramm@redhat.com
This change is