Skip to content

Commit c50426d

Browse files
Merge pull request #17327 from sjenning/dockergc-overlay-only
Automatic merge from submit-queue (batch tested with PRs 17327, 17281). dockergc: storage driver support limited to overlay2 document and enforce that overlay2 is the only currently supported docker storage driver for this command xref https://bugzilla.redhat.com/show_bug.cgi?id=1511400 @derekwaynecarr
2 parents b9af846 + fe30ee1 commit c50426d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/oc/experimental/dockergc/dockergc.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ var (
5656
If the OpenShift node is configured to use a container runtime other than docker,
5757
docker will still be used to do builds. However OpenShift itself may not
5858
manage the docker storage since it is not the container runtime for pods.
59-
60-
This utility allows garbage collection to do be done on the docker storage.`)
59+
60+
This utility allows garbage collection to do be done on the docker storage.
61+
62+
Only the overlay2 docker storage driver is supported at this time.`)
6163

6264
dockerGC_example = templates.Examples(`
6365
# Perform garbage collection with the default settings
@@ -252,6 +254,9 @@ func Run(f *clientcmd.Factory, options *dockerGCConfigCmdOptions, cmd *cobra.Com
252254
if err != nil {
253255
return err
254256
}
257+
if info.Driver != "overlay2" {
258+
return fmt.Errorf("%s storage driver is not supported", info.Driver)
259+
}
255260
rootDir := info.DockerRootDir
256261
if rootDir == "" {
257262
return fmt.Errorf("unable to determine docker root directory")

0 commit comments

Comments
 (0)