Merge "SM monitoring for cluster-host-ip service"
This commit is contained in:
commit
6db625274e
@ -12,7 +12,7 @@ from sm_api_msg_utils import database_name as database_name
|
||||
cpe_duplex = "duplex"
|
||||
cpe_duplex_direct = "duplex-direct"
|
||||
mgmt_if = 'management-interface'
|
||||
infra_if = 'infrastructure-interface'
|
||||
cluster_host_if = 'cluster-host-interface'
|
||||
tor_connect = 'tor'
|
||||
dc_connect = 'dc'
|
||||
database_name = "/var/lib/sm/sm.db"
|
||||
@ -233,12 +233,12 @@ def _dispatch_config_action(args, database):
|
||||
|
||||
def configure_cpe_duplex():
|
||||
configure_if_connect_type(mgmt_if, tor_connect)
|
||||
configure_if_connect_type(infra_if, tor_connect)
|
||||
configure_if_connect_type(cluster_host_if, tor_connect)
|
||||
|
||||
|
||||
def configure_cpe_dc():
|
||||
configure_if_connect_type(mgmt_if, dc_connect)
|
||||
configure_if_connect_type(infra_if, dc_connect)
|
||||
configure_if_connect_type(cluster_host_if, dc_connect)
|
||||
|
||||
|
||||
def configure_if_connect_type(if_name, connect_type):
|
||||
|
@ -131,7 +131,7 @@ static SmFailoverInterfaceInfo _my_if_list[SM_INTERFACE_MAX];
|
||||
static unsigned int _total_interfaces;
|
||||
static SmFailoverInterfaceInfo* _oam_interface_info = NULL;
|
||||
static SmFailoverInterfaceInfo* _mgmt_interface_info = NULL;
|
||||
static SmFailoverInterfaceInfo* _infra_interface_info = NULL;
|
||||
static SmFailoverInterfaceInfo* _cluster_host_interface_info = NULL;
|
||||
static SmFailoverInterfaceInfo _peer_if_list[SM_INTERFACE_MAX];
|
||||
static pthread_mutex_t _mutex;
|
||||
static SmDbHandleT* _sm_db_handle = NULL;
|
||||
@ -176,17 +176,17 @@ static void sm_failover_interface_check( void* user_data[],
|
||||
_my_if_list[*count].set_interface(interface);
|
||||
_mgmt_interface_info = _my_if_list + (*count);
|
||||
(*count) ++;
|
||||
}else if( 0 == strcmp(SM_SERVICE_DOMAIN_INFRA_INTERFACE, interface->service_domain_interface ))
|
||||
}else if( 0 == strcmp(SM_SERVICE_DOMAIN_CLUSTER_HOST_INTERFACE, interface->service_domain_interface ))
|
||||
{
|
||||
SmErrorT error = sm_node_utils_get_infra_interface(interface->interface_name);
|
||||
SmErrorT error = sm_node_utils_get_cluster_host_interface(interface->interface_name);
|
||||
if(SM_OKAY == error)
|
||||
{
|
||||
_my_if_list[*count].set_interface(interface);
|
||||
_infra_interface_info = _my_if_list + (*count);
|
||||
_cluster_host_interface_info = _my_if_list + (*count);
|
||||
(*count) ++;
|
||||
} else if (SM_NOT_FOUND != error )
|
||||
{
|
||||
DPRINTFE( "Failed to look up infrastructure interface, error=%s.",
|
||||
DPRINTFE( "Failed to look up cluster-host interface, error=%s.",
|
||||
sm_error_str(error) );
|
||||
}
|
||||
}else
|
||||
@ -471,12 +471,12 @@ void sm_failover_if_state_update(const char node_name[], SmHeartbeatMsgIfStateT
|
||||
// ****************************************************************************
|
||||
|
||||
// ****************************************************************************
|
||||
// Failover - is infra configured
|
||||
// ==================
|
||||
bool is_infra_configured()
|
||||
// Failover - is cluster-host interface configured
|
||||
// ===============================================
|
||||
bool is_cluster_host_interface_configured()
|
||||
{
|
||||
if (NULL == _infra_interface_info ||
|
||||
_infra_interface_info->get_interface()->service_domain_interface[0] == '\0' )
|
||||
if (NULL == _cluster_host_interface_info ||
|
||||
_cluster_host_interface_info->get_interface()->service_domain_interface[0] == '\0' )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -492,18 +492,18 @@ int sm_failover_get_if_state()
|
||||
{
|
||||
SmFailoverInterfaceStateT mgmt_state = _mgmt_interface_info->get_state();
|
||||
SmFailoverInterfaceStateT oam_state = _oam_interface_info->get_state();
|
||||
SmFailoverInterfaceStateT infra_state;
|
||||
SmFailoverInterfaceStateT cluster_host_state;
|
||||
int if_state_flag = 0;
|
||||
if ( is_infra_configured() )
|
||||
if ( is_cluster_host_interface_configured() )
|
||||
{
|
||||
infra_state = _infra_interface_info->get_state();
|
||||
if( SM_FAILOVER_INTERFACE_OK == infra_state )
|
||||
cluster_host_state = _cluster_host_interface_info->get_state();
|
||||
if( SM_FAILOVER_INTERFACE_OK == cluster_host_state )
|
||||
{
|
||||
if_state_flag |= SM_FAILOVER_HEARTBEAT_ALIVE;
|
||||
}
|
||||
else if ( SM_FAILOVER_INTERFACE_DOWN == infra_state )
|
||||
else if ( SM_FAILOVER_INTERFACE_DOWN == cluster_host_state )
|
||||
{
|
||||
if_state_flag |= SM_FAILOVER_INFRA_DOWN;
|
||||
if_state_flag |= SM_FAILOVER_CLUSTER_HOST_DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@ -944,15 +944,14 @@ void sm_failover_audit()
|
||||
}
|
||||
|
||||
bool in_transition = false;
|
||||
bool infra_configured = is_infra_configured();
|
||||
in_transition = in_transition ||
|
||||
sm_failover_if_transit_state(_mgmt_interface_info);
|
||||
in_transition = in_transition ||
|
||||
sm_failover_if_transit_state(_oam_interface_info);
|
||||
if( infra_configured )
|
||||
if( is_cluster_host_interface_configured() )
|
||||
{
|
||||
in_transition = in_transition ||
|
||||
sm_failover_if_transit_state(_infra_interface_info);
|
||||
sm_failover_if_transit_state(_cluster_host_interface_info);
|
||||
}
|
||||
|
||||
if(in_transition)
|
||||
@ -1013,12 +1012,12 @@ void sm_failover_audit()
|
||||
SmIFStateChangedEventData event_data;
|
||||
event_data.set_interface_state(SM_INTERFACE_OAM, _oam_interface_info->get_state());
|
||||
event_data.set_interface_state(SM_INTERFACE_MGMT, _mgmt_interface_info->get_state());
|
||||
if( NULL != _infra_interface_info)
|
||||
if( NULL != _cluster_host_interface_info)
|
||||
{
|
||||
event_data.set_interface_state(SM_INTERFACE_INFRA, _infra_interface_info->get_state());
|
||||
event_data.set_interface_state(SM_INTERFACE_CLUSTER_HOST, _cluster_host_interface_info->get_state());
|
||||
}else
|
||||
{
|
||||
event_data.set_interface_state(SM_INTERFACE_INFRA, SM_FAILOVER_INTERFACE_UNKNOWN);
|
||||
event_data.set_interface_state(SM_INTERFACE_CLUSTER_HOST, SM_FAILOVER_INTERFACE_UNKNOWN);
|
||||
}
|
||||
SmFailoverFSM::get_fsm().send_event(SM_FAILOVER_EVENT_IF_STATE_CHANGED, &event_data);
|
||||
_if_state_changed = false;
|
||||
@ -1179,8 +1178,8 @@ SmFailoverInterfaceStateT sm_failover_get_interface_info(SmInterfaceTypeT interf
|
||||
case SM_INTERFACE_MGMT:
|
||||
res = _mgmt_interface_info;
|
||||
break;
|
||||
case SM_INTERFACE_INFRA:
|
||||
res = _infra_interface_info;
|
||||
case SM_INTERFACE_CLUSTER_HOST:
|
||||
res = _cluster_host_interface_info;
|
||||
break;
|
||||
case SM_INTERFACE_OAM:
|
||||
res = _oam_interface_info;
|
||||
@ -1470,7 +1469,7 @@ void dump_interfaces_state(FILE* fp)
|
||||
{
|
||||
dump_if_state(fp, _oam_interface_info, " OAM");
|
||||
dump_if_state(fp, _mgmt_interface_info, " MGMT");
|
||||
dump_if_state(fp, _infra_interface_info, "INFRA");
|
||||
dump_if_state(fp, _cluster_host_interface_info, "CLUSTER-HOST");
|
||||
}
|
||||
|
||||
void dump_peer_if_state(FILE* fp)
|
||||
|
@ -31,7 +31,7 @@ typedef enum
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SM_FAILOVER_INFRA_DOWN = 1,
|
||||
SM_FAILOVER_CLUSTER_HOST_DOWN = 1,
|
||||
SM_FAILOVER_MGMT_DOWN = 2,
|
||||
SM_FAILOVER_OAM_DOWN = 4,
|
||||
SM_FAILOVER_HEARTBEAT_ALIVE = 8,
|
||||
|
@ -215,7 +215,7 @@ SmErrorT SmFailoverFailPendingState::event_handler(SmFailoverEventT event, const
|
||||
}else
|
||||
{
|
||||
interfaces_to_check[0] = SM_INTERFACE_MGMT;
|
||||
interfaces_to_check[1] = SM_INTERFACE_INFRA;
|
||||
interfaces_to_check[1] = SM_INTERFACE_CLUSTER_HOST;
|
||||
}
|
||||
for(int i = 0; interfaces_to_check[i] != SM_INTERFACE_UNKNOWN; i ++)
|
||||
{
|
||||
|
@ -33,8 +33,8 @@ void SmIFStateChangedEventData::set_interface_state(
|
||||
case SM_INTERFACE_MGMT:
|
||||
_mgmt_state = interface_state;
|
||||
break;
|
||||
case SM_INTERFACE_INFRA:
|
||||
_infra_state = interface_state;
|
||||
case SM_INTERFACE_CLUSTER_HOST:
|
||||
_cluster_host_state = interface_state;
|
||||
break;
|
||||
default:
|
||||
DPRINTFE("Runtime error: invalid interface type %d", interface_type);
|
||||
@ -49,8 +49,8 @@ SmFailoverInterfaceStateT SmIFStateChangedEventData::get_interface_state(SmInter
|
||||
return _oam_state;
|
||||
case SM_INTERFACE_MGMT:
|
||||
return _mgmt_state;
|
||||
case SM_INTERFACE_INFRA:
|
||||
return _infra_state;
|
||||
case SM_INTERFACE_CLUSTER_HOST:
|
||||
return _cluster_host_state;
|
||||
default:
|
||||
DPRINTFE("Runtime error: invalid interface type %d", interface_type);
|
||||
return SM_FAILOVER_INTERFACE_UNKNOWN;
|
||||
|
@ -71,7 +71,7 @@ class SmIFStateChangedEventData: public ISmFSMEventData
|
||||
|
||||
private:
|
||||
SmFailoverInterfaceStateT _mgmt_state;
|
||||
SmFailoverInterfaceStateT _infra_state;
|
||||
SmFailoverInterfaceStateT _cluster_host_state;
|
||||
SmFailoverInterfaceStateT _oam_state;
|
||||
};
|
||||
|
||||
|
@ -25,13 +25,13 @@ SmErrorT SmFailoverNormalState::event_handler(SmFailoverEventT event, const ISmF
|
||||
{
|
||||
const SmIFStateChangedEventData* data = (const SmIFStateChangedEventData*) event_data;
|
||||
|
||||
SmFailoverInterfaceStateT oam_state, mgmt_state, infra_state;
|
||||
SmFailoverInterfaceStateT oam_state, mgmt_state, cluster_host_state;
|
||||
oam_state = data->get_interface_state(SM_INTERFACE_OAM);
|
||||
mgmt_state = data->get_interface_state(SM_INTERFACE_MGMT);
|
||||
infra_state = data->get_interface_state(SM_INTERFACE_INFRA);
|
||||
cluster_host_state = data->get_interface_state(SM_INTERFACE_CLUSTER_HOST);
|
||||
if(oam_state != SM_FAILOVER_INTERFACE_OK ||
|
||||
mgmt_state != SM_FAILOVER_INTERFACE_OK ||
|
||||
(infra_state != SM_FAILOVER_INTERFACE_OK && infra_state != SM_FAILOVER_INTERFACE_UNKNOWN))
|
||||
(cluster_host_state != SM_FAILOVER_INTERFACE_OK && cluster_host_state != SM_FAILOVER_INTERFACE_UNKNOWN))
|
||||
{
|
||||
this->fsm.set_state(SM_FAILOVER_STATE_FAIL_PENDING);
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ static int get_node_if_healthy_score(unsigned int interface_state)
|
||||
{
|
||||
healthy_score -= 1;
|
||||
}
|
||||
if(interface_state & SM_FAILOVER_INFRA_DOWN)
|
||||
if(interface_state & SM_FAILOVER_CLUSTER_HOST_DOWN)
|
||||
{
|
||||
healthy_score -= 2;
|
||||
}
|
||||
@ -266,12 +266,12 @@ SmErrorT _get_system_status(SmSystemStatusT& sys_status, char host_name[], char
|
||||
|
||||
sys_status.system_mode = sm_node_utils_get_system_mode();
|
||||
sys_status.host_status.mgmt_state = sm_failover_get_interface_info(SM_INTERFACE_MGMT);
|
||||
sys_status.host_status.infra_state = sm_failover_get_interface_info(SM_INTERFACE_INFRA);
|
||||
sys_status.host_status.cluster_host_state = sm_failover_get_interface_info(SM_INTERFACE_CLUSTER_HOST);
|
||||
sys_status.host_status.oam_state = sm_failover_get_interface_info(SM_INTERFACE_OAM);
|
||||
|
||||
if(SM_FAILOVER_INTERFACE_OK == sys_status.host_status.mgmt_state ||
|
||||
SM_FAILOVER_INTERFACE_OK == sys_status.host_status.oam_state ||
|
||||
SM_FAILOVER_INTERFACE_OK == sys_status.host_status.infra_state)
|
||||
SM_FAILOVER_INTERFACE_OK == sys_status.host_status.cluster_host_state)
|
||||
{
|
||||
sys_status.heartbeat_state = SM_HEARTBEAT_OK;
|
||||
}else
|
||||
@ -551,8 +551,8 @@ SmErrorT _get_survivor_dc(const SmSystemStatusT& system_status, SmSystemFailover
|
||||
if(SM_HEARTBEAT_LOSS == system_status.heartbeat_state)
|
||||
{
|
||||
if(system_status.host_status.mgmt_state == SM_FAILOVER_INTERFACE_DOWN &&
|
||||
(system_status.host_status.infra_state == SM_FAILOVER_INTERFACE_DOWN ||
|
||||
system_status.host_status.infra_state == SM_FAILOVER_INTERFACE_UNKNOWN))
|
||||
(system_status.host_status.cluster_host_state == SM_FAILOVER_INTERFACE_DOWN ||
|
||||
system_status.host_status.cluster_host_state == SM_FAILOVER_INTERFACE_UNKNOWN))
|
||||
{
|
||||
if(SM_FAILOVER_INTERFACE_DOWN == system_status.host_status.oam_state)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ typedef struct
|
||||
unsigned int interface_state;
|
||||
unsigned int heartbeat_state;
|
||||
SmFailoverInterfaceStateT mgmt_state;
|
||||
SmFailoverInterfaceStateT infra_state;
|
||||
SmFailoverInterfaceStateT cluster_host_state;
|
||||
SmFailoverInterfaceStateT oam_state;
|
||||
SmNodeScheduleStateT current_schedule_state;
|
||||
}SmNodeStatusT;
|
||||
|
@ -481,10 +481,10 @@ static bool sm_heartbeat_peer_alarm_on_interface( SmTimerIdT timer_id,
|
||||
{
|
||||
snprintf( network_type, sizeof(network_type), SM_OAM_INTERFACE_NAME );
|
||||
|
||||
} else if( 0 == strcmp( SM_SERVICE_DOMAIN_INFRA_INTERFACE,
|
||||
} else if( 0 == strcmp( SM_SERVICE_DOMAIN_CLUSTER_HOST_INTERFACE,
|
||||
interface->service_domain_interface ) )
|
||||
{
|
||||
snprintf( network_type, sizeof(network_type), SM_INFRA_INTERFACE_NAME );
|
||||
snprintf( network_type, sizeof(network_type), SM_CLUSTER_HOST_INTERFACE_NAME );
|
||||
|
||||
} else {
|
||||
snprintf( network_type, sizeof(network_type), "unknown" );
|
||||
@ -824,7 +824,7 @@ static bool sm_heartbeat_alive_timer( SmTimerIdT timer_id, int64_t user_data )
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( SM_INTERFACE_OAM == interface->interface_type )
|
||||
if ( SM_INTERFACE_OAM == interface->interface_type )
|
||||
{
|
||||
error = sm_heartbeat_msg_close_sockets(
|
||||
&(interface->unicast_socket) );
|
||||
@ -842,7 +842,7 @@ static bool sm_heartbeat_alive_timer( SmTimerIdT timer_id, int64_t user_data )
|
||||
continue;
|
||||
}
|
||||
|
||||
if( SM_INTERFACE_OAM == interface->interface_type )
|
||||
if ( SM_INTERFACE_OAM == interface->interface_type )
|
||||
{
|
||||
error = sm_heartbeat_msg_open_sockets( interface->network_type,
|
||||
&(interface->network_address),
|
||||
@ -901,7 +901,7 @@ static bool sm_heartbeat_alive_timer( SmTimerIdT timer_id, int64_t user_data )
|
||||
DPRINTFD( "Multicast not configured for interface %s", interface->interface_name );
|
||||
}
|
||||
|
||||
if ( SM_INTERFACE_OAM == interface->interface_type )
|
||||
if ( SM_INTERFACE_OAM == interface->interface_type )
|
||||
{
|
||||
error = sm_heartbeat_msg_send_alive( interface->network_type, _node_name,
|
||||
&(interface->network_address), &(interface->network_peer_address),
|
||||
|
@ -68,10 +68,10 @@ static void sm_service_domain_interface_api_get_hw_interface(
|
||||
return;
|
||||
}
|
||||
|
||||
} else if( 0 == strcmp( SM_SERVICE_DOMAIN_INFRA_INTERFACE,
|
||||
} else if( 0 == strcmp( SM_SERVICE_DOMAIN_CLUSTER_HOST_INTERFACE,
|
||||
interface->service_domain_interface ) )
|
||||
{
|
||||
error = sm_node_utils_get_infra_interface( interface->interface_name );
|
||||
error = sm_node_utils_get_cluster_host_interface( interface->interface_name );
|
||||
if( SM_OKAY == error )
|
||||
{
|
||||
DPRINTFI( "Network address (%s) maps to %s interface from config, "
|
||||
@ -81,7 +81,7 @@ static void sm_service_domain_interface_api_get_hw_interface(
|
||||
}
|
||||
else if( SM_NOT_FOUND != error )
|
||||
{
|
||||
DPRINTFE( "Failed to look up infrastructure interface, error=%s.",
|
||||
DPRINTFE( "Failed to look up cluster-host interface, error=%s.",
|
||||
sm_error_str(error) );
|
||||
return;
|
||||
}
|
||||
|
@ -109,10 +109,10 @@ void sm_eru_process_load_interfaces( void )
|
||||
sm_error_str(error) );
|
||||
}
|
||||
|
||||
error = sm_node_utils_get_infra_interface( &(_interfaces[2][0]) );
|
||||
error = sm_node_utils_get_cluster_host_interface( &(_interfaces[2][0]) );
|
||||
if(( SM_OKAY != error )&&( SM_NOT_FOUND != error ))
|
||||
{
|
||||
DPRINTFE( "Failed to look up infrastructure interface, error=%s.",
|
||||
DPRINTFE( "Failed to look up cluster-host interface, error=%s.",
|
||||
sm_error_str(error) );
|
||||
}
|
||||
}
|
||||
|
@ -212,11 +212,11 @@ SmErrorT sm_node_utils_get_oam_interface( char interface_name[] )
|
||||
// ****************************************************************************
|
||||
|
||||
// ****************************************************************************
|
||||
// Node Utilities - Get Infrastructure Interface
|
||||
// =============================================
|
||||
SmErrorT sm_node_utils_get_infra_interface( char interface_name[] )
|
||||
// Node Utilities - Get Cluster Host Interface
|
||||
// ===========================================
|
||||
SmErrorT sm_node_utils_get_cluster_host_interface( char interface_name[] )
|
||||
{
|
||||
return( sm_node_utils_read_platform_config( "infrastructure_interface",
|
||||
return( sm_node_utils_read_platform_config( "cluster_host_interface",
|
||||
interface_name,
|
||||
SM_INTERFACE_NAME_MAX_CHAR ) );
|
||||
}
|
||||
|
@ -45,9 +45,9 @@ extern SmErrorT sm_node_utils_get_oam_interface( char interface_name[] );
|
||||
// ****************************************************************************
|
||||
|
||||
// ****************************************************************************
|
||||
// Node Utilities - Get Infrastructure Interface
|
||||
// =============================================
|
||||
extern SmErrorT sm_node_utils_get_infra_interface( char interface_name[] );
|
||||
// Node Utilities - Get Cluster Host Interface
|
||||
// ===========================================
|
||||
extern SmErrorT sm_node_utils_get_cluster_host_interface( char interface_name[] );
|
||||
// ****************************************************************************
|
||||
|
||||
// ****************************************************************************
|
||||
|
@ -1846,9 +1846,9 @@ SmInterfaceTypeT sm_get_interface_type( const char* domain_interface )
|
||||
} else if ( 0 == strcmp ( SM_SERVICE_DOMAIN_OAM_INTERFACE, domain_interface ) )
|
||||
{
|
||||
return SM_INTERFACE_OAM;
|
||||
} else if ( 0 == strcmp ( SM_SERVICE_DOMAIN_INFRA_INTERFACE, domain_interface ) )
|
||||
} else if ( 0 == strcmp ( SM_SERVICE_DOMAIN_CLUSTER_HOST_INTERFACE, domain_interface ) )
|
||||
{
|
||||
return SM_INTERFACE_INFRA;
|
||||
return SM_INTERFACE_CLUSTER_HOST;
|
||||
}
|
||||
|
||||
return SM_INTERFACE_UNKNOWN;
|
||||
|
@ -98,11 +98,11 @@ extern "C" {
|
||||
|
||||
#define SM_SERVICE_DOMAIN_MGMT_INTERFACE "management-interface"
|
||||
#define SM_SERVICE_DOMAIN_OAM_INTERFACE "oam-interface"
|
||||
#define SM_SERVICE_DOMAIN_INFRA_INTERFACE "infrastructure-interface"
|
||||
#define SM_SERVICE_DOMAIN_CLUSTER_HOST_INTERFACE "cluster-host-interface"
|
||||
|
||||
#define SM_MGMT_INTERFACE_NAME "mgmt"
|
||||
#define SM_OAM_INTERFACE_NAME "oam"
|
||||
#define SM_INFRA_INTERFACE_NAME "infra"
|
||||
#define SM_CLUSTER_HOST_INTERFACE_NAME "cluster-host"
|
||||
#define SM_MAX_IF_NAME_LEN 5
|
||||
|
||||
#define SM_NODE_CONTROLLER_0_NAME "controller-0"
|
||||
@ -203,7 +203,7 @@ typedef enum
|
||||
{
|
||||
SM_INTERFACE_UNKNOWN,
|
||||
SM_INTERFACE_MGMT,
|
||||
SM_INTERFACE_INFRA,
|
||||
SM_INTERFACE_CLUSTER_HOST,
|
||||
SM_INTERFACE_OAM
|
||||
}SmInterfaceTypeT;
|
||||
|
||||
|
@ -5,7 +5,7 @@ CREATE TABLE NODE_HISTORY ( ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME CHAR(32),
|
||||
CREATE TABLE SERVICE_DOMAIN_INTERFACES ( ID INTEGER PRIMARY KEY AUTOINCREMENT, PROVISIONED CHAR(32), SERVICE_DOMAIN CHAR(32), SERVICE_DOMAIN_INTERFACE CHAR(32), PATH_TYPE CHAR(32), AUTH_TYPE CHAR(32), AUTH_KEY CHAR(128), INTERFACE_NAME CHAR(32), INTERFACE_STATE CHAR(32), NETWORK_TYPE CHAR(32), NETWORK_MULTICAST CHAR(256), NETWORK_ADDRESS CHAR(256), NETWORK_PORT INT, NETWORK_HEARTBEAT_PORT INT, NETWORK_PEER_ADDRESS CHAR(256), NETWORK_PEER_PORT INT, NETWORK_PEER_HEARTBEAT_PORT INT , INTERFACE_CONNECT_TYPE CHAR(32) DEFAULT 'tor');
|
||||
INSERT INTO "SERVICE_DOMAIN_INTERFACES" VALUES(1,'yes','controller','management-interface','secondary','none','','','','','','','','','','','','tor');
|
||||
INSERT INTO "SERVICE_DOMAIN_INTERFACES" VALUES(2,'yes','controller','oam-interface','secondary','hmac-sha512','titanium-server','','','','','','','','','','','tor');
|
||||
INSERT INTO "SERVICE_DOMAIN_INTERFACES" VALUES(3,'yes','controller','infrastructure-interface','secondary','none','','','','','','','','','','','','tor');
|
||||
INSERT INTO "SERVICE_DOMAIN_INTERFACES" VALUES(3,'yes','controller','cluster-host-interface','secondary','none','','','','','','','','','','','','tor');
|
||||
CREATE TABLE SERVICE_DOMAINS ( ID INTEGER PRIMARY KEY AUTOINCREMENT, PROVISIONED CHAR(32), NAME CHAR(32), ORCHESTRATION CHAR(32), DESIGNATION CHAR(32), PREEMPT CHAR(32), PRIORITY INT, HELLO_INTERVAL INT, DEAD_INTERVAL INT, WAIT_INTERVAL INT, EXCHANGE_INTERVAL INT, STATE CHAR(32), SPLIT_BRAIN_RECOVERY CHAR(32), LEADER CHAR(32), GENERATION INT);
|
||||
INSERT INTO "SERVICE_DOMAINS" VALUES(1,'yes','controller','regional','unknown','no',230,200,800,5000,2000,'initial','select-best-active','',1);
|
||||
CREATE TABLE SERVICE_DOMAIN_MEMBERS ( ID INTEGER PRIMARY KEY AUTOINCREMENT, PROVISIONED CHAR(32), NAME CHAR(32), SERVICE_GROUP_NAME CHAR(32), REDUNDANCY_MODEL CHAR(32), N_ACTIVE INT, M_STANDBY INT, SERVICE_GROUP_AGGREGATE CHAR(32), ACTIVE_ONLY_IF_ACTIVE CHAR(32) );
|
||||
@ -67,7 +67,6 @@ INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(54,'no','storage-monitoring-services'
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(55,'no','controller-services','drbd-cinder','critical');
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(56,'no','controller-services','cinder-lvm','critical');
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(57,'no','controller-services','iscsi','critical');
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(58,'no','controller-services','cinder-ip','critical');
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(59,'yes','vim-services','vim','critical');
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(60,'yes','vim-services','vim-api','critical');
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" VALUES(61,'yes','vim-services','vim-webserver','minor');
|
||||
@ -96,6 +95,7 @@ INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'no','controller-services
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'yes','cloud-services','barbican-api','critical' FROM "SERVICE_GROUP_MEMBERS";
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'yes','cloud-services','barbican-keystone-listener','critical' FROM "SERVICE_GROUP_MEMBERS";
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'yes','cloud-services','barbican-worker','critical' FROM "SERVICE_GROUP_MEMBERS";
|
||||
INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'yes','controller-services','cluster-host-ip','critical' FROM "SERVICE_GROUP_MEMBERS";
|
||||
CREATE TABLE SERVICES ( ID INTEGER PRIMARY KEY AUTOINCREMENT, PROVISIONED CHAR(32), NAME CHAR(32), DESIRED_STATE CHAR(32), STATE CHAR(32), STATUS CHAR(32), CONDITION CHAR(32), MAX_FAILURES INT, FAIL_COUNTDOWN INT, FAIL_COUNTDOWN_INTERVAL INT, MAX_ACTION_FAILURES INT, MAX_TRANSITION_FAILURES INT, PID_FILE CHAR(256) );
|
||||
INSERT INTO "SERVICES" VALUES(1,'yes','oam-ip','initial','initial','none','none',2,1,90000,4,16,'');
|
||||
INSERT INTO "SERVICES" VALUES(2,'yes','management-ip','initial','initial','none','none',2,1,90000,4,16,'');
|
||||
@ -131,7 +131,6 @@ INSERT INTO "SERVICES" VALUES(54,'no','ceph-manager','initial','initial','none',
|
||||
INSERT INTO "SERVICES" VALUES(55,'no','drbd-cinder','initial','initial','none','none',2,1,90000,4,16,'');
|
||||
INSERT INTO "SERVICES" VALUES(56,'no','cinder-lvm','initial','initial','none','none',2,1,90000,4,16,'');
|
||||
INSERT INTO "SERVICES" VALUES(57,'no','iscsi','initial','initial','none','none',2,1,90000,4,16,'');
|
||||
INSERT INTO "SERVICES" VALUES(58,'no','cinder-ip','initial','initial','none','none',2,1,90000,4,16,'');
|
||||
INSERT INTO "SERVICES" VALUES(59,'yes','vim','initial','initial','none','none',2,1,90000,4,16,'/var/run/nfv-vim.pid');
|
||||
INSERT INTO "SERVICES" VALUES(60,'yes','vim-api','initial','initial','none','none',2,1,90000,4,16,'/var/run/nfv-vim-api.pid');
|
||||
INSERT INTO "SERVICES" VALUES(61,'yes','vim-webserver','initial','initial','none','none',2,1,90000,4,16,'/var/run/nfv-vim-webserver.pid');
|
||||
@ -160,6 +159,7 @@ INSERT INTO "SERVICES" SELECT MAX(id) + 1,'no','etcd-fs','initial','initial','no
|
||||
INSERT INTO "SERVICES" SELECT MAX(id) + 1,'yes','barbican-api','initial','initial','none','none',2,1,90000,4,16,'/var/run/barbican/pid' FROM "SERVICES";
|
||||
INSERT INTO "SERVICES" SELECT MAX(id) + 1,'yes','barbican-keystone-listener','initial','initial','none','none',2,1,90000,4,16,'/var/run/resource-agents/barbican-keystone-listener.pid' FROM "SERVICES";
|
||||
INSERT INTO "SERVICES" SELECT MAX(id) + 1,'yes','barbican-worker','initial','initial','none','none',2,1,90000,4,16,'/var/run/resource-agents/barbican-worker.pid' FROM "SERVICES";
|
||||
INSERT INTO "SERVICES" SELECT MAX(id) + 1,'yes','cluster-host-ip','initial','initial','none','none',2,1,90000,4,16,'' FROM "SERVICES";
|
||||
CREATE TABLE SERVICE_HEARTBEAT ( ID INTEGER PRIMARY KEY AUTOINCREMENT, PROVISIONED CHAR(32), NAME CHAR(32), TYPE CHAR(32), SRC_ADDRESS CHAR(256), SRC_PORT INT, DST_ADDRESS CHAR(256), DST_PORT INT, MESSAGE CHAR(256), INTERVAL_IN_MS INT, MISSED_WARN INT, MISSED_DEGRADE INT, MISSED_FAIL INT, STATE CHAR(32), MISSED INT, HEARTBEAT_TIMER_ID INT, HEARTBEAT_SOCKET INT );
|
||||
CREATE TABLE SERVICE_DEPENDENCY ( DEPENDENCY_TYPE CHAR(32), SERVICE_NAME CHAR(32), STATE CHAR(32), ACTION CHAR(32), DEPENDENT CHAR(32), DEPENDENT_STATE CHAR(32), PRIMARY KEY (DEPENDENCY_TYPE, SERVICE_NAME, STATE, ACTION, DEPENDENT));
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','oam-ip','not-applicable','enable','management-ip','enabled-active');
|
||||
@ -207,7 +207,6 @@ INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','drbd-cinder','not-applicable',
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','cinder-lvm','not-applicable','enable','drbd-cinder','enabled-active');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','iscsi','not-applicable','enable','cinder-lvm','enabled-active');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','iscsi','not-applicable','enable','cgcs-fs','enabled-active');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','cinder-ip','not-applicable','enable','iscsi','enabled-active');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','oam-ip','not-applicable','disable','haproxy','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','management-ip','not-applicable','disable','pg-fs','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','management-ip','not-applicable','disable','rabbit-fs','disabled');
|
||||
@ -247,8 +246,6 @@ INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','vim','not-applicable','disable
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','dnsmasq','not-applicable','disable','','');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','lighttpd','not-applicable','disable','horizon','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','ceph-rest-api','not-applicable','disable','ceph-manager','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','cinder-ip','not-applicable','disable','cgcs-nfs-ip','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','iscsi','not-applicable','disable','cinder-ip','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','drbd-cgcs','not-applicable','disable','iscsi','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','etcd-fs','not-applicable','disable','etcd','disabled');
|
||||
INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','cinder-lvm','not-applicable','disable','iscsi','disabled');
|
||||
@ -331,6 +328,10 @@ INSERT INTO "SERVICE_ACTIONS" VALUES('management-ip','enable','ocf-script','hear
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('management-ip','disable','ocf-script','heartbeat','IPaddr2','stop','',1,1,1,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('management-ip','audit-enabled','ocf-script','heartbeat','IPaddr2','monitor','',2,2,2,20,5);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('management-ip','audit-disabled','ocf-script','heartbeat','IPaddr2','monitor','',0,0,0,20,5);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cluster-host-ip','enable','ocf-script','heartbeat','IPaddr2','start','',2,2,2,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cluster-host-ip','disable','ocf-script','heartbeat','IPaddr2','stop','',1,1,1,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cluster-host-ip','audit-enabled','ocf-script','heartbeat','IPaddr2','monitor','',2,2,2,20,5);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cluster-host-ip','audit-disabled','ocf-script','heartbeat','IPaddr2','monitor','',0,0,0,20,5);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-pg','enable','ocf-script','linbit','drbd','start','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',2,2,2,90,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-pg','disable','ocf-script','linbit','drbd','stop','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',1,1,1,180,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-pg','go-active','ocf-script','linbit','drbd','promote','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',2,2,2,180,'');
|
||||
@ -502,10 +503,6 @@ INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-lvm','enable','ocf-script','heartbe
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-lvm','disable','ocf-script','heartbeat','LVM','stop','',1,1,1,30,20);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-lvm','audit-enabled','ocf-script','heartbeat','LVM','monitor','',2,2,2,60,20);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-lvm','audit-disabled','ocf-script','heartbeat','LVM','monitor','',0,0,0,30,20);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-ip','enable','ocf-script','heartbeat','IPaddr2','start','',2,2,2,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-ip','disable','ocf-script','heartbeat','IPaddr2','stop','',1,1,1,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-ip','audit-enabled','ocf-script','heartbeat','IPaddr2','monitor','',2,2,2,20,5);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('cinder-ip','audit-disabled','ocf-script','heartbeat','IPaddr2','monitor','',0,0,0,20,5);
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('pxeboot-ip','enable','ocf-script','heartbeat','IPaddr2','start','',2,2,2,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('pxeboot-ip','disable','ocf-script','heartbeat','IPaddr2','stop','',1,1,1,20,'');
|
||||
INSERT INTO "SERVICE_ACTIONS" VALUES('pxeboot-ip','audit-enabled','ocf-script','heartbeat','IPaddr2','monitor','',2,2,2,20,5);
|
||||
|
Loading…
Reference in New Issue
Block a user