diff --git a/daemon/commands/check/checkimage.go b/daemon/commands/check/checkimage.go index a98c8b1ec1147e32cbf3300c8317b8531d736dd6..6ce7df1fa41075d4ca354a32f5ba6f6e93e2f414 100644 --- a/daemon/commands/check/checkimage.go +++ b/daemon/commands/check/checkimage.go @@ -31,7 +31,7 @@ var imageCommand = cli.Command{ return errors.New("Please provide correct image ID") } - nameSpace := "default" + nameSpace := context.GlobalString("namespace") root := context.GlobalString("root") sourceFile := root + "/io.containerd.metadata.v1.bolt/meta.db" destinationFile := "/tmp/meta_tmp.db" @@ -168,6 +168,7 @@ var imageCommand = cli.Command{ var ids []string if res := mdGetter.GetIDs(names, &ids); !res { logrus.Errorf("Fail to get id of each layer in metadata_tmp.db") + err = errors.New("Fail to get id of each layer in metadata_tmp.db") return err } logrus.Infoln("Got ids(1,2,3...) of true file stored data of layers")