logging: Add cid logging to update command

PR #468 neglected to update the `update` command.

Fixes #519.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2018-07-27 14:46:43 +01:00
parent 3d5ed6669c
commit 3323c087c5

View File

@ -132,6 +132,10 @@ other options are ignored.
}
containerID := context.Args().First()
kataLog = kataLog.WithField("container", containerID)
setExternalLoggers(kataLog)
status, sandboxID, err := getExistingContainerInfo(containerID)
if err != nil {
return err
@ -144,6 +148,8 @@ other options are ignored.
"sandbox": sandboxID,
})
setExternalLoggers(kataLog)
// container MUST be running
if status.State.State != vc.StateRunning {
return fmt.Errorf("Container %s is not running", containerID)