Re: [kubernetes/kubernetes] Don't try to attach volumes which are already attached to other nodes (#40148)

3 views
Skip to first unread message

Saad Ali

unread,
Feb 27, 2017, 8:54:15 PM2/27/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@codablock I'd like to better understand the problems that Azure volumes are having. It sounds like some bigger infrastructure changes maybe needed to fix the issues. We are about 10 minutes away from code freeze for 1.6. While we can can get small bug fixes in during code freeze, the big changes will have to wait for 1.7. But I really want to make sure we don't miss 1.7. So how about we set up a meeting early in the 1.7 dev cycle (I'm thinking 2nd week of April), to discuss what the pain points are, propose some changes, and hopefully get them implemented in 1.7?

CC @kubernetes/sig-storage-misc


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Alexander Block

unread,
Mar 13, 2017, 5:13:28 AM3/13/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@saad-ali As I won't have time to work on Kubernetes and/or Azure in the next few month I would suggest that @colemickens and @khenidak take over the discussion and do a meeting with you if required.

@khenidak is working on Azure managed disks and as I understood many of the problems I encountered with Azure Disks and which I tried to fix with PRs like these are also fixed in his work. So maybe this PR isn't even needed anymore.

Saad Ali

unread,
Apr 5, 2017, 9:12:15 PM4/5/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

One of the items for Q2 2017 (v1.7) is improving Azure support. We should consider this PR as part of that effort.

CC @rootfs @chakri-nelluri for review

Alexander Block

unread,
Apr 6, 2017, 2:43:48 AM4/6/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@saad-ali Maybe #40603 is interesting for this as well?

Saad Ali

unread,
Apr 6, 2017, 5:17:27 PM4/6/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Ack. Tracking both PRs

Alexander Block

unread,
May 4, 2017, 6:48:44 AM5/4/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

REPLACED BY #45346

Alexander Block

unread,
May 4, 2017, 6:48:50 AM5/4/17
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Closed #40148.

smartVan

unread,
Jun 5, 2019, 2:40:38 AM6/5/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@zhonglin6666 commented on this pull request.


In pkg/controller/volume/attachdetach/reconciler/reconciler.go:

> @@ -206,16 +250,28 @@ func (rc *reconciler) reconcile() {

 			glog.V(5).Infof("Volume %q/Node %q is attached--touching.", volumeToAttach.VolumeName, volumeToAttach.NodeName)

 			rc.actualStateOfWorld.ResetDetachRequestTime(volumeToAttach.VolumeName, volumeToAttach.NodeName)

 		} else {

+			// Don't even try to start an operation if there is already one running

+			if rc.attacherDetacher.IsOperationPending(volumeToAttach.VolumeName, "") {

+				glog.V(10).Infof("Operation for volume %q is already running. Can't start attach for %q", volumeToAttach.VolumeName, volumeToAttach.NodeName)

+				continue

+			}

+

+			if rc.isMultiAttachForbidden(volumeToAttach.VolumeSpec) {

+				nodes := rc.actualStateOfWorld.GetNodesForVolume(volumeToAttach.VolumeName)

If set pv with accessMode 'ReadWriteOnce',pod with pv running on node1.
when node1 is down,schedule pod to node2,new pod waitting for attach,but old pod is still not detach if node1 is still down
isMultiAttachForbidden and GetNodeForVolume will produce
attachdetach-controller Multi-Attach error for volume "pvc-d0fde86c-8661-11e9-b873-0800271c9f15" Volume is already used by pod

Reply all
Reply to author
Forward
0 new messages