-
Notifications
You must be signed in to change notification settings - Fork 2.8k
WIP: volume protection by pinning #26846
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tobwen The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Should pinned volumes require |
libpod/volume.go
Outdated
@@ -76,6 +76,9 @@ type VolumeConfig struct { | |||
StorageImageID string `json:"storageImageID,omitempty"` | |||
// MountLabel is the SELinux label to assign to mount points | |||
MountLabel string `json:"mountlabel,omitempty"` | |||
// Pinned indicates that this volume should be excluded from | |||
// system prune operations by default | |||
Pinned bool `json:"pinned,omitempty"` |
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.
Probably better to stick this in state, since it can be toggled on/off
libpod/volume.go
Outdated
return err | ||
} | ||
|
||
v.config.Pinned = pinned |
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.
Yeah, this won't work with v.config
- that's static data, never changes. You want v.state
- which is refreshed by update()
and saved by save()
I've thought about that before, but I figured we should treat it like the |
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
3 similar comments
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
see discussion in containers#23217 Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Signed-off-by: tobwen <[email protected]>
Does this PR introduce a user-facing change?
Yes.
References
Reference #26807
Reference #23217
Actions required
volume unpin
or rather usevolume pin --unpin
as supplied.Note
Those are my first steps with the Podman code - please bear with me.