Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS-1833 #41

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/metal-toolbox/bioscfg
go 1.23.1

require (
github.com/bmc-toolbox/bmclib/v2 v2.3.4
github.com/bmc-toolbox/bmclib/v2 v2.3.5-0.20241111155613-31918a066b74
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not cut a release of bmclib?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just dont want to deal with the same stuff as last time. I made sure to pull this commit from main, instead of the branch, so this wont result in issues with the commit no longer existing.

github.com/bombsimon/logrusr/v4 v4.1.0
github.com/coreos/go-oidc/v3 v3.11.0
github.com/equinix-labs/otel-init-go v0.0.9
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bmc-toolbox/bmclib/v2 v2.3.4 h1:ihCC9jH8g5Racg4zy+lWpjt7vRt2aWzit3LEL1DiS7k=
github.com/bmc-toolbox/bmclib/v2 v2.3.4/go.mod h1:t8If/0fHQTRIK/yKDk2H3SgthDNNj+7z2aeftDFRFrU=
github.com/bmc-toolbox/bmclib/v2 v2.3.5-0.20241111155613-31918a066b74 h1:nrx38H86FUyxumFkPPR06x76v8tlHwVcMwWKPWYaWiw=
github.com/bmc-toolbox/bmclib/v2 v2.3.5-0.20241111155613-31918a066b74/go.mod h1:t8If/0fHQTRIK/yKDk2H3SgthDNNj+7z2aeftDFRFrU=
github.com/bmc-toolbox/common v0.0.0-20240926143744-8c478be881d7 h1:Xe6j3oMwe82buwBwEpok9wr+v21Io59pqMTZ5rKRVn8=
github.com/bmc-toolbox/common v0.0.0-20240926143744-8c478be881d7/go.mod h1:Cdnkm+edb6C0pVkyCrwh3JTXAe0iUF9diDG/DztPI9I=
github.com/bombsimon/logrusr/v2 v2.0.1 h1:1VgxVNQMCvjirZIYaT9JYn6sAVGVEcNtRE0y4mvaOAM=
Expand Down
8 changes: 5 additions & 3 deletions internal/bioscfg/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ func (th *TaskHandler) HandleTask(ctx context.Context, genTask *rctypes.Task[any

err = th.bmcClient.Open(ctx)
if err != nil {
th.logger.WithError(err).Error("bmc connection failed to connect")
return err
return th.failedWithError(ctx, "bmc connection failed to connect", err)
}
defer func() {
if err := th.bmcClient.Close(ctx); err != nil {
th.logger.WithError(err).Error("bmc connection close error")
err := th.failedWithError(ctx, "bmc connection close error", err)
if err != nil {
th.logger.WithError(err).Error("bmc connection close error, and then failed to set condition status to failed")
}
}
}()

Expand Down
8 changes: 1 addition & 7 deletions internal/store/bmc/bmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,10 @@ func newBmclibClient(asset *model.Asset, l *logrus.Entry) *bmclib.Client {
)

bmcClient.Registry.Drivers = bmcClient.Registry.Supports(
providers.FeatureBmcReset,
providers.FeatureBootDeviceSet,
providers.FeaturePowerSet,
providers.FeaturePowerState,
providers.FeatureResetBiosConfiguration,
providers.FeatureSetBiosConfiguration,
providers.FeatureSetBiosConfigurationFromFile,
)

// NOTE: remove the .Using("redfish") before this ends up in prod
// this is kept here since ipmitool doesn't work well in the docker sandbox env.
return bmcClient.Using("redfish")
return bmcClient
}
Loading