Skip to content

Commit

Permalink
daemon: remove the tcmu-runner active check in systemd case
Browse files Browse the repository at this point in the history
Systemd service will help to guarantee that the tcmu-runner
is already up when reaching here

Signed-off-by: Xiubo Li <[email protected]>
Reviewed-by: Niels Devos <[email protected]>
Reviewed-by: Amar Tumballi <[email protected]>
  • Loading branch information
lxbsz authored and pkalever committed May 28, 2019
1 parent 92f4640 commit 0aa12a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ AC_ARG_WITH(systemddir,
[systemddir='${prefix}/lib/systemd/system'])
AC_SUBST(systemddir)
AM_CONDITIONAL([USE_SYSTEMD], test [ -d '/usr/lib/systemd/system' ])
if test -d '/usr/lib/systemd/system'; then
AC_DEFINE([USE_SYSTEMD], [1], [use systemd])
fi

AC_ARG_WITH(initddir,
AC_HELP_STRING([--with-initddir=DIR],
Expand Down
6 changes: 6 additions & 0 deletions daemon/gluster-blockd.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,18 @@ blockNodeSanityCheck(void)
char *global_opts;


/*
* Systemd service will help to guarantee that the tcmu-runner
* is already up when reaching here
*/
#ifndef USE_SYSTEMD
/* Check if tcmu-runner is running */
ret = gbRunner("ps aux ww | grep -w '[t]cmu-runner' > /dev/null");
if (ret) {
LOG("mgmt", GB_LOG_ERROR, "tcmu-runner not running");
return ESRCH;
}
#endif

/* Check targetcli has user:glfs handler listed */
ret = gbRunner("targetcli /backstores/user:glfs ls > /dev/null");
Expand Down

0 comments on commit 0aa12a2

Please sign in to comment.