Skip to content

Commit 2e34347

Browse files
committed
capi: do not exit if controller fails to extract.
Doing `logrus.Fatal` when a controller fails to be extracted means that we abort the installer process without giving it a chance to stop the capi-related processes that are still running. Let's just return an error instead and let the Installer go through the normal capi shutdown procedure.
1 parent 9ecbd30 commit 2e34347

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/clusterapi/system.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ func (c *system) runController(ctx context.Context, ct *controller) error {
463463
// If the provider is not empty, we extract it to the binaries directory.
464464
if ct.Provider != nil {
465465
if err := ct.Provider.Extract(c.lcp.BinDir); err != nil {
466-
logrus.Fatal(err)
466+
return fmt.Errorf("failed to extract provider %q: %w", ct.Name, err)
467467
}
468468
}
469469

0 commit comments

Comments
 (0)