Skip to content

Commit f05d68c

Browse files
authored
Change default value for dfs.ha.nn.not-become-active-in-safemode to false (#458)
* Change default value for dfs.ha.nn.not-become-active-in-safemode from true to false to be in line with the Hadoop default value. fixes #264 * Fix wrong link and extra whitespace. * Changed link to refer to the PR not the issue.
1 parent ccb2106 commit f05d68c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111
### Changed
1212

1313
- `operator-rs` `0.56.1` -> `0.57.0` ([#433]).
14+
- Change default value of `dfs.ha.nn.not-become-active-in-safemode` from `true` to `false` ([#458]).
1415

1516
### Fixed
1617

@@ -19,6 +20,7 @@ All notable changes to this project will be documented in this file.
1920

2021
[#433]: https://github.com/stackabletech/hdfs-operator/pull/433
2122
[#451]: https://github.com/stackabletech/hdfs-operator/pull/451
23+
[#458]: https://github.com/stackabletech/hdfs-operator/pull/458
2224

2325
## [23.11.0] - 2023-11-24
2426

rust/operator-binary/src/hdfs_controller.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,15 @@ fn rolegroup_config_map(
494494
// IMPORTANT: these folders must be under the volume mount point, otherwise they will not
495495
// be formatted by the namenode, or used by the other services.
496496
// See also: https://github.com/apache-spark-on-k8s/kubernetes-HDFS/commit/aef9586ecc8551ca0f0a468c3b917d8c38f494a0
497+
//
498+
// Notes on configuration choices
499+
// ===============================
500+
// We used to set `dfs.ha.nn.not-become-active-in-safemode` to true here due to
501+
// badly worded HDFS documentation:
502+
// https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithNFS.html
503+
// This caused a deadlock with no namenode becoming active during a startup after
504+
// HDFS was completely down for a while.
505+
497506
hdfs_site_xml = HdfsSiteConfigBuilder::new(hdfs_name.to_string())
498507
.dfs_namenode_name_dir()
499508
.dfs_datanode_data_dir(merged_config.data_node_resources().map(|r| r.storage))
@@ -508,7 +517,6 @@ fn rolegroup_config_map(
508517
.dfs_client_failover_proxy_provider()
509518
.security_config(hdfs)
510519
.add("dfs.ha.fencing.methods", "shell(/bin/true)")
511-
.add("dfs.ha.nn.not-become-active-in-safemode", "true")
512520
.add("dfs.ha.automatic-failover.enabled", "true")
513521
.add("dfs.ha.namenode.id", "${env.POD_NAME}")
514522
// the extend with config must come last in order to have overrides working!!!

0 commit comments

Comments
 (0)