gluster / gluster-containers

Dockerfiles (CentOS, Fedora, Red Hat) for GlusterFS
https://github.com/gluster/gluster-containers/pkgs/container/gluster-containers
223 stars 135 forks source link

Use env. variable GLUSTER_BLOCK_ENABLED to enable/disable gluster-block-service #122

Open nixpanic opened 5 years ago

nixpanic commented 5 years ago

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 f5409d94. 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.

Updates: #120

SaravanaStorageNetwork commented 5 years ago

@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).

nixpanic commented 5 years ago

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.

nixpanic commented 5 years ago

I have modified the probe-status.sh script to also check the GLUSTER_BLOCK_ENABLED variable now. By default gluster-block is enabled, and so is the probe. GLUSTER_BLOCKD_STATUS_PROBE_ENABLE can still be used to disable the probe, there could be users that have configured it that way.