mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 12:06:49 +00:00
factory: do not destroy vm factory when checking status
Fixes: #1163 Signed-off-by: Wei Li <liwei@anbutu.com>
This commit is contained in:
parent
5f7fcd7730
commit
d78a62da87
@ -133,11 +133,10 @@ var statusFactoryCommand = cli.Command{
|
||||
},
|
||||
}
|
||||
kataLog.WithField("factory", factoryConfig).Info("load vm factory")
|
||||
f, err := vf.NewFactory(ctx, factoryConfig, true)
|
||||
_, err := vf.NewFactory(ctx, factoryConfig, true)
|
||||
if err != nil {
|
||||
fmt.Fprintln(defaultOutputFile, "vm factory is off")
|
||||
} else {
|
||||
f.CloseFactory(ctx)
|
||||
fmt.Fprintln(defaultOutputFile, "vm factory is on")
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user