Skip to content

Commit

Permalink
runtime: Add identification in version for runtime-rs
Browse files Browse the repository at this point in the history
Now we are supporting two runtime/shim, the go version,
and the rust version, for debug purposes, we can
add an identification in the version info
to tell us which runtime/shim is used.

Fixes: #5806

Signed-off-by: Bin Liu <bin@hyper.sh>
  • Loading branch information
liubin committed Dec 1, 2022
1 parent 1da2d06 commit d4321ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime-rs/crates/shim/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn show_help(cmd: &OsStr) {

fn show_version(err: Option<anyhow::Error>) {
let data = format!(
r#"{} containerd shim: id: {}, version: {}, commit: {}"#,
r#"{} containerd shim (Rust): id: {}, version: {}, commit: {}"#,
config::PROJECT_NAME,
config::CONTAINERD_RUNTIME_NAME,
config::RUNTIME_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/cmd/containerd-shim-kata-v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func shimConfig(config *shimapi.Config) {
func main() {

if len(os.Args) == 2 && os.Args[1] == "--version" {
fmt.Printf("%s containerd shim: id: %q, version: %s, commit: %v\n", katautils.PROJECT, types.DefaultKataRuntimeName, katautils.VERSION, katautils.COMMIT)
fmt.Printf("%s containerd shim (Golang): id: %q, version: %s, commit: %v\n", katautils.PROJECT, types.DefaultKataRuntimeName, katautils.VERSION, katautils.COMMIT)
os.Exit(0)
}

Expand Down

0 comments on commit d4321ab

Please sign in to comment.