mirror of
https://github.com/containers/podman.git
synced 2025-11-30 10:07:33 +08:00
Add podman system check for checking storage consistency
Add a `podman system check` that performs consistency checks on local storage, optionally removing damaged items so that they can be recreated. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
@@ -25,6 +25,39 @@ func (s *APIServer) registerSystemHandlers(r *mux.Router) error {
|
||||
r.Handle(VersionedPath("/system/df"), s.APIHandler(compat.GetDiskUsage)).Methods(http.MethodGet)
|
||||
// Added non version path to URI to support docker non versioned paths
|
||||
r.Handle("/system/df", s.APIHandler(compat.GetDiskUsage)).Methods(http.MethodGet)
|
||||
// swagger:operation POST /libpod/system/check libpod SystemCheckLibpod
|
||||
// ---
|
||||
// tags:
|
||||
// - system
|
||||
// summary: Performs consistency checks on storage, optionally removing items which fail checks
|
||||
// parameters:
|
||||
// - in: query
|
||||
// name: quick
|
||||
// type: boolean
|
||||
// description: Skip time-consuming checks
|
||||
// - in: query
|
||||
// name: repair
|
||||
// type: boolean
|
||||
// description: Remove inconsistent images
|
||||
// - in: query
|
||||
// name: repair_lossy
|
||||
// type: boolean
|
||||
// description: Remove inconsistent containers and images
|
||||
// - in: query
|
||||
// name: unreferenced_layer_max_age
|
||||
// type: string
|
||||
// description: Maximum allowed age of unreferenced layers
|
||||
// default: 24h0m0s
|
||||
// produces:
|
||||
// - application/json
|
||||
// responses:
|
||||
// 200:
|
||||
// $ref: '#/responses/systemCheckResponse'
|
||||
// 400:
|
||||
// $ref: "#/responses/badParamError"
|
||||
// 500:
|
||||
// $ref: "#/responses/internalError"
|
||||
r.Handle(VersionedPath("/libpod/system/check"), s.APIHandler(libpod.SystemCheck)).Methods(http.MethodPost)
|
||||
// swagger:operation POST /libpod/system/prune libpod SystemPruneLibpod
|
||||
// ---
|
||||
// tags:
|
||||
|
||||
Reference in New Issue
Block a user