tinkerbell / pbnj

Service for interacting with BMCs
Apache License 2.0
109 stars 37 forks source link

Add support for terminating active SOL sessions #156

Closed zevweiss closed 10 months ago

zevweiss commented 11 months ago

Description

These patches add a DeactivateSOL request to the grpc API, which terminates an active SOL session for a given server using the method of the same name recently added to bmclib.

Why is this needed

Active SOL sessions may at times need to be forcefully ended so as to enforce proper access control.

How Has This Been Tested?

I started an an SOL session through a local BMC via ipmitool sol activate and a pbnj service via go run main.go server. Upon using evans to call the DeactivateSOL method, I observed that the SOL session was successfully terminated.

How are existing users impacted? What migration steps/scripts do we need?

There should be no impact to existing users, as no existing behavior is changed.

Checklist:

I have:

codecov[bot] commented 10 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (5660359) 81.87% compared to head (ed39ec9) 82.29%.

Files Patch % Lines
grpc/rpc/bmc.go 91.30% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #156 +/- ## ========================================== + Coverage 81.87% 82.29% +0.42% ========================================== Files 9 9 Lines 491 514 +23 ========================================== + Hits 402 423 +21 - Misses 75 76 +1 - Partials 14 15 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

zevweiss commented 10 months ago

Updated to use new 2.2.1 tag of bmclib instead of a commit hash.