diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-03 09:16:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 09:16:19 -0500 |
commit | 5fd8a849491e12de3747a16c238236e23fb44593 (patch) | |
tree | 52c2097fc2831bf049e9f3d2e31eae3fe41fdc91 /libpod/state.go | |
parent | aed632cb8ca4be2a57e8159041ef31829b3d2b2c (diff) | |
parent | 43e899c2ec2a874b9cb16f42bfd1e676981353b1 (diff) | |
download | podman-5fd8a849491e12de3747a16c238236e23fb44593.tar.gz podman-5fd8a849491e12de3747a16c238236e23fb44593.tar.bz2 podman-5fd8a849491e12de3747a16c238236e23fb44593.zip |
Merge pull request #9575 from mheon/rewrite_rename
Rewrite Rename backend in a more atomic fashion
Diffstat (limited to 'libpod/state.go')
-rw-r--r-- | libpod/state.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/state.go b/libpod/state.go index 074d21740..4b711bae9 100644 --- a/libpod/state.go +++ b/libpod/state.go @@ -155,6 +155,19 @@ type State interface { // answer is this: use this only very sparingly, and only if you really // know what you're doing. RewriteContainerConfig(ctr *Container, newCfg *ContainerConfig) error + // This is a more limited version of RewriteContainerConfig, though it + // comes with the added ability to alter a container's name. In exchange + // it loses the ability to manipulate the container's locks. + // It is not intended to be as restrictive as RewriteContainerConfig, in + // that we allow it to be run while other Podman processes are running, + // and without holding the alive lock. + // Container ID and pod membership still *ABSOLUTELY CANNOT* be altered. + // Also, you cannot change a container's dependencies - shared namespace + // containers or generic dependencies - at present. This is + // theoretically possible but not yet implemented. + // If newName is not "" the container will be renamed to the new name. + // The oldName parameter is only required if newName is given. + SafeRewriteContainerConfig(ctr *Container, oldName, newName string, newCfg *ContainerConfig) error // PLEASE READ THE DESCRIPTION FOR RewriteContainerConfig BEFORE USING. // This function is identical to RewriteContainerConfig, save for the // fact that it is used with pods instead. |