Revert "Add node locked gate to SM enable"
This reverts commit 23d0d8ab2f
.
Reason for revert: Breaks AIO SX Enable
Change-Id: I662b8732e723f4ce5b748ef00a184ae5b8db523c
This commit is contained in:
parent
23d0d8ab2f
commit
1e62ab86f1
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2014-2024 Wind River Systems, Inc.
|
||||
// Copyright (c) 2014-2023 Wind River Systems, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
@ -18,7 +18,6 @@
|
|||
#include "sm_types.h"
|
||||
#include "sm_debug.h"
|
||||
|
||||
#define SM_NODE_LOCKED_FILE "/etc/mtc/tmp/.node_locked"
|
||||
#define SM_NODE_GO_ENABLE_FILE "/var/run/goenabled"
|
||||
#define SM_NODE_GO_ENABLE_FILE_SIMPLEX "/var/run/.goenabled"
|
||||
#define SM_NODE_UNHEALTHY_FILE "/var/run/.sm_node_unhealthy"
|
||||
|
@ -382,7 +381,6 @@ typedef enum
|
|||
NODE_UNHEALTHY_FILE_EXISTS,
|
||||
NODE_DISABLED_LICENSE_INVALID,
|
||||
NODE_DISABLED_FAILOVER,
|
||||
NODE_IS_LOCKED,
|
||||
NODE_ENABLED
|
||||
}SmNodeEnabledBlockingStateT;
|
||||
static SmNodeEnabledBlockingStateT blocking_state = BLOCKING_STATE_INIT;
|
||||
|
@ -396,7 +394,6 @@ SmErrorT sm_node_utils_enabled( bool* enabled, char reason_text[] )
|
|||
*enabled = false;
|
||||
reason_text[0] = '\0';
|
||||
const char* goenabled_file = SM_NODE_GO_ENABLE_FILE;
|
||||
const char* node_locked_file = SM_NODE_LOCKED_FILE;
|
||||
|
||||
bool is_aio_simplex = false;
|
||||
SmErrorT error = sm_node_utils_is_aio_simplex(&is_aio_simplex);
|
||||
|
@ -412,20 +409,6 @@ SmErrorT sm_node_utils_enabled( bool* enabled, char reason_text[] )
|
|||
goenabled_file = SM_NODE_GO_ENABLE_FILE_SIMPLEX;
|
||||
}
|
||||
|
||||
if(0 == access( node_locked_file, F_OK ))
|
||||
{
|
||||
if(blocking_state != NODE_IS_LOCKED)
|
||||
{
|
||||
blocking_state = NODE_IS_LOCKED;
|
||||
DPRINTFI("Node enable: blocked. Node is locked ; the %s file is present", node_locked_file);
|
||||
}
|
||||
|
||||
snprintf( reason_text, SM_LOG_REASON_TEXT_MAX_CHAR,
|
||||
"node is locked" );
|
||||
|
||||
return( SM_OKAY );
|
||||
}
|
||||
|
||||
if(0 > access( goenabled_file, F_OK ))
|
||||
{
|
||||
if( ENOENT == errno )
|
||||
|
|
Loading…
Reference in New Issue