-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use env. variable GLUSTER_BLOCK_ENABLED to enable/disable gluster-block-service #122
base: master
Are you sure you want to change the base?
Conversation
@nixpanic But status-probe refers the variable GLUSTER_BLOCKD_STATUS_PROBE_ENABLE( which is for whether to check gluster blockd status or not) Note: |
On Tue, Jan 15, 2019 at 03:51:06AM -0800, Saravanakumar Arumugam wrote:
@nixpanic But status-probe refers the variable GLUSTER_BLOCKD_STATUS_PROBE_ENABLE( which is for whether to check gluster blockd status or not)
Here, it is GLUSTER_BLOCK_ENABLED which is for whether enable/disable GLUSTER_BLOCK ?
Note:
It is good idea to merge them both, but currently they are different variables(with different meaning).
Ah, right! I'll rename them and only keep the one we have in
gluster-kubernetes and openshift-ansible.
|
…ck service. Enable gluster-block services if GLUSTER_BLOCK_ENABLED is "1" and disable otherwise. By default, GLUSTER_BLOCK_ENABLED is set as "1". When gluster-block is disabled, the status-probe.sh script should not check for its status. Updates: gluster#120 Signed-off-by: Saravanakumar Arumugam <[email protected]> Signed-off-by: Niels de Vos <[email protected]>
9b1aeba
to
35a40b8
Compare
I have modified the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable enough to me.
#FIXME To update in environment file | ||
sed -i '/GB_GLFS_LRU_COUNT=/s/GB_GLFS_LRU_COUNT=.*/'GB_GLFS_LRU_COUNT="$GB_GLFS_LRU_COUNT"\"'/' /usr/lib/systemd/system/gluster-blockd.service | ||
sed -i '/EnvironmentFile/i Environment="GB_LOGDIR='$GB_LOGDIR'"' /usr/lib/systemd/system/gluster-blockd.service | ||
if [ "$GLUSTER_BLOCK_ENABLED" == 1 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, 1 is numeric value => eq is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
< This change was recently reverted with commit f5409d9. With a small correction to the change, this should now function as expected. The status-probe.sh script checks the value for GLUSTER_BLOCK_ENABLED and compares it to 1. However the update-params.sh script set the variable by default to TRUE. gluster-kubernetes and openshift-ansible both set the variable to "1" by default, so should update-params.sh.
This needs an update too
if [ "$GLUSTER_BLOCK_ENABLED" == 1 ]; then | ||
echo "Enabling gluster-block service and updating env. variables" | ||
systemctl enable gluster-block-setup.service | ||
systemctl enable gluster-blockd.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the actual issue mentioned here issue #120 resolved here? Please reboot the node and see whether this specific line executes fine.
Enable gluster-block services if
GLUSTER_BLOCK_ENABLED
is"1"
and disable otherwise.By default,
GLUSTER_BLOCK_ENABLED
is set as"1"
.This change was recently reverted with commit f5409d9. With a small correction to the change, this should now function as expected. The
status-probe.sh
script checks the value forGLUSTER_BLOCK_ENABLED
and compares it to1
. However theupdate-params.sh
script set the variable by default toTRUE
. gluster-kubernetes and openshift-ansible both set the variable to"1"
by default, so shouldupdate-params.sh
.Updates: #120