Skip to content

HBASE-24286: HMaster won't become healthy after after cloning or crea… - #2114

Open
taklwu wants to merge 1 commit into
apache:masterfrom
taklwu:HBASE-24286-master
Open

HBASE-24286: HMaster won't become healthy after after cloning or crea…#2114
taklwu wants to merge 1 commit into
apache:masterfrom
taklwu:HBASE-24286-master

Conversation

@taklwu

Copy link
Copy Markdown
Contributor

…ting a new cluster pointing at the same file system

HBase currently does not handle Unknown Servers automatically and requires
users to run hbck2 scheduleRecoveries when one see unknown servers on
the HBase report UI.

This became a blocker on HBase2 adoption especially when a table wasn't
disabled before shutting down a HBase cluster on cloud or any dynamic
environment that hostname may change frequently. Once the cluster restarts,
hbase:meta will be keeping the old hostname/IPs for the previous cluster,
and those region servers became Unknown Servers and will never be recycled.

Our fix here is to trigger a repair immediately after the CatalogJanitor
figured out any Unknown Servers with submitting a HBCKServerCrashProcedure
such that regions on Unknown Server can be reassigned to other online
servers.

…ting a new cluster pointing at the same file system
HBase currently does not handle `Unknown Servers` automatically and requires
users to run hbck2 `scheduleRecoveries` when one see unknown servers on
the HBase report UI.
This became a blocker on HBase2 adoption especially when a table wasn't
disabled before shutting down a HBase cluster on cloud or any dynamic
environment that hostname may change frequently. Once the cluster restarts,
hbase:meta will be keeping the old hostname/IPs for the previous cluster,
and those region servers became `Unknown Servers` and will never be recycled.
Our fix here is to trigger a repair immediately after the CatalogJanitor
figured out any `Unknown Servers` with submitting a HBCKServerCrashProcedure
such that regions on `Unknown Server ` can be reassigned to other online
servers.

@joshelserjoshelser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice test to accompany this.

While I think the CatalogJanitor approach is probably an effective solution, I wonder if there's a "faster" solution we could do.

The main question is, when we don't have ZooKeeper telling us that a RegionServer has died, how can we be certain that a RegionServer won't "come back"? If we get into a situation where data was still hosted on a RegionServer we thought was dead, we would double-assign the region and that'd be a big bug.

Any thoughts on how to try to minimize the chance of us incorrectly marking a RegionServer as dead?

if (!this.lastReport.isEmpty()) {
LOG.warn(this.lastReport.toString());
// expires unknown servers
repairUnknownServers();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess not an issue for master (which doesn't have the separate namespace table), but elsewhere do we still have hbase.master.namespace.init.timeout setting an upper-bound on how long we wait for hbase:namespace to get assigned? Thinking that, waiting for CatalogJanitor to run, will be a pretty "slow" solution (up to 5min wait), and we may have a master crash if the ns init timeout is 5 mins as well as the catalog janitor's interval.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 36sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall3m 50smaster passed
+1 💚checkstyle1m 6smaster passed
+1 💚spotbugs2m 5smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 28sthe patch passed
+1 💚checkstyle1m 5sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 20sPatch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚spotbugs2m 48sthe patch passed
_ Other Tests _
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
35m 41s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#2114
JIRA IssueHBASE-24286
Optional Testsdupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
unameLinux b0c22b5b487c 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f35c5ea
Max. process+thread count94 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 37sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 52smaster passed
+1 💚compile0m 58smaster passed
+1 💚shadedjars5m 35sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 30sthe patch passed
+1 💚compile0m 55sthe patch passed
+1 💚javac0m 55sthe patch passed
+1 💚shadedjars5m 32spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 38sthe patch passed
_ Other Tests _
-1 ❌unit143m 31shbase-server in the patch failed.
167m 59s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#2114
JIRA IssueHBASE-24286
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 68b843a4f0a7 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f35c5ea
Default Java1.8.0_232
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/testReport/
Max. process+thread count4659 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 18sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 50smaster passed
+1 💚compile1m 19smaster passed
+1 💚shadedjars7m 6sbranch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 58shbase-server in master failed.
_ Patch Compile Tests _
+1 💚mvninstall5m 10sthe patch passed
+1 💚compile1m 29sthe patch passed
+1 💚javac1m 29sthe patch passed
+1 💚shadedjars6m 51spatch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 44shbase-server in the patch failed.
_ Other Tests _
-1 ❌unit206m 34shbase-server in the patch failed.
238m 7s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#2114
JIRA IssueHBASE-24286
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 0742f5feebba 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f35c5ea
Default Java2020-01-14
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/testReport/
Max. process+thread count3856 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2114/1/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@petersomogyi

Copy link
Copy Markdown
Contributor

I've made some testing recently using this patch to be able to start an HBase cluster on a pre-existing HBase root directory. Currently I have to use HBCK2 recoverUnknown or SCPs but this automates the startup procedure. Based on my testing the patch works well and HBase successfully reassign the regions that are present in hbase:meta table with different hostnames (a.k.a unknown servers).

Since for some installations it might not be required to do this I'm suggesting to hide this behind a feature flag.

@joshelser

Copy link
Copy Markdown
Member

I'm suggesting to hide this behind a feature flag

Makes sense to me. I think that addresses some of the other concerns from @Apache9 (mentioning him to make sure that's OK with him).

If @taklwu is OK with it (and can grant you edit perms), maybe you can update this PR with your changes? Or, close this and open a new one with your modifications.

@z-york

Copy link
Copy Markdown
Contributor

@petersomogyi It's probably worth pinging on #2113 and subsequent PRs as that's where most of the conversation happened. I thought Stephen had offered to put this behind a config before, but maybe I'm mistaken. Anyways, it's worth revisting this issue anyways IMO.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@taklwu@Apache-HBase@petersomogyi@joshelser@z-york