Skip to content

Commit

Permalink
Fix bug where the configuration of the hbaseRootdir at the role level…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
maltesander authored Nov 15, 2024
1 parent 7e65cbc commit 101f50b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Reduce CRD size from `1.4MB` to `96KB` by accepting arbitrary YAML input instead of the underlying schema for the following fields ([#548]):
- `podOverrides`
- `affinity`
- Fix bug where the configuration of the `hbaseRootdir` at the role level is ignored ([#584]).

### Fixed

Expand All @@ -28,6 +29,7 @@
[#556]: https://github.com/stackabletech/hbase-operator/pull/556
[#558]: https://github.com/stackabletech/hbase-operator/pull/558
[#574]: https://github.com/stackabletech/hbase-operator/pull/574
[#584]: https://github.com/stackabletech/hbase-operator/pull/584

## [24.7.0] - 2024-07-24

Expand Down
8 changes: 4 additions & 4 deletions deploy/config-spec/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ properties:
type: "string"
defaultValues:
- fromVersion: "0.0.0"
value: "${hbase.tmp.dir}/hbase"
value: "/hbase"
roles:
- name: "master"
required: false
required: true
- name: "regionserver"
required: false
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
- name: "restserver"
required: false
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
asOfVersion: "0.0.0"
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."

Expand Down
8 changes: 4 additions & 4 deletions deploy/helm/hbase-operator/configs/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ properties:
type: "string"
defaultValues:
- fromVersion: "0.0.0"
value: "${hbase.tmp.dir}/hbase"
value: "/hbase"
roles:
- name: "master"
required: false
required: true
- name: "regionserver"
required: false
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
- name: "restserver"
required: false
required: true # this can be false (only required for master) - kept for compatibility (avoid restarts)
asOfVersion: "0.0.0"
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."

Expand Down
11 changes: 1 addition & 10 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ pub const HBASE_ROOTDIR: &str = "hbase.rootdir";
pub const HBASE_UNSAFE_REGIONSERVER_HOSTNAME_DISABLE_MASTER_REVERSEDNS: &str =
"hbase.unsafe.regionserver.hostname.disable.master.reversedns";
pub const HBASE_HEAPSIZE: &str = "HBASE_HEAPSIZE";
pub const HBASE_ROOT_DIR_DEFAULT: &str = "/hbase";

pub const HBASE_UI_PORT_NAME_HTTP: &str = "ui-http";
pub const HBASE_UI_PORT_NAME_HTTPS: &str = "ui-https";
Expand Down Expand Up @@ -473,15 +472,7 @@ impl Configuration for HbaseConfigFragment {
HBASE_UNSAFE_REGIONSERVER_HOSTNAME_DISABLE_MASTER_REVERSEDNS.to_string(),
Some("true".to_string()),
);
result.insert(
HBASE_ROOTDIR.to_string(),
Some(
self.hbase_rootdir
.as_deref()
.unwrap_or(HBASE_ROOT_DIR_DEFAULT)
.to_string(),
),
);
result.insert(HBASE_ROOTDIR.to_string(), self.hbase_rootdir.clone());
}
_ => {}
}
Expand Down

0 comments on commit 101f50b

Please sign in to comment.