summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2012-11-27 12:33:06 +0530
committerAnand Avati <avati@redhat.com>2012-11-29 17:34:54 -0800
commit1bfcabdb61920ed4156ac24799cdd846bec64233 (patch)
treebc93ddb237ae07f8e1dd2e34a07cf8b4d47ab962 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent3d83e6c42ee0d43208a7b1ebb0595ee7c43bb066 (diff)
mgmt/glusterd: Consider nodesvc to be running after online
Definition of online in the message below is that the RPC_CLNT_CONNECT event arrives for the nfs/self-heal-daemon process. For automated tests, sometimes the script needs to wait until self-heal-daemon comes online, so that the relevant commands can be executed. Gluster volume status before this change printed whether the self-heal-daemon is running or not based on the lock availability on the pidfile. But there is a small window where the lock on pid file is present but the process is still not online. So the commands that were depending on this kept failing in the test script. Change-Id: I0e44e18b08d7b653d34fa170c1f187d91c888cd9 BUG: 858212 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4236 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index ac53f2e46..48ae5b660 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -4134,7 +4134,7 @@ glusterd_bricks_select_profile_volume (dict_t *dict, char **op_errstr)
case GF_CLI_STATS_INFO:
ret = dict_get_str_boolean (dict, "nfs", _gf_false);
if (ret) {
- if (!glusterd_nodesvc_is_running ("nfs")) {
+ if (!glusterd_is_nodesvc_online ("nfs")) {
ret = -1;
gf_log (this->name, GF_LOG_ERROR, "NFS server"
" is not running");
@@ -4177,7 +4177,7 @@ glusterd_bricks_select_profile_volume (dict_t *dict, char **op_errstr)
case GF_CLI_STATS_TOP:
ret = dict_get_str_boolean (dict, "nfs", _gf_false);
if (ret) {
- if (!glusterd_nodesvc_is_running ("nfs")) {
+ if (!glusterd_is_nodesvc_online ("nfs")) {
ret = -1;
gf_log (this->name, GF_LOG_ERROR, "NFS server"
" is not running");
@@ -4614,7 +4614,7 @@ glusterd_bricks_select_status_volume (dict_t *dict, char **op_errstr)
ret = 0;
} else if ((cmd & GF_CLI_STATUS_NFS) != 0) {
- if (!glusterd_nodesvc_is_running ("nfs")) {
+ if (!glusterd_is_nodesvc_online ("nfs")) {
ret = -1;
gf_log (this->name, GF_LOG_ERROR,
"NFS server is not running");
@@ -4633,7 +4633,7 @@ glusterd_bricks_select_status_volume (dict_t *dict, char **op_errstr)
ret = 0;
} else if ((cmd & GF_CLI_STATUS_SHD) != 0) {
- if (!glusterd_nodesvc_is_running ("glustershd")) {
+ if (!glusterd_is_nodesvc_online ("glustershd")) {
ret = -1;
gf_log (this->name, GF_LOG_ERROR,
"Self-heal daemon is not running");