sig-storage-lib-external-provisioner icon indicating copy to clipboard operation
sig-storage-lib-external-provisioner copied to clipboard

Error creating lock: endpoints lock is removed, migrate to endpointsleases

Open rajch opened this issue 2 years ago • 2 comments

On migrating from v6 to v8, my provisioner crashes with the following error:

F0720 16:59:52.441682    5606 controller.go:878] Error creating lock: endpoints lock is removed, migrate to endpointsleases

I can suppress it by disabling leader election, but would like to know how to solve the problem.

rajch avatar Jul 20 '22 11:07 rajch

Found the problem. In the v8.0.0 tagged release, line 868 calls resourcelock.New with a hardcoded locktype of "endpoints", which is no longer supported. Here are the problem lines, in: // https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/blob/v8.0.0/controller/controller.go

	if ctrl.leaderElection {
		rl, err := resourcelock.New("endpoints",
			ctrl.leaderElectionNamespace,
			strings.Replace(ctrl.provisionerName, "/", "-", -1),
			ctrl.client.CoreV1(),
			nil,
			resourcelock.ResourceLockConfig{
				Identity:      ctrl.id,
				EventRecorder: ctrl.eventRecorder,
			})
		if err != nil {
			klog.Fatalf("Error creating lock: %v", err)
		}

This has been corrected in the master branch (specifically commit a4ce2c1d2e5221e98de41dfd00bdc4b041a40b3f), but a new release has not been made with the correction.

rajch avatar Jul 20 '22 12:07 rajch

Could we have a new release, please?

rajch avatar Sep 22 '22 06:09 rajch