Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion pkg/monitor-hw/cmd/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import (
)

func initDell(ctx context.Context) error {
return setupDell(ctx)
if err := setupDell(ctx); err != nil {
return err
}
return resetDell(ctx)
}

func setupDell(ctx context.Context) error {
Expand All @@ -19,3 +22,15 @@ func setupDell(ctx context.Context) error {
}
return nil
}

func resetDell(ctx context.Context) error {
/*
Depending on the F/W version, the option “soft” is required or an error occurs if given.
Therefore, change the option and execute twice.
This behavior has been verified at the link
https://github.com/cybozu-private/neco-ops/issues/4113
*/
well.CommandContext(ctx, "/usr/bin/racadm", "racreset", "soft").Run()
well.CommandContext(ctx, "/usr/bin/racadm", "racreset").Run()
return nil
}