Merge "Fix mtce compiling issue with gcc8"
This commit is contained in:
commit
84ba5f693a
@ -57,16 +57,16 @@ using namespace std;
|
||||
#include "hostwMsg.h" /* message format */
|
||||
|
||||
/* Configuration Files */
|
||||
#define HOSTWD_CONFIG_FILE ((const char * const)"/etc/mtc/hostwd.conf")
|
||||
#define PMOND_CONFIG_FILE ((const char * const)"/etc/mtc/pmond.conf")
|
||||
#define HOSTWD_CONFIG_FILE ((const char *)"/etc/mtc/hostwd.conf")
|
||||
#define PMOND_CONFIG_FILE ((const char *)"/etc/mtc/pmond.conf")
|
||||
|
||||
/* kernel SysRq control interface file used to enable the magic SysRq key.
|
||||
* Used to ensure that the SysRq service is enabled when needed. */
|
||||
#define SYSRQ_CONTROL_INTERFACE ((const char * const)"/proc/sys/kernel/sysrq")
|
||||
#define SYSRQ_CONTROL_INTERFACE ((const char *)"/proc/sys/kernel/sysrq")
|
||||
|
||||
/* kernel SysRq trigger interface file used to trigger a SysRq command.
|
||||
* commands @ https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html */
|
||||
#define SYSRQ_COMMAND_INTERFACE ((const char * const)"/proc/sysrq-trigger")
|
||||
#define SYSRQ_COMMAND_INTERFACE ((const char *)"/proc/sysrq-trigger")
|
||||
|
||||
#define HOSTW_MIN_KERN_UPDATE_PERIOD 5 /* user can set how long until kernel
|
||||
* watchdog panics, down to this
|
||||
|
@ -188,7 +188,7 @@ void manage_quorum_failed ( void )
|
||||
* by clearing the control boolean that prevents recovery. */
|
||||
ilog ("Quorum failed but all reboot/reset recovery options disabled");
|
||||
ilog ("... allowing auto recovery");
|
||||
ctrl_ptr->quorum_failed = 0 ;
|
||||
ctrl_ptr->quorum_failed = false ;
|
||||
ctrl_ptr->pmon_grace_loops = config_ptr->hostwd_failure_threshold ;
|
||||
}
|
||||
}
|
||||
@ -285,7 +285,7 @@ void hostw_service ( void )
|
||||
pmonTimer.ring = false ;
|
||||
}
|
||||
}
|
||||
else if ( ctrl->quorum_failed == 0 )
|
||||
else if ( ctrl->quorum_failed == false )
|
||||
{
|
||||
if (FD_ISSET(hostw_socket->status_sock, &(hostw_socket->readfds)))
|
||||
{
|
||||
@ -304,13 +304,14 @@ void hostw_service ( void )
|
||||
}
|
||||
}
|
||||
else if ( rc != RETRY )
|
||||
ctrl->quorum_failed++ ;
|
||||
ctrl->quorum_failed = true ;
|
||||
}
|
||||
}
|
||||
if ( 0 >= ctrl->pmon_grace_loops )
|
||||
{
|
||||
if ( ctrl->quorum_failed++ == 0 )
|
||||
if ( ctrl->quorum_failed == false )
|
||||
{
|
||||
ctrl->quorum_failed = true ;
|
||||
if (daemon_is_file_present(NODE_LOCKED_FILE))
|
||||
{
|
||||
wlog( "Host watchdog (hostwd) not receiving messages from PMON"
|
||||
|
Loading…
x
Reference in New Issue
Block a user