mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-08 00:44:25 +01:00
Merge pull request #1521 from jodh-intel/verify-cid
Verify container ID
This commit is contained in:
@@ -87,9 +87,11 @@ var kataExecCLICommand = cli.Command{
|
||||
span.SetAttributes(label.Key("port").Uint64(port))
|
||||
|
||||
sandboxID := context.Args().Get(0)
|
||||
if sandboxID == "" {
|
||||
return fmt.Errorf("SandboxID not found")
|
||||
|
||||
if err := katautils.VerifyContainerID(sandboxID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
span.SetAttributes(label.Key("sandbox").String(sandboxID))
|
||||
|
||||
conn, err := getConn(namespace, sandboxID, port)
|
||||
|
||||
Reference in New Issue
Block a user