Worker: better cleanup mechanisms (#139)

* Always Close() the Worker instance

* orchard list vms: show assigned worker for each of the VMs

* Stop the failed VMs before we schedule new VMs

To avoid violating resource constraints.

* syncOnDiskVMs: don't ignore running VMs

* Worker: show correct remote and local VM counts
This commit is contained in:
Nikolay Edigaryev
2023-09-28 19:09:43 +00:00
committed by GitHub
parent 40f58e4aee
commit 063405672f
5 changed files with 67 additions and 36 deletions
+1 -1
View File
@@ -54,10 +54,10 @@ func runDev(cmd *cobra.Command, args []string) error {
devController, devWorker, err := CreateDevControllerAndWorker(devDataDirPath,
fmt.Sprintf(":%d", netconstants.DefaultControllerPort), resources,
nil, nil)
if err != nil {
return err
}
defer devWorker.Close()
errChan := make(chan error, 2)