-
-
Notifications
You must be signed in to change notification settings - Fork 4
feat: graceful(er) server shutdown #568
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
Conversation
) * ~ * Update docs/modules/hbase/pages/getting_started/installation.adoc * Update docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc * Update docs/modules/hbase/pages/usage-guide/operations/pod-placement.adoc * Update docs/modules/hbase/pages/usage-guide/security.adoc * fix: spelling --------- Co-authored-by: Razvan-Daniel Mihai <[email protected]>
|
||
This is equivalent to executing the `bin/hbase-daemon.sh stop master` command, which internally executes `kill <master-pid>` (https://github.com/apache/hbase/blob/8382f55b15be6ae190f8d202a5e6a40af177ec76/bin/hbase-daemon.sh#L338[code]), waits for a configurable period of time (defaults to 20 minutes), and finally executes `kill -9 <master-pid>` to `SIGKILL` the master (https://github.com/apache/hbase/blob/8382f55b15be6ae190f8d202a5e6a40af177ec76/bin/hbase-common.sh#L20-L41[code]). | ||
|
||
However, there is no message in the log acknowledging the graceful shutdown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a message now? If so can you please paste the relevant lines here, similar to the example at the regionservers?
2023-10-11 12:40:42,316 INFO [main] RESTServer: ***** STOPPING service 'RESTServer' ***** | ||
---- | ||
|
||
There are two environment variables that you can add to the regionserver roles (or groups) that allow you more control over the shotdonw process: `MOVE_REGIONS_ON_SHUTDOWN` and `REGION_MOVER_OPTS`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be awesome to have this as as CR flag. Uses can still envOverride when they are not happy with our CRD.
The CRD could look something like
spec:
regionServers:
config:
gracefulShutdownTimeout: 1h
gracefulShutdownRegionMover: # mandatory, defaults to the values below (so disabled by default)
enabled: false # mandatory, defaults to false
maxThreads: 1 # mandatory, defaults to 1
ack: true # mandatory, defaults to true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree except I wouldn't want it to be mandatory to avoid a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having it optional also implies it's enabled (when defined), no need for the redundant field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mandatory with a default is de-facto optional ;)
But don't take it too literally, as all of this will go throw the Fragment and Merge macros and well.. it's complicated. Long story short: It feels optional to the uesr
Closing this in favor of #570 |
Description
part of #508
Region servers now optionally move regions away before shutting down.
Definition of Done Checklist