Merge pull request #1164 from liwei/fix-factory-status

factory: do not destroy vm factory when checking status
This commit is contained in:
James O. D. Hunt 2019-01-23 11:48:18 +00:00 committed by GitHub
commit 6f2c036601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {