Skip to content

Commit

Permalink
Move warm VM log statement
Browse files Browse the repository at this point in the history
  • Loading branch information
kthomas committed Feb 8, 2024
1 parent debaedc commit 8d662cd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions internal/node/machine_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,12 @@ func (m *MachineManager) Start() {
}

go m.awaitHandshake(vm.vmmID)
m.log.Info("Adding new VM to warm pool", slog.Any("ip", vm.ip), slog.String("vmid", vm.vmmID))

m.allVMs[vm.vmmID] = vm
m.t.vmCounter.Add(m.ctx, 1)

// If the pool is full, this line will block until a slot is available.
m.warmVMs <- vm
m.log.Info("Adding new VM to warm pool", slog.Any("ip", vm.ip), slog.String("vmid", vm.vmmID))
m.warmVMs <- vm // If the pool is full, this line will block until a slot is available.
}
}
}
Expand Down Expand Up @@ -408,4 +407,3 @@ func (m *MachineManager) publishMachineStopped(vm *runningFirecracker) error {
func (m *MachineManager) stopping() bool {
return (atomic.LoadUint32(&m.closing) > 0)
}

1 change: 0 additions & 1 deletion internal/node/nodeproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ func (m *MachineManagerProxy) VMs() map[string]*runningFirecracker {
func (m *MachineManagerProxy) PoolVMs() chan *runningFirecracker {
return m.m.warmVMs
}

1 change: 0 additions & 1 deletion internal/node/running_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,3 @@ func getSocketPath(vmmID string) string {

return filepath.Join(dir, filename)
}

0 comments on commit 8d662cd

Please sign in to comment.