Skip to content

Commit

Permalink
Use ServiceUnfreezeV2, but keep old restart.
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost committed Dec 20, 2024
1 parent 122b8e8 commit c2530bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/admin-service-restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func mainAdminServiceRestart(ctx *cli.Context) error {
})
if e != nil {
// Attempt an older API server might be old
//lint:ignore SA1019 We explicitly want old API.
e = client.ServiceRestart(ctxt)

Check failure on line 273 in cmd/admin-service-restart.go

View workflow job for this annotation

GitHub Actions / vetchecks

SA1019: client.ServiceRestart is deprecated: use ServiceRestartV2 instead (staticcheck)

Check failure on line 273 in cmd/admin-service-restart.go

View workflow job for this annotation

GitHub Actions / Test on Go 1.23.x and ubuntu-latest

SA1019: client.ServiceRestart is deprecated: use ServiceRestartV2 instead (staticcheck)
}
fatalIf(probe.NewError(e), "Unable to restart the server.")
Expand Down
4 changes: 2 additions & 2 deletions cmd/admin-service-unfreeze.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func checkAdminServiceUnfreezeSyntax(ctx *cli.Context) {
}

func mainAdminServiceUnfreeze(ctx *cli.Context) error {
// Validate serivce unfreeze syntax.
// Validate service unfreeze syntax.
checkAdminServiceUnfreezeSyntax(ctx)

// Set color.
Expand All @@ -89,7 +89,7 @@ func mainAdminServiceUnfreeze(ctx *cli.Context) error {
fatalIf(err, "Unable to initialize admin connection.")

// Unfreeze the specified MinIO server
fatalIf(probe.NewError(client.ServiceUnfreeze(globalContext)), "Unable to unfreeze the server.")
fatalIf(probe.NewError(client.ServiceUnfreezeV2(globalContext)), "Unable to unfreeze the server.")

// Success..
printMsg(serviceUnfreezeCommand{Status: "success", ServerURL: aliasedURL})
Expand Down

0 comments on commit c2530bd

Please sign in to comment.