mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
Merge pull request #19874 from vrothberg/reset-backport-v3.4
[v3.4] system reset: show graphRoot/runRoot before removal
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user