Merge pull request #19874 from vrothberg/reset-backport-v3.4

[v3.4] system reset: show graphRoot/runRoot before removal
This commit is contained in:
OpenShift Merge Robot
2023-09-06 16:04:18 +02:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
//go:build !remote
// +build !remote
package system
@@ -61,6 +62,12 @@ WARNING! This will remove:
- all pods
- all images
- all build cache`)
info, _ := registry.ContainerEngine().Info(registry.Context())
// lets not hard fail in case of an error
if info != nil {
fmt.Printf(" - the graphRoot directory: %q\n", info.Store.GraphRoot)
fmt.Printf(" - the runRoot directory: %q\n", info.Store.RunRoot)
}
if len(listCtn) > 0 {
fmt.Println(`WARNING! The following external containers will be purged:`)
// print first 12 characters of ID and first configured name alias

View File

@@ -12,6 +12,8 @@ podman\-system\-reset - Reset storage back to initial state
This command must be run **before** changing any of the following fields in the
`containers.conf` or `storage.conf` files: `driver`, `static_dir`, `tmp_dir`
or `volume_path`.
It also removes the configured graphRoot and runRoot directories. Make sure
these are not set to some important directory.
`podman system reset` reads the current configuration and attempts to remove all
of the relevant configurations. If the administrator modified the configuration files first,