-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CSI: fix struct copying errors #9239
Conversation
c440d9f
to
852971a
Compare
852971a
to
849754c
Compare
350e51c
to
acbdc57
Compare
acbdc57
to
8915dd0
Compare
8915dd0
to
4de0f79
Compare
// denormalize. | ||
for allocID := range v.ReadAllocs { | ||
v.ReadAllocs[allocID] = nil | ||
} |
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.
Double checking assumptions: v.ReadAllocs
contain non-nil pointers so we must set them to nil here?
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.
Correct!
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #8949 #9230
The
CSIVolume
struct "denormalizes" allocations when it's first queried from the state store. TheCSIVolumeByID
method on the state store copies the volume before denormalizing so that we don't end up with unexpected changes. The copying has some subtle bugs that meant thatAllocations
(as well asTopologies
andMountOptions
) were not getting copied when expected.Also, ensure we never write allocations attached to volumes to the state store during claims.