mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #64271 from xiaoxubeii/fix-64119
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix #64119 RBD volumes cannot be mapped read only to more than 1 container **What this PR does / why we need it**: RBD volumes cannot be mapped read only to more than 1 container. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #64119 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
6e97339d1f
@ -329,6 +329,7 @@ func TestPlugin(t *testing.T) {
|
|||||||
RBDPool: "pool1",
|
RBDPool: "pool1",
|
||||||
RBDImage: "image1",
|
RBDImage: "image1",
|
||||||
FSType: "ext4",
|
FSType: "ext4",
|
||||||
|
ReadOnly: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
@ -399,6 +399,10 @@ func (util *RBDUtil) AttachDisk(b rbdMounter) (string, error) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// ReadOnly rbd volume should not check rbd status of being used to
|
||||||
|
// support mounted as read-only by multiple consumers simultaneously.
|
||||||
|
needValidUsed = !b.rbd.ReadOnly
|
||||||
}
|
}
|
||||||
err := wait.ExponentialBackoff(backoff, func() (bool, error) {
|
err := wait.ExponentialBackoff(backoff, func() (bool, error) {
|
||||||
used, rbdOutput, err := util.rbdStatus(&b)
|
used, rbdOutput, err := util.rbdStatus(&b)
|
||||||
|
Loading…
Reference in New Issue
Block a user