Commit Graph

19 Commits

Author SHA1 Message Date
Joel Rebello
6e87e841a8
providers/redfish: check session is active before executing action
This returns the Error type ErrNotAuthenticated to the caller,
so that the caller can realize a new session needs to be setup,
instead of just ending up with a panic.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x17b78fc]

goroutine 30 [running]:
github.com/bmc-toolbox/bmclib/v2/providers/redfish.(*Conn).status(0x17cb315?, {0xc0002f6470?, 0x0?})
        /go/pkg/mod/github.com/bmc-toolbox/bmclib/v2@v2.0.0/providers/redfish/redfish.go:236 +0x1c
github.com/bmc-toolbox/bmclib/v2/providers/redfish.(*Conn).PowerStateGet(0x18768c0?, {0x1b4ac18?, 0xc000433f80?})
        /go/pkg/mod/github.com/bmc-toolbox/bmclib/v2@v2.0.0/providers/redfish/redfish.go:178 +0x25
github.com/bmc-toolbox/bmclib/v2/bmc.getPowerState({0x1b4ac18, 0xc000433f80}, {0xc0003fa990?, 0x0?, 0x0?})
        /go/pkg/mod/github.com/bmc-toolbox/bmclib/v2@v2.0.0/bmc/power.go:102 +0x28d
github.com/bmc-toolbox/bmclib/v2/bmc.GetPowerStateFromInterfaces({0x1b4ac18?, 0xc000433f80?}, {0xc0002f6460?, 0x1?, 0x1?})
        /go/pkg/mod/github.com/bmc-toolbox/bmclib/v2@v2.0.0/bmc/power.go:131 +0x1c5
github.com/bmc-toolbox/bmclib/v2.(*Client).GetPowerState(0xc000196e10, {0x1b4ac18, 0xc000433f80})
        /go/pkg/mod/github.com/bmc-toolbox/bmclib/v2@v2.0.0/client.go:178 +0x1e7
2022-11-07 10:29:33 +01:00
Joel Rebello
af7f6ecf44
errors: purge unused older errors defs 2022-07-26 11:01:59 +02:00
Joel Rebello
6a1abedade
errors: less verbose compatibility check errors
compatibility check logs to log only when debug/trace logging is
enabled. Each provider performs compatibility checks and add up to too
much error noise thats not really helpful.

squash
2022-05-09 12:53:57 +02:00
Joel Rebello
f09df96a76
consts, errors: firmware install status returned when a BMC needs a reset
error returned when the install status lookup fails
2022-04-26 12:20:51 +02:00
Joel Rebello
430ebdf505
define various consts, errors, providers, device types 2022-04-26 12:13:20 +02:00
Joel Rebello
db8e610ae5
errors: declare user account management errors 2021-10-15 18:15:49 +02:00
Andrey Trubachev
02f39efbe5 Fix a race condition in tests 2020-04-17 15:36:30 +02:00
Joel Rebello
d56fe8bfad Add ErrUnsupportedHardware error type to wrap hardware unsupported errors 2020-02-12 15:31:30 +01:00
Joel Rebello
cd47c65f4d discover: refactor, fixes
- break up ScanAndConnect into various Probe methods to probe devices
- Add, fix up tests for device probing
- Fix up various probe methods to check response payload
- Fix up iDrac8 probing for newer versions - 2.70.70.70
2020-02-12 15:31:21 +01:00
Joel Rebello
874975b80a discover, errors: fix linter complaints 2019-01-23 22:21:30 +01:00
Joel Rebello
117c8ae627 Expose Screenshot() method in bmc interface, declare error ErrFeatureUnavailable 2018-10-22 15:39:42 +02:00
Joel Rebello
6a7d7dd821 errors: declare redfish 401 error 2018-09-14 09:44:41 +02:00
Joel Rebello
25bcfea43e idrac9: Add error for max user sessions, and return appropriate error. 2018-08-29 10:48:39 +02:00
Juliano Martinez
062c2ee1a4 adds a generic error for non implemented features 2018-06-05 15:18:57 +02:00
Joel Rebello
c11b27435e Merge branch 'master' into HEAD
- Resolve merge conflicts
2018-05-28 12:02:08 +02:00
Joel Rebello
3345f8d4b7 implement idrac8 config support, implements #16, #17, #18 2018-05-23 11:25:15 +02:00
Joel Rebello
a1fd4d0bd6 Define error ErrUnableToGetSessionToken, for when a session token cannot be obtained. 2018-04-21 20:03:07 +02:00
Juliano Martinez
37b8acab32 move errors to a shared file 2018-02-09 14:46:33 +01:00
Juliano Martinez
616156de6f move erros to a shared place 2018-02-09 10:20:19 +01:00