-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add bundle.go to verify a bundle #10
Conversation
Signed-off-by: liangchenye <[email protected]>
} | ||
|
||
if _, ok := rmps[mps[index].Name]; !ok { | ||
logrus.Fatalf("%s in config/mount is not exist in runtime/mount", mps[index].Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/is/does
Signed-off-by: liangchenye <[email protected]>
Updated, Thanks! |
logrus.Fatal(err) | ||
} else { | ||
if spec.Platform.OS != "linux" { | ||
logrus.Fatalf("The operation system '%s' of the bundle is not support yet.", spec.Platform.OS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove The
Signed-off-by: liangchenye <[email protected]>
@@ -14,6 +14,7 @@ VERSION: | |||
|
|||
COMMANDS: | |||
generate generate a OCI spec file | |||
bundleValidate verify if a bundle was valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/was/is
Signed-off-by: liangchenye <[email protected]>
Thanks! I will test this out today. |
} | ||
|
||
bundleValidate(spec, runtime, path.Join(inputPath, "rootfs")) | ||
logrus.Infof("Bundle test succeeded.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/test/validation
logrus.Fatal(err) | ||
} | ||
|
||
bundleValidate(spec, runtime, path.Join(inputPath, "rootfs")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be assumed. This should be read from root/path in config.json
Also, I tried testing this with rootfs.tar.gz in this repo and it doesn't work. Could you modify the rootfs so that bundleValidate works with it? |
Re: updating rootfs.tar.gz, see #14. |
Signed-off-by: liangchenye <[email protected]>
close and PR to opencontainers/ocitools |
Signed-off-by: liangchenye [email protected]