diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-02-14 17:52:49 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-02-21 10:51:42 -0500 |
commit | a3dbb7a837f0c6fe9e12aec6da3778759632f7d1 (patch) | |
tree | e532adb39652b5fa3d1263880e2587285ae4614e /libpod/state.go | |
parent | 7fdd20ae5a1ced1faceab9cb0a6e553343911a0b (diff) | |
download | podman-a3dbb7a837f0c6fe9e12aec6da3778759632f7d1.tar.gz podman-a3dbb7a837f0c6fe9e12aec6da3778759632f7d1.tar.bz2 podman-a3dbb7a837f0c6fe9e12aec6da3778759632f7d1.zip |
Add ability to rewrite pod configs in the database
Necessary for rewriting lock IDs as part of renumber.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/state.go')
-rw-r--r-- | libpod/state.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/state.go b/libpod/state.go index 42dbe9cc1..98282fc83 100644 --- a/libpod/state.go +++ b/libpod/state.go @@ -107,10 +107,19 @@ type State interface { // newer, but identical, configuration fields), or during libpod init // WHILE HOLDING THE ALIVE LOCK (to prevent other libpod instances from // being initialized). + // Most things in config can be changed by this, but container ID and + // name ABSOLUTELY CANNOT BE ALTERED. If you do so, there is a high + // potential for database corruption. // There are a lot of capital letters and conditions here, but the short // answer is this: use this only very sparingly, and only if you really // know what you're doing. RewriteContainerConfig(ctr *Container, newCfg *ContainerConfig) error + // PLEASE READ THE ABOVE DESCRIPTION BEFORE USING. + // This function is identical to RewriteContainerConfig, save for the + // fact that it is used with pods instead. + // It is subject to the same conditions as RewriteContainerConfig. + // Please do not use this unless you know what you're doing. + RewritePodConfig(pod *Pod, newCfg *PodConfig) error // Accepts full ID of pod. // If the pod given is not in the set namespace, an error will be |