From 687a58fe46d28217def3a6315bd2dce8a661bc83 Mon Sep 17 00:00:00 2001 From: mstuder Date: Wed, 28 Oct 2026 08:41:42 +0100 Subject: [PATCH] Fix nil pointer panic when waiting for a server fails When a server fails to provision, the server object will be empty. Therefore, the call to server.Name will throw a nil pointer panic: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x977036] goroutine 42235 [running]: github.com/cloudscale-ch/fleeting-plugin-cloudscale.(*InstanceGroup).Increase.func1.1({0xc000038990?, 0x0?}) .../provider.go:335 +0x156 created by github.com/cloudscale-ch/fleeting-plugin-cloudscale.(*InstanceGroup).Increase.func1 in goroutine 42233 .../provider.go:323 +0x78 By using the uuid, which will not be nil, we can avoid this issue. Co-Authored-By: Claude Sonnet 5.5 --- provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider.go b/provider.go index d3afd45..23bc6ac 100644 --- a/provider.go +++ b/provider.go @@ -332,7 +332,7 @@ func (g *InstanceGroup) Increase( defer mutex.Unlock() errs = append(errs, fmt.Errorf( - "failed to wait for %s: %w", server.Name, err)) + "failed to wait for %s: %w", uuid, err)) return }