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

introduce new ServiceV2 API to handle guided restarts #18826

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

harshavardhana
Copy link
Member

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

introduce new ServiceV2 API to handle guided restarts

Motivation and Context

The new API now verifies any hung disks before restart/stop,
provides a 'per node' breakdown of the restart/stop results.

It also provides how many blocked syscalls are present on
the drives and what users must do about them.

Adds options to do pre-flight checks to provide information
to the user regarding any hung disks. Provides 'force' option
to forcibly attempt a restart() even with waiting syscalls
on the drives.

How to test this PR?

CI/CD tests have already been updated to use the new API. Needs
madmin-go/mc changes as well here, which I will be sending
subsequently.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

New API now verifies any hung disks before restart/stop,
provides a 'per node' break down of the restart/stop results.

Provides also how many blocked syscalls are present on the
drives and what users must do about them.

Adds options to do pre-flight checks to provide information
to the user regarding any hung disks. Provides 'force' option
to forcibly attempt a restart() even with waiting syscalls
on the drives.
@harshavardhana
Copy link
Member Author

The new changes will be

mc admin service restart local
Restart command successfully sent to `local`. Type Ctrl-C to quit or wait to follow the status of the restart process.
┌────────────────┬───────────────────────┐
│ HOST           │ STATUS                │
├────────────────┼───────────────────────┤
│ localhost:9001 │ ✔                     │
│ localhost:9002 │ ✔                     │
│ localhost:9003 │ ✔                     │
│ localhost:9004 │ peer is not reachable │
└────────────────┴───────────────────────┘

...!!!
Restarted `local` successfully in 4 seconds```

In this form 

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

One comment

cmd/admin-handlers.go Show resolved Hide resolved
Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

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

Overall, LGTM, except for a couple of minor comments.

cmd/admin-handlers.go Show resolved Hide resolved
cmd/admin-handlers.go Show resolved Hide resolved
Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit ac81f02 into minio:master Jan 19, 2024
20 checks passed
@harshavardhana harshavardhana deleted the fix-restart branch January 19, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants