From cb2d1b3bfc66236b313e5b859cc277a3aba52057 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Fri, 8 Jun 2018 12:12:11 -0400 Subject: [PATCH] Mtce: Fix logic compare looking for host that did not reboot Story: 2002882 Task: 22845 Change-Id: I0ffab3476c32b0947f0cd44796e257ee4bb93029 Signed-off-by: Jack Ding --- mtce-common/cgts-mtce-common-1.0/maintenance/mtcNodeHdlrs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mtce-common/cgts-mtce-common-1.0/maintenance/mtcNodeHdlrs.cpp b/mtce-common/cgts-mtce-common-1.0/maintenance/mtcNodeHdlrs.cpp index febfb164..a5316f34 100755 --- a/mtce-common/cgts-mtce-common-1.0/maintenance/mtcNodeHdlrs.cpp +++ b/mtce-common/cgts-mtce-common-1.0/maintenance/mtcNodeHdlrs.cpp @@ -1926,7 +1926,8 @@ int nodeLinkClass::recovery_handler ( struct nodeLinkClass::node * node_ptr ) * the host has not reset yet we have disabled services * then now we need to reset the host to prevet VM duplication * by forcing a full enable */ - if ( node_ptr->uptime_save & ( node_ptr->uptime >= node_ptr->uptime_save ) ) + if (( node_ptr->uptime_save != 0 ) && + ( node_ptr->uptime >= node_ptr->uptime_save )) { ilog ("%s regained MTCALIVE from host that did not reboot (uptime:%d)\n", node_ptr->hostname.c_str(), node_ptr->uptime );