Skip to content

Commit bf0d885

Browse files
committed
Fixed an issue where the kamino template creation portal was using the
incorrect VMID for the router
1 parent e4b56bc commit bf0d885

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

internal/proxmox/networking.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ func (s *ProxmoxService) GetRouterType(router VM) (string, error) {
4343
// ConfigurePodRouter configures the pod router with proper networking settings
4444
func (s *ProxmoxService) ConfigurePodRouter(podNumber int, node string, vmid int, routerType string) error {
4545
config := RouterConfig{
46-
RouterWaitTimeout: s.Config.RouterWaitTimeout,
47-
WANScriptPath: s.Config.WANScriptPath,
48-
VIPScriptPath: s.Config.VIPScriptPath,
49-
VYOSScriptPath: s.Config.VYOSScriptPath,
50-
WANIPBase: s.Config.WANIPBase,
46+
WANScriptPath: s.Config.WANScriptPath,
47+
VIPScriptPath: s.Config.VIPScriptPath,
48+
VYOSScriptPath: s.Config.VYOSScriptPath,
49+
WANIPBase: s.Config.WANIPBase,
5150
}
5251

5352
// Wait for router agent to be pingable

internal/proxmox/pools.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,15 +415,19 @@ func (s *ProxmoxService) CreateTemplatePool(creator string, name string, addRout
415415

416416
// 11. Run config scripts on router
417417
// Determine router type
418+
log.Printf("Determining router type")
418419
routerType, err := s.GetRouterType(router)
419420
if err != nil {
420421
return fmt.Errorf("failed to get router type: %v", err)
421422
}
423+
log.Printf("Router type is %s", routerType)
422424

423425
// Calculate the third octect
424426
octect := 254 - templateID
427+
log.Printf("Third octect is %d", octect)
425428

426-
err = s.ConfigurePodRouter(octect, bestNode, router.VMID, routerType)
429+
log.Printf("Configuring router")
430+
err = s.ConfigurePodRouter(octect, bestNode, routerVMID, routerType)
427431
if err != nil {
428432
return fmt.Errorf("failed to configure router for %s: %v", routerType, err)
429433
}

0 commit comments

Comments
 (0)