Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/proxmox/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@ func (s *ProxmoxService) ConfigurePodRouter(podNumber int, node string, vmid int
WANIPBase: s.Config.WANIPBase,
}

// Skip if no agent is configured on the router
vmconfig, err := s.getVMConfig(node, vmid)
if err != nil{
return fmt.Errorf("failed to detect router agent: %v", err)
}
if vmconfig.Agent == ""{
log.Printf("No agent detected for VM %d, skipping config", vmid)
return nil
}

log.Printf("Detected router agent for VM %d", vmid)

// Wait for router agent to be pingable
statusReq := tools.ProxmoxAPIRequest{
Method: "POST",
Expand Down
1 change: 1 addition & 0 deletions internal/proxmox/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type VirtualResourceConfig struct {
Lock string `json:"lock"`
Net0 string `json:"net0"`
Net1 string `json:"net1,omitempty"`
Agent string `json:"agent"`
}

type VirtualResourceStatus struct {
Expand Down
Loading