Skip to content

Commit 101f50b

Browse files
authored
Fix bug where the configuration of the hbaseRootdir at the role level is ignored (#584)
* do not default in compute_files, default via product config * adapted changelog * regenerated charts * remove HBASE_ROOT_DIR_DEFAULT * adapt comments * regernated charts
1 parent 7e65cbc commit 101f50b

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Reduce CRD size from `1.4MB` to `96KB` by accepting arbitrary YAML input instead of the underlying schema for the following fields ([#548]):
1313
- `podOverrides`
1414
- `affinity`
15+
- Fix bug where the configuration of the `hbaseRootdir` at the role level is ignored ([#584]).
1516

1617
### Fixed
1718

@@ -28,6 +29,7 @@
2829
[#556]: https://github.com/stackabletech/hbase-operator/pull/556
2930
[#558]: https://github.com/stackabletech/hbase-operator/pull/558
3031
[#574]: https://github.com/stackabletech/hbase-operator/pull/574
32+
[#584]: https://github.com/stackabletech/hbase-operator/pull/584
3133

3234
## [24.7.0] - 2024-07-24
3335

deploy/config-spec/properties.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ properties:
213213
type: "string"
214214
defaultValues:
215215
- fromVersion: "0.0.0"
216-
value: "${hbase.tmp.dir}/hbase"
216+
value: "/hbase"
217217
roles:
218218
- name: "master"
219-
required: false
219+
required: true
220220
- name: "regionserver"
221-
required: false
221+
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
222222
- name: "restserver"
223-
required: false
223+
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
224224
asOfVersion: "0.0.0"
225225
description: "The directory shared by region servers and into which HBase persists. The URL should be 'fully-qualified' to include the filesystem scheme. For example, to specify the HDFS directory '/hbase' where the HDFS instance's namenode is running at namenode.example.org on port 9000, set this value to: hdfs://namenode.example.org:9000/hbase. By default, we write to whatever ${hbase.tmp.dir} is set too -- usually /tmp -- so change this configuration or else all data will be lost on machine restart."
226226

deploy/helm/hbase-operator/configs/properties.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ properties:
213213
type: "string"
214214
defaultValues:
215215
- fromVersion: "0.0.0"
216-
value: "${hbase.tmp.dir}/hbase"
216+
value: "/hbase"
217217
roles:
218218
- name: "master"
219-
required: false
219+
required: true
220220
- name: "regionserver"
221-
required: false
221+
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
222222
- name: "restserver"
223-
required: false
223+
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
224224
asOfVersion: "0.0.0"
225225
description: "The directory shared by region servers and into which HBase persists. The URL should be 'fully-qualified' to include the filesystem scheme. For example, to specify the HDFS directory '/hbase' where the HDFS instance's namenode is running at namenode.example.org on port 9000, set this value to: hdfs://namenode.example.org:9000/hbase. By default, we write to whatever ${hbase.tmp.dir} is set too -- usually /tmp -- so change this configuration or else all data will be lost on machine restart."
226226

rust/crd/src/lib.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ pub const HBASE_ROOTDIR: &str = "hbase.rootdir";
5959
pub const HBASE_UNSAFE_REGIONSERVER_HOSTNAME_DISABLE_MASTER_REVERSEDNS: &str =
6060
"hbase.unsafe.regionserver.hostname.disable.master.reversedns";
6161
pub const HBASE_HEAPSIZE: &str = "HBASE_HEAPSIZE";
62-
pub const HBASE_ROOT_DIR_DEFAULT: &str = "/hbase";
6362

6463
pub const HBASE_UI_PORT_NAME_HTTP: &str = "ui-http";
6564
pub const HBASE_UI_PORT_NAME_HTTPS: &str = "ui-https";
@@ -473,15 +472,7 @@ impl Configuration for HbaseConfigFragment {
473472
HBASE_UNSAFE_REGIONSERVER_HOSTNAME_DISABLE_MASTER_REVERSEDNS.to_string(),
474473
Some("true".to_string()),
475474
);
476-
result.insert(
477-
HBASE_ROOTDIR.to_string(),
478-
Some(
479-
self.hbase_rootdir
480-
.as_deref()
481-
.unwrap_or(HBASE_ROOT_DIR_DEFAULT)
482-
.to_string(),
483-
),
484-
);
475+
result.insert(HBASE_ROOTDIR.to_string(), self.hbase_rootdir.clone());
485476
}
486477
_ => {}
487478
}

0 commit comments

Comments
 (0)