mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-19 08:15:01 +00:00
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 rbd volume ConstructVolumeSpec **What this PR does / why we need it**: 1. rbd plugin.ConstructVolumeSpec() construct volume spec with fake value, cause kubelet volume manager will create two volumesInUse in node Status. 2. change plugin.GetVolumeName(), create volumeName using rbd pool instead of monitors, because monitors is a group of IPs, which makes the volumeName too long. Also, this is to fit plugin.ConstructVolumeSpec() since makeGlobalPDName only uses rbd pool and image. ``` before fix: volumesAttached: - devicePath: "" name: kubernetes.io/rbd/[xxxxxxx:6789 xxxxxxxxx:6789]:volume-9a106847-4def-4d1e-9603-4c7099b22a31 volumesInUse: - 'kubernetes.io/rbd/[]:' - kubernetes.io/rbd/[xxxxxxx:6789 xxxxxxxxx:6789]:volume-9a106847-4def-4d1e-9603-4c7099b22a31 after fix: volumesAttached: - devicePath: "" name: kubernetes.io/rbd/volumes:volume-9a106847-4def-4d1e-9603-4c7099b22a31 volumesInUse: - kubernetes.io/rbd/volumes:volume-9a106847-4def-4d1e-9603-4c7099b22a31