Skip to content

Commit

Permalink
fix: ignore BMC info if username or password are not set
Browse files Browse the repository at this point in the history
This happens during initial discovery of the server, when first BMC IP
is set, but username and password are not set.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
(cherry picked from commit 229dae1)
  • Loading branch information
smira committed Dec 16, 2021
1 parent d056e9c commit cdb8f5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/sidero-controller-manager/internal/power/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func NewManagementClient(ctx context.Context, client client.Client, spec *v1alph
}
}

if bmcSpec.User == "" || bmcSpec.Pass == "" {
// no username and password, BMC information is not fully populated yet
return fakeClient{}, nil
}

if bmcSpec.Interface == "" {
bmcSpec.Interface = "lanplus"
}
Expand Down

0 comments on commit cdb8f5d

Please sign in to comment.