Skip to content

Commit

Permalink
create bmc superuser right before waiting for upcoming of all interfa…
Browse files Browse the repository at this point in the history
…ces (#44)
  • Loading branch information
Sandro Koll authored Mar 5, 2021
1 parent 41f8569 commit 872e9b3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ func Run(spec *Specification, hal hal.InBand) (*event.EventEmitter, error) {

hammer.Spec.ConsolePassword = password.Generate(16)

err = hammer.createBmcSuperuser()
if err != nil {
log.Error("failed to update bmc superuser password", "error", err)
return eventEmitter, err
}

n := &network.Network{
MachineUUID: spec.MachineUUID,
IPAddress: spec.IP,
Expand Down Expand Up @@ -116,12 +122,6 @@ func Run(spec *Specification, hal hal.InBand) (*event.EventEmitter, error) {
}
hammer.GrpcClient = grpcClient

err = hammer.createBmcSuperuser()
if err != nil {
log.Error("failed to update bmc superuser password", "error", err)
return eventEmitter, err
}

m, err := hammer.fetchMachine(spec.MachineUUID)
if err == nil && m != nil && m.Allocation != nil && m.Allocation.Reinstall != nil && *m.Allocation.Reinstall {
primaryDiskWiped := false
Expand Down

0 comments on commit 872e9b3

Please sign in to comment.