Skip to content

Commit

Permalink
[bitnami/scylladb] Uncomment cassandra rack and dc lines in libscylla…
Browse files Browse the repository at this point in the history
…db.sh

Fix an issue where custom values for data center and rack are ignored
because the lines are left as comment in cassandra-rackdc.properties
file.

Signed-off-by: Siavash <[email protected]>
  • Loading branch information
siavasht committed Nov 20, 2024
1 parent 893263c commit e9661bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,8 @@ cassandra_setup_common_ports() {
#########################
cassandra_setup_rack_dc() {
if ! cassandra_is_file_external "${DB_MOUNTED_RACKDC_PATH}"; then
replace_in_file "${DB_RACKDC_FILE}" "dc=.*" "dc=${DB_DATACENTER}"
replace_in_file "${DB_RACKDC_FILE}" "rack=.*" "rack=${DB_RACK}"
replace_in_file "${DB_RACKDC_FILE}" "^(#\s)?(\s*)dc=.*" "dc=${DB_DATACENTER}"
replace_in_file "${DB_RACKDC_FILE}" "^(#\s)?(\s*)rack=.*" "rack=${DB_RACK}"
else
debug "${DB_MOUNTED_RACKDC_PATH} mounted. Skipping rack and datacenter configuration"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,8 @@ cassandra_setup_common_ports() {
#########################
cassandra_setup_rack_dc() {
if ! cassandra_is_file_external "${DB_MOUNTED_RACKDC_PATH}"; then
replace_in_file "${DB_RACKDC_FILE}" "dc=.*" "dc=${DB_DATACENTER}"
replace_in_file "${DB_RACKDC_FILE}" "rack=.*" "rack=${DB_RACK}"
replace_in_file "${DB_RACKDC_FILE}" "^(#\s)?(\s*)dc=.*" "dc=${DB_DATACENTER}"
replace_in_file "${DB_RACKDC_FILE}" "^(#\s)?(\s*)rack=.*" "rack=${DB_RACK}"
else
debug "${DB_MOUNTED_RACKDC_PATH} mounted. Skipping rack and datacenter configuration"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,8 @@ cassandra_setup_common_ports() {
#########################
cassandra_setup_rack_dc() {
if ! cassandra_is_file_external "${DB_MOUNTED_RACKDC_PATH}"; then
replace_in_file "${DB_RACKDC_FILE}" "dc=.*" "dc=${DB_DATACENTER}"
replace_in_file "${DB_RACKDC_FILE}" "rack=.*" "rack=${DB_RACK}"
replace_in_file "${DB_RACKDC_FILE}" "^(#\s)?(\s*)dc=.*" "dc=${DB_DATACENTER}"
replace_in_file "${DB_RACKDC_FILE}" "^(#\s)?(\s*)rack=.*" "rack=${DB_RACK}"
else
debug "${DB_MOUNTED_RACKDC_PATH} mounted. Skipping rack and datacenter configuration"
fi
Expand Down

0 comments on commit e9661bb

Please sign in to comment.