Refactor infrastructure network in mtce code

Updated to read the host cluster-host parameter in /etc/hosts
file.
Replaced references of infra network with cluster-host network

Story: 2004273
Task: 29473

Change-Id: I199fb82e5f6b459b181196d0802f1a74220b796e
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
Teresa Ho 2019-04-14 20:42:59 -04:00
parent 94126225d0
commit 8e51a1660a
45 changed files with 573 additions and 578 deletions

View File

@ -35,7 +35,7 @@
#define MGMNT_HB_ALARM_ID ((const char *)"200.005")
#define PMOND_ALARM_ID ((const char *)"200.006")
#define SENSOR_ALARM_ID ((const char *)"200.007") /* Sensor read alarm ; i.e. the sensor read value bad */
#define INFRA_HB_ALARM_ID ((const char *)"200.009")
#define CLSTR_HB_ALARM_ID ((const char *)"200.009")
#define BM_ALARM_ID ((const char *)"200.010")
#define CONFIG_ALARM_ID ((const char *)"200.011")
#define CH_CONT_ALARM_ID ((const char *)"200.012") /* Combo Host Controller Failure - with Active Compute */

View File

@ -23,7 +23,7 @@
*
* - touch the 'no_mgmnt_ack' file on the mtcClient to cause
* it to handle command requests but drop/not send the ack message
* if it came in on themanagement network ; same for infra
* if it came in on the management network ; same for cluster-host
*
* - touch the 'no_mtcAlive file to tell mtcClient to stop sending
* its mtcAlive messages while this file is present.
@ -41,14 +41,14 @@
#define MTC_CMD_FIT__NO_RESET ("/var/run/fit/no_reset") /* mtcClient */
#define MTC_CMD_FIT__NO_WIPEDISK ("/var/run/fit/no_wipedisk") /* mtcClient */
#define MTC_CMD_FIT__NO_MGMNT_ACK ("/var/run/fit/no_mgmnt_ack") /* mtcClient */
#define MTC_CMD_FIT__NO_INFRA_ACK ("/var/run/fit/no_infra_ack") /* mtcClient */
#define MTC_CMD_FIT__NO_CLSTR_ACK ("/var/run/fit/no_clstr_ack") /* mtcClient */
#define MTC_CMD_FIT__NO_MTCALIVE ("/var/run/fit/no_mtcalive") /* mtcClient */
#define MTC_CMD_FIT__MGMNT_RXSOCK ("/var/run/fit/mgmnt_rxsock") /* mtcClient */
#define MTC_CMD_FIT__MGMNT_TXSOCK ("/var/run/fit/mgmnt_txsock") /* mtcClient */
#define MTC_CMD_FIT__INFRA_RXSOCK ("/var/run/fit/infra_rxsock") /* mtcClient */
#define MTC_CMD_FIT__INFRA_TXSOCK ("/var/run/fit/infra_txsock") /* mtcClient */
#define MTC_CMD_FIT__CLSTR_RXSOCK ("/var/run/fit/clstr_rxsock") /* mtcClient */
#define MTC_CMD_FIT__CLSTR_TXSOCK ("/var/run/fit/clstr_txsock") /* mtcClient */
#define MTC_CMD_FIT__AMON_SOCK ("/var/run/fit/amon_sock") /* mtcClient */
#define MTC_CMD_FIT__NO_INFRA_RSP ("/var/run/fit/no_infra_rsp") /* hbsClient */
#define MTC_CMD_FIT__NO_CLSTR_RSP ("/var/run/fit/no_clstr_rsp") /* hbsClient */
#define MTC_CMD_FIT__NO_MGMNT_RSP ("/var/run/fit/no_mgmnt_rsp") /* hbsClient */
#define MTC_CMD_FIT__LINKLIST ("/var/run/fit/linklist") /* hbsAgent */
#define MTC_CMD_FIT__HBSSILENT ("/var/run/fit/hbs_silent_fault") /* hbsAgent */
@ -96,7 +96,7 @@
#define FIT_CODE__DO_NOTHING_THREAD (9)
#define FIT_CODE__EMPTY_BM_PASSWORD (10)
#define FIT_CODE__INVALIDATE_MGMNT_IP (11)
#define FIT_CODE__INVALIDATE_INFRA_IP (12)
#define FIT_CODE__INVALIDATE_CLSTR_IP (12)
#define FIT_CODE__WORK_QUEUE (13)
#define FIT_CODE__NO_READY_EVENT (14)
#define FIT_CODE__NO_PULSE_REQUEST (15)

View File

@ -388,7 +388,7 @@ int jsonUtil_inv_load ( char * json_str_ptr,
info.host[i].uptime = _json_get_key_value_string ( node_obj, MTC_JSON_INV_UPTIME );
info.host[i].oper_subf = _json_get_key_value_string ( node_obj, MTC_JSON_INV_OPER_SUBF );
info.host[i].avail_subf = _json_get_key_value_string ( node_obj, MTC_JSON_INV_AVAIL_SUBF);
info.host[i].infra_ip = _json_get_key_value_string ( node_obj, MTC_JSON_INV_INFRAIP );
info.host[i].clstr_ip = _json_get_key_value_string ( node_obj, MTC_JSON_INV_CLSTRIP );
if ( info.host[i].uuid.length() != UUID_LEN )
{
@ -445,7 +445,7 @@ int jsonUtil_patch_load ( char * json_str_ptr,
info.uptime= _json_get_key_value_string ( node_obj, MTC_JSON_INV_UPTIME );
info.oper_subf = _json_get_key_value_string ( node_obj, MTC_JSON_INV_OPER_SUBF );
info.avail_subf = _json_get_key_value_string ( node_obj, MTC_JSON_INV_AVAIL_SUBF);
info.infra_ip = _json_get_key_value_string ( node_obj, MTC_JSON_INV_INFRAIP );
info.clstr_ip = _json_get_key_value_string ( node_obj, MTC_JSON_INV_CLSTRIP );
if (node_obj) json_object_put(node_obj);
@ -504,7 +504,7 @@ int jsonUtil_load_host ( char * json_str_ptr, node_inv_type & info )
info.id = _json_get_key_value_string ( node_obj, "id" );
info.oper_subf = _json_get_key_value_string ( node_obj, MTC_JSON_INV_OPER_SUBF );
info.avail_subf = _json_get_key_value_string ( node_obj, MTC_JSON_INV_AVAIL_SUBF);
info.infra_ip = _json_get_key_value_string ( node_obj, MTC_JSON_INV_INFRAIP );
info.clstr_ip = _json_get_key_value_string ( node_obj, MTC_JSON_INV_CLSTRIP );
if ( info.uuid.length() != UUID_LEN )
{

View File

@ -47,7 +47,7 @@ typedef struct
char* hbs_failure_action ; /**< action to take on host heartbeat falure*/
char* mgmnt_iface ; /**< management interface name pointer */
char* infra_iface ; /**< infrastructure interface name pointer */
char* clstr_iface ; /**< cluster-host interface name pointer */
char* multicast ; /**< Multicast address */
int ha_port ; /**< HA REST API Port Number */
int vim_cmd_port ; /**< Mtce -> VIM Command REST API Port */
@ -79,14 +79,14 @@ typedef struct
int barbican_api_port ; /**< Barbican REST API port number */
int mtc_rx_mgmnt_port ; /**< mtcClient listens mgmnt nwk cmd reqs */
int mtc_rx_infra_port ; /**< mtcClient listens infra nwk cmd reqs */
int mtc_rx_clstr_port ; /**< mtcClient listens clstr nwk cmd reqs */
int mtc_tx_mgmnt_port ; /**< mtcClient sends mgmnt nwk cmds/resp's */
int mtc_tx_infra_port ; /**< mtcClient sends infra nwk cmds/resp's */
int mtc_tx_clstr_port ; /**< mtcClient sends clstr nwk cmds/resp's */
int hbs_agent_mgmnt_port ; /**< hbsAgent mgmnt network pulse resp port */
int hbs_client_mgmnt_port ; /**< hbsClient mgmnt network pulse req port */
int hbs_agent_infra_port ; /**< hbsAgent infra network pulse resp port */
int hbs_client_infra_port ; /**< hbsClient infra network pulse req port */
int hbs_agent_clstr_port ; /**< hbsAgent clstr network pulse resp port */
int hbs_client_clstr_port ; /**< hbsClient clstr network pulse req port */
int daemon_log_port ; /**< daemon log port */
int mtcalarm_req_port ; /**< port daemons send alarm requests to */
@ -94,7 +94,7 @@ typedef struct
int agent_rx_port ;
int client_rx_port ;
bool infra_degrade_only ; /**< Only degrade on infra heartbeat failure */
bool clstr_degrade_only ; /**< Only degrade on clstr heartbeat failure */
int mtc_to_hbs_cmd_port ; /**< mtcAgent to hbsAgent command port */
int mtc_to_guest_cmd_port ; /**< mtcAgent to guestAgent command port */
int hwmon_cmd_port ; /**< mtcAgent to hwmon command port */
@ -121,7 +121,7 @@ typedef struct
int hostwd_failure_threshold ; /**< allowed # of missed pmon/hostwd messages */
bool hostwd_reboot_on_err ; /**< should hostwd reboot on fault detected */
bool hostwd_use_kern_wd ; /**< use the kernel watchdog for extra safety */
bool need_infra_poll_audit ; /**< true if we need to poll for infra */
bool need_clstr_poll_audit ; /**< true if we need to poll for clstr */
char *hostwd_console_path ; /**< console on which to log extreme events */
char *mode ; /**< Test Mode String */
int testmode ; /**< Test Head Test Mode */

View File

@ -267,39 +267,39 @@ socklen_t msgClassAddr::getSockLen() const
/**
* Given an interface, find the hostname that resolves on this interface
* and use that to get the IP address of this interface. Will only resolve
* hostnames on the Management or Infra interfaces
* hostnames on the Management or Cluster-host interfaces
*
* @param Name of the interface to get address for
* @param Character pointer to pass back address of interface
* @param Length of character array.
* @return Returns PASS if (mgmnt or infra) interface has address, FAIL otherwise
* @return Returns PASS if (mgmnt or clstr) interface has address, FAIL otherwise
*/
int msgClassAddr::getAddressFromInterface(const char* interface, char* address, int len)
{
int rc = FAIL;
// before proceeding further, confirm if the interface
// is either the management interface or the infra interface.
// is either the management interface or the cluster-host interface.
// Mtce doesn't care about others besides these.
iface_enum interface_type = iface_enum(0);
char *infra_iface_name = NULL;
char *clstr_iface_name = NULL;
get_infra_iface(&infra_iface_name);
if (infra_iface_name && strlen(infra_iface_name)) {
if (!strcmp(interface, infra_iface_name)) {
if (!strcmp(infra_iface_name, daemon_mgmnt_iface().data())) {
// infra and mgmt interface name are the same
get_clstr_iface(&clstr_iface_name);
if (clstr_iface_name && strlen(clstr_iface_name)) {
if (!strcmp(interface, clstr_iface_name)) {
if (!strcmp(clstr_iface_name, daemon_mgmnt_iface().data())) {
// cluster-host and mgmt interface name are the same
interface_type = MGMNT_IFACE;
}
else {
// requesting address for the infra interface
interface_type = INFRA_IFACE;
// requesting address for the cluster-host interface
interface_type = CLSTR_IFACE;
}
}
free (infra_iface_name);
free (clstr_iface_name);
}
if (interface_type != INFRA_IFACE) {
if (interface_type != CLSTR_IFACE) {
// check if this is the mgmt interface
// otherwise return error
if (!strcmp(interface, daemon_mgmnt_iface().data())) {
@ -325,16 +325,16 @@ int msgClassAddr::getAddressFromInterface(const char* interface, char* address,
return rc;
}
// if it is infra then we need to determine the interface
// if it is cluster-host then we need to determine the interface
// host name. For management interface, the system hostname
// is the intf hostname
const char* infra_suffix = "-infra";
size_t infra_suffix_len = sizeof(infra_suffix);
char iface_hostname[MAX_HOST_NAME_SIZE+infra_suffix_len];
const char* cluster_host_suffix = "-cluster-host";
size_t cluster_host_suffix_len = sizeof(cluster_host_suffix);
char iface_hostname[MAX_HOST_NAME_SIZE+cluster_host_suffix_len];
memset(iface_hostname, 0, sizeof(iface_hostname));
snprintf(iface_hostname, sizeof(iface_hostname),
"%s%s", hostname,
(((interface_type == INFRA_IFACE)) ? infra_suffix : ""));
(((interface_type == CLSTR_IFACE)) ? cluster_host_suffix : ""));
struct addrinfo *res = NULL;
int ret = getaddrinfo(iface_hostname, NULL, NULL, &res);

View File

@ -167,14 +167,14 @@ int get_netlink_events ( int nl_socket , std::list<string> & links_gone_down,
void log_link_events ( int netlink_sock,
int ioctl_sock,
const char * mgmnt_iface_ptr,
const char * infra_iface_ptr,
const char * clstr_iface_ptr,
bool & mgmnt_link_up_and_running,
bool & infra_link_up_and_running)
bool & clstr_link_up_and_running)
{
std::list<string> links_gone_down ;
std::list<string> links_gone_up ;
std::list<string>::iterator iter_curr_ptr ;
dlog3 ("logging for interfaces %s and %s\n", mgmnt_iface_ptr, infra_iface_ptr);
dlog3 ("logging for interfaces %s and %s\n", mgmnt_iface_ptr, clstr_iface_ptr);
if ( get_netlink_events ( netlink_sock, links_gone_down, links_gone_up ))
{
bool running = false ;
@ -190,7 +190,7 @@ void log_link_events ( int netlink_sock,
dlog3 ( "downed link: %s (running:%d:%d)\n",
iter_curr_ptr->c_str(),
mgmnt_link_up_and_running,
infra_link_up_and_running );
clstr_link_up_and_running );
if ( !strcmp (mgmnt_iface_ptr, iter_curr_ptr->data()))
{
@ -200,12 +200,12 @@ void log_link_events ( int netlink_sock,
wlog ("Mgmnt link %s is down\n", mgmnt_iface_ptr );
}
}
if ( !strcmp (infra_iface_ptr, iter_curr_ptr->data()))
if ( !strcmp (clstr_iface_ptr, iter_curr_ptr->data()))
{
if ( infra_link_up_and_running == true )
if ( clstr_link_up_and_running == true )
{
infra_link_up_and_running = false ;
wlog ("Infra link %s is down\n", infra_iface_ptr );
clstr_link_up_and_running = false ;
wlog ("Cluster-host link %s is down\n", clstr_iface_ptr );
}
}
@ -231,17 +231,17 @@ void log_link_events ( int netlink_sock,
dlog3 ( "recovered link: %s (running:%d:%d)\n",
iter_curr_ptr->c_str(),
mgmnt_link_up_and_running,
infra_link_up_and_running );
clstr_link_up_and_running );
if ( !strcmp (mgmnt_iface_ptr, iter_curr_ptr->data()))
{
mgmnt_link_up_and_running = true ;
wlog ("Mgmnt link %s is up\n", mgmnt_iface_ptr );
}
if ( !strcmp (infra_iface_ptr, iter_curr_ptr->data()))
if ( !strcmp (clstr_iface_ptr, iter_curr_ptr->data()))
{
infra_link_up_and_running = true ;
wlog ("Infra link %s is up\n", infra_iface_ptr );
clstr_link_up_and_running = true ;
wlog ("Cluster-host link %s is up\n", clstr_iface_ptr );
}
if ( get_link_state ( ioctl_sock, iter_curr_ptr->data(), &running ) == PASS )

View File

@ -18,7 +18,7 @@ int get_netlink_events ( int nl_socket ,
void log_link_events ( int netlink_sock,
int ioctl_sock,
const char * mgmnt_iface_ptr,
const char * infra_iface_ptr,
const char * clstr_iface_ptr,
bool & mgmnt_link_up_and_running,
bool & infra_link_up_and_running);
bool & clstr_link_up_and_running);

View File

@ -184,7 +184,7 @@ void daemon_exit ( void );
#define MTC_JSON_INV_NAME "hostname"
#define MTC_JSON_INV_HOSTIP "mgmt_ip"
#define MTC_JSON_INV_HOSTMAC "mgmt_mac"
#define MTC_JSON_INV_INFRAIP "infra_ip"
#define MTC_JSON_INV_CLSTRIP "cluster_host_ip"
#define MTC_JSON_INV_AVAIL "availability"
#define MTC_JSON_INV_OPER "operational"
#define MTC_JSON_INV_ADMIN "administrative"
@ -376,12 +376,7 @@ void daemon_exit ( void );
#define STORAGE_0 ((const char *)"storage-0")
#define STORAGE_1 ((const char *)"storage-1")
/* The infrastructure networking floating IP
*
* Note: If there is no infra then this label will resolve
* to another floating IP on the management network.
*
* If there is no Infra network then this label is not and should not be used */
/* This label will resolve to an IP on the management network */
#define CONTROLLER_NFS ((const char *)"controller-nfs")
#define CGTS_NODE_TYPES 4
@ -400,7 +395,7 @@ void daemon_exit ( void );
/** Interface Codes **/
#define MGMNT_INTERFACE (0)
#define INFRA_INTERFACE (1)
#define CLSTR_INTERFACE (1)
/** Maintenance Inventory struct */
@ -412,7 +407,7 @@ typedef struct
std::string name ;
std::string ip ;
std::string mac ;
std::string infra_ip ;
std::string clstr_ip ;
std::string admin ;
std::string oper ;
std::string avail ;
@ -634,7 +629,7 @@ typedef struct
#define PMOND_MISSING_THRESHOLD (100) /**< Count before degrade */
#define NULL_PULSE_FLAGS (0xffffffff) /**< Unknown flags value */
#define PMOND_FLAG (0x00000001) /**< Process Monitor O.K. Flag */
#define INFRA_FLAG (0x00000002) /**< Infrastructure iface provisioned Flag */
#define CLSTR_FLAG (0x00000002) /**< Cluster-host iface provisioned Flag */
#define CTRLX_MASK (0x00000300) /**< From/To Controller-0/1/2/3 Number */
#define CTRLX_BIT ((unsigned int)8) /**< used to shift right mask into bit 0 */
@ -961,7 +956,7 @@ string get_configStages_str ( mtc_configStages_enum stage );
* inservice test, etc. */
#define DEGRADE_MASK_NONE 0x00000000
#define DEGRADE_MASK_HEARTBEAT_MGMNT 0x00000001
#define DEGRADE_MASK_HEARTBEAT_INFRA 0x00000002
#define DEGRADE_MASK_HEARTBEAT_CLSTR 0x00000002
#define DEGRADE_MASK_PMON 0x00000004
#define DEGRADE_MASK_INSV_TEST 0x00000008
#define DEGRADE_MASK_AVS_MAJOR 0x00000010
@ -1189,7 +1184,7 @@ typedef enum
typedef enum
{
MGMNT_IFACE = 0,
INFRA_IFACE = 1,
CLSTR_IFACE = 1,
MAX_IFACES = 2
} iface_enum ;

View File

@ -766,26 +766,26 @@ int get_iface_address ( const char * iface_ptr, string & ip_addr , bool retry )
return (rc);
}
void get_infra_iface ( char ** infra_iface_ptr )
void get_clstr_iface ( char ** clstr_iface_ptr )
{
char * iface_ptr ;
string infra = daemon_infra_iface();
string clstr = daemon_clstr_iface();
/* remove .None from the interface name if it exists */
size_t found = infra.find(".None");
size_t found = clstr.find(".None");
if ( found != string::npos)
{
infra.erase(found, string::npos);
clstr.erase(found, string::npos);
}
if ( infra.size() )
if ( clstr.size() )
{
iface_ptr = daemon_get_iface_master ( (char*)infra.data());
*infra_iface_ptr = strdup((const char*)iface_ptr);
dlog("Infra iface : %s\n", *infra_iface_ptr );
iface_ptr = daemon_get_iface_master ( (char*)clstr.data());
*clstr_iface_ptr = strdup((const char*)iface_ptr);
dlog("Clstr iface : %s\n", *clstr_iface_ptr );
}
else
{
*infra_iface_ptr = strdup((const char*)"");
*clstr_iface_ptr = strdup((const char*)"");
}
}
@ -1347,7 +1347,7 @@ int get_pid_by_name_proc ( string procname )
const char mgmnt_iface_str[] = { "Mgmnt" } ;
const char infra_iface_str[] = { "Infra" } ;
const char clstr_iface_str[] = { "Clstr" } ;
const char null_iface_str[] = { "Null" } ;
const char * get_iface_name_str ( int iface )
@ -1356,8 +1356,8 @@ const char * get_iface_name_str ( int iface )
{
case MGMNT_IFACE:
return mgmnt_iface_str;
case INFRA_IFACE:
return infra_iface_str;
case CLSTR_IFACE:
return clstr_iface_str;
default:
return null_iface_str ;
}

View File

@ -59,7 +59,7 @@ int get_ip_addresses ( string & my_hostname , string & my_local_ip , string &
int get_iface_address ( const char * iface_ptr, string & ip_addr , bool retry );
int get_iface_hostname ( const char * iface_ptr, char * hostname_ptr);
int get_iface_macaddr ( const char * iface_ptr , string & macaddr );
void get_infra_iface ( char ** infra_iface_ptr );
void get_clstr_iface ( char ** clstr_iface_ptr );
int get_hostname ( char * hostname_ptr, int max_len );
string get_iface_mac ( const char * iface_ptr );

View File

@ -121,7 +121,7 @@
#define FAIL_JSON_OBJECT (97)
#define FAIL_EXTERNAL_API (98)
#define FAIL_PATCH_INPROGRESS (99)
#define FAIL_NO_INFRA_PROV (100)
#define FAIL_NO_CLSTR_PROV (100)
#define FAIL_PATCHED_NOREBOOT (101)
#define FAIL_NOT_SUPPORTED (102)
#define FAIL_NO_DATA (103)

View File

@ -78,7 +78,7 @@ int daemon_get_file_int ( const char * filename );
string daemon_get_file_str ( const char * filename );
string daemon_nodetype ( void );
string daemon_infra_iface ( void );
string daemon_clstr_iface ( void );
string daemon_mgmnt_iface ( void );
string daemon_sw_version ( void );
string daemon_bmc_hosts_file ( void );
@ -206,7 +206,7 @@ int daemon_run_testhead ( void );
#define CONFIG_AGENT_MULTICAST 0x00000004 /**< Multicase Addr */
#define CONFIG_SCHED_PRIORITY 0x00000008 /**< Scheduling priority */
#define CONFIG_AGENT_HBS_MGMNT_PORT 0x00000010 /**< Management Pulse Rx Port */
#define CONFIG_AGENT_HBS_INFRA_PORT 0x00000020 /**< Infra Pulse Rx Port */
#define CONFIG_AGENT_HBS_CLSTR_PORT 0x00000020 /**< Cluster-host Pulse Rx Port*/
#define CONFIG_AGENT_HBS_DEGRADE 0x00000040 /**< Heartbeat degrade */
#define CONFIG_AGENT_HBS_FAILURE 0x00000080 /**< Heartbeat failure */
#define CONFIG_AGENT_INV_PORT 0x00000100 /**< Inventory Port Number */
@ -218,13 +218,13 @@ int daemon_run_testhead ( void );
#define CONFIG_AGENT_HBS_MTC_PORT 0x00004000 /**< Heartbeat Service Port */
#define CONFIG_AGENT_INV_EVENT_PORT 0x00008000 /**< Inventory Event Port */
#define CONFIG_AGENT_API_RETRIES 0x00010000 /**< Num api retries b4 fail */
#define CONFIG_AGENT_MTC_INFRA_PORT 0x00020000 /**< Agent Infr network port */
#define CONFIG_AGENT_MTC_MGMNT_PORT 0x00040000 /**< Agent Infr network port */
#define CONFIG_AGENT_MTC_CLSTR_PORT 0x00020000 /**< Agent Clstr network port */
#define CONFIG_AGENT_MTC_MGMNT_PORT 0x00040000 /**< Agent Mgmnt network port */
#define CONFIG_AGENT_TOKEN_REFRESH 0x00080000 /**< Token refresh rate mask */
#define CONFIG_CLIENT_MTC_INFRA_PORT 0x00100000 /**< Client Infra nwk mtc port */
#define CONFIG_CLIENT_MTC_CLSTR_PORT 0x00100000 /**< Client Clstr nwk mtc port */
#define CONFIG_CLIENT_MTC_MGMNT_PORT 0x00200000 /**< Client mgmnt nwk mtc port */
#define CONFIG_AGENT_SM_SERVER_PORT 0x00400000 /**< Port to RX data from SM */
#define CONFIG_CLIENT_HBS_INFRA_PORT 0x00800000 /**< Infrastructure ntwk Port */
#define CONFIG_CLIENT_HBS_CLSTR_PORT 0x00800000 /**< Cluster-host ntwk Port */
#define CONFIG_CLIENT_HBS_MGMNT_PORT 0x01000000 /**< Management network Port */
#define CONFIG_CLIENT_HBS_EVENT_PORT 0x02000000 /**< Heartbeat Event Messaging */
#define CONFIG_MTC_TO_HBS_CMD_PORT 0x04000000 /**< Mtce to Hbs Command Port */

View File

@ -42,7 +42,7 @@ void daemon_config_default ( daemon_config_type* config_ptr )
config_ptr->keystone_region_name = strdup("none");
config_ptr->sysinv_mtc_inv_label = strdup("none");
config_ptr->mgmnt_iface = strdup("none");
config_ptr->infra_iface = strdup("none");
config_ptr->clstr_iface = strdup("none");
config_ptr->sysinv_api_bind_ip = strdup("none");
config_ptr->mode = strdup("none");
config_ptr->fit_host = strdup("none");
@ -294,8 +294,8 @@ void daemon_dump_cfg ( void )
ilog ("Configuration Settings ...\n");
if ( ptr->scheduling_priority ) { ilog ("scheduling_priority = %d\n", ptr->scheduling_priority ); }
if ( ptr->infra_degrade_only ) { ilog ("infra_degrade_only = %s\n", ptr->infra_degrade_only ? "Yes" : "No" );}
if ( ptr->need_infra_poll_audit ) { ilog ("need_infra_poll_audit = %s\n", ptr->need_infra_poll_audit ? "Yes" : "No" );}
if ( ptr->clstr_degrade_only ) { ilog ("clstr_degrade_only = %s\n", ptr->clstr_degrade_only ? "Yes" : "No" );}
if ( ptr->need_clstr_poll_audit ) { ilog ("need_clstr_poll_audit = %s\n", ptr->need_clstr_poll_audit ? "Yes" : "No" );}
if ( ptr->active ) { ilog ("active = %s\n", ptr->active ? "Yes" : "No" );}
/* hbsAgent */
@ -305,7 +305,7 @@ void daemon_dump_cfg ( void )
if ( ptr->hbs_failure_threshold ) { ilog ("hbs_failure_threshold = %d\n", ptr->hbs_failure_threshold );}
if ( strcmp(ptr->mgmnt_iface, "none" )) { ilog ("mgmnt_iface = %s\n", ptr->mgmnt_iface ); }
if ( strcmp(ptr->infra_iface, "none" )) { ilog ("infra_iface = %s\n", ptr->infra_iface );}
if ( strcmp(ptr->clstr_iface, "none" )) { ilog ("clstr_iface = %s\n", ptr->clstr_iface );}
if ( strcmp(ptr->multicast, "none" )) { ilog ("multicast = %s\n", ptr->multicast );}
if ( ptr->ha_port ) { ilog ("ha_port = %d\n", ptr->ha_port );}
@ -331,9 +331,9 @@ void daemon_dump_cfg ( void )
if ( ptr->barbican_api_host ) { ilog ("barbican_api_host = %s\n", ptr->barbican_api_host );}
if ( ptr->mtc_rx_mgmnt_port ) { ilog ("mtc_rx_mgmnt_port = %d\n", ptr->mtc_rx_mgmnt_port );}
if ( ptr->mtc_rx_infra_port ) { ilog ("mtc_rx_infra_port = %d\n", ptr->mtc_rx_infra_port );}
if ( ptr->mtc_rx_clstr_port ) { ilog ("mtc_rx_clstr_port = %d\n", ptr->mtc_rx_clstr_port );}
if ( ptr->mtc_tx_mgmnt_port ) { ilog ("mtc_tx_mgmnt_port = %d\n", ptr->mtc_tx_mgmnt_port );}
if ( ptr->mtc_tx_infra_port ) { ilog ("mtc_tx_infra_port = %d\n", ptr->mtc_tx_infra_port );}
if ( ptr->mtc_tx_clstr_port ) { ilog ("mtc_tx_clstr_port = %d\n", ptr->mtc_tx_clstr_port );}
if ( ptr->agent_rx_port ) { ilog ("agent_rx_port = %d\n", ptr->agent_rx_port );}
if ( ptr->client_rx_port ) { ilog ("client_rx_port = %d\n", ptr->client_rx_port );}
if ( ptr->mtc_to_hbs_cmd_port ) { ilog ("mtc_to_hbs_cmd_port = %d\n", ptr->mtc_to_hbs_cmd_port );}

View File

@ -267,12 +267,12 @@ int debug_config_handler ( void * user,
ilog ("Event Filter: %s\n", config_ptr->debug_event );
}
}
else if (MATCH("debug", "infra_degrade_only"))
else if (MATCH("debug", "clstr_degrade_only"))
{
config_ptr->infra_degrade_only = atoi(value);
if ( config_ptr->infra_degrade_only )
config_ptr->clstr_degrade_only = atoi(value);
if ( config_ptr->clstr_degrade_only )
{
ilog ("Infra Degrad: true\n" );
ilog ("Cluster-host Degrad: true\n" );
}
}
else if (MATCH("debug", "testmode"))

View File

@ -289,7 +289,7 @@ int daemon_get_rmem_max ( void )
* Read the platform.conf file looking for the management_interface label.
* If found return that value as string ; otherwise return empty string.
*
* const char infra_mgmt_label [] = {"management_interface"} ;
* const char clstr_mgmt_label [] = {"management_interface"} ;
*
* Stay here till we get the data we need
* Warning: Don't enable logging here
@ -464,13 +464,13 @@ system_type_enum daemon_system_type ( void )
/* ********************************************************************
*
* Name: daemon_infra_iface
* Name: daemon_clstr_iface
*
* Description: Read the platform.conf file looking for the infra
* Description: Read the platform.conf file looking for the cluster-host
* interface label. If found return that value as string ;
* otherwise return empty string.
**/
string daemon_infra_iface ( void )
string daemon_clstr_iface ( void )
{
char buffer [BUFFER];
int line = 0 ;
@ -482,17 +482,17 @@ string daemon_infra_iface ( void )
int rc ;
while ( fgets (buffer, BUFFER, cfg_file_stream) != NULL )
{
char* s = strstr ( buffer, "infrastructure_interface" );
char* s = strstr ( buffer, "cluster_host_interface" );
if(s!=NULL)
{
char iface_str[BUFFER];
memset ( iface_str, 0 , BUFFER );
rc = sscanf ( &buffer[0], "infrastructure_interface=%1023s", &iface_str[0] );
rc = sscanf ( &buffer[0], "cluster_host_interface=%1023s", &iface_str[0] );
if ( rc == 1 )
{
iface = iface_str ;
fclose(cfg_file_stream);
// ilog("Infra iface : %s\n", iface.c_str() );
// ilog("Cluster-host iface : %s\n", iface.c_str() );
return ( iface ) ;
}
}
@ -501,7 +501,7 @@ string daemon_infra_iface ( void )
/* Close the file */
fclose(cfg_file_stream);
}
dlog("Infra iface : none\n");
dlog("Cluster-host iface : none\n");
return ( "" );
}

View File

@ -251,7 +251,7 @@ Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
%description -n mtce-lmon
Titanium Cloud Maintenance Link Monitor service (lmond) provides
netlink monitoring for provisioned oam, mgmt and infra interfaces.
netlink monitoring for provisioned oam, mgmt and cluster-host interfaces.
%define local_dir /usr/local
%define local_bindir %{local_dir}/bin

View File

@ -53,7 +53,7 @@ void alarm_unregister_user ( void )
}
/* Construct an alarm request json string in the following form
{\"mtcalarm\":[{\"alarmid\":\"200.009\",\"hostname\":\"compute-3\",\"operation\":\"set\",\"severity\":\"major\",\"entity\":\"Infrastructure\",\"prefix\":\"service=heartbeat\"}, {\"alarmid\":\"200.005\",\"hostname\":\"compute-3\",\"operation\":\"set\",\"severity\":\"major\",\"entity\":\"Management\",\"prefix\":\"service=heartbeat\"}]}"
{\"mtcalarm\":[{\"alarmid\":\"200.009\",\"hostname\":\"compute-3\",\"operation\":\"set\",\"severity\":\"major\",\"entity\":\"cluster-host\",\"prefix\":\"service=heartbeat\"}, {\"alarmid\":\"200.005\",\"hostname\":\"compute-3\",\"operation\":\"set\",\"severity\":\"major\",\"entity\":\"Management\",\"prefix\":\"service=heartbeat\"}]}"
or
@ -64,7 +64,7 @@ void alarm_unregister_user ( void )
\"hostname\":\"compute-3\",
\"operation\":\"set\",
\"severity\":\"major\",
\"entity\":\"Infrastructure\",
\"entity\":\"cluster-host\",
\"prefix\":\"service=heartbeat\"
}
]

View File

@ -34,7 +34,7 @@
#define MGMNT_HB_ALARM_ID ((const char *)"200.005")
#define PMOND_ALARM_ID ((const char *)"200.006")
#define SENSOR_ALARM_ID ((const char *)"200.007") /* Sensor read alarm ; i.e. the sensor read value bad */
#define INFRA_HB_ALARM_ID ((const char *)"200.009")
#define CLSTR_HB_ALARM_ID ((const char *)"200.009")
#define BM_ALARM_ID ((const char *)"200.010")
#define CONFIG_ALARM_ID ((const char *)"200.011")
#define CH_CONT_ALARM_ID ((const char *)"200.012") /* Combo Host Controller Failure - with Active Compute */
@ -52,7 +52,7 @@
typedef enum
{
HBS_ALARM_ID__HB_MGMNT = 0,
HBS_ALARM_ID__HB_INFRA = 1,
HBS_ALARM_ID__HB_CLSTR = 1,
HBS_ALARM_ID__PMOND = 2,
HBS_ALARM_ID__SERVICE = 3,
HBS_ALARM_ID__LAST = 4,
@ -103,7 +103,7 @@ typedef struct
/* Test Commandss
*
STR="{\"mtcalarm\":[{\"alarmid\":\"200.009\",\"hostname\":\"compute-3\",\"operation\":\"clear\",\"severity\":\"clear\",\"entity\":\"Infrastructure\",\"prefix\":\"service=heartbeat\"}, {\"alarmid\":\"200.005\",\"hostname\":\"compute-3\",\"operation\":\"set\",\"severity\":\"major\",\"entity\":\"Management\",\"prefix\":\"service=heartbeat\"}]}"
STR="{\"mtcalarm\":[{\"alarmid\":\"200.009\",\"hostname\":\"compute-3\",\"operation\":\"clear\",\"severity\":\"clear\",\"entity\":\"cluster-host\",\"prefix\":\"service=heartbeat\"}, {\"alarmid\":\"200.005\",\"hostname\":\"compute-3\",\"operation\":\"set\",\"severity\":\"major\",\"entity\":\"Management\",\"prefix\":\"service=heartbeat\"}]}"
PROTOCOL="UDP4-DATAGRAM"
ADDRESS="127.0.0.1"
port="2122"

View File

@ -60,8 +60,8 @@ void alarmData_init ( void )
alarm_id_table[HBS_ALARM_ID__HB_MGMNT].identity_str = MGMNT_HB_ALARM_ID ;
alarm_id_table[HBS_ALARM_ID__HB_MGMNT].identity_num = HBS_ALARM_ID__HB_MGMNT ;
alarm_id_table[HBS_ALARM_ID__HB_INFRA].identity_str = INFRA_HB_ALARM_ID;
alarm_id_table[HBS_ALARM_ID__HB_INFRA].identity_num = HBS_ALARM_ID__HB_INFRA;
alarm_id_table[HBS_ALARM_ID__HB_CLSTR].identity_str = CLSTR_HB_ALARM_ID;
alarm_id_table[HBS_ALARM_ID__HB_CLSTR].identity_num = HBS_ALARM_ID__HB_CLSTR;
alarm_id_table[HBS_ALARM_ID__PMOND].identity_str = PMOND_ALARM_ID;
alarm_id_table[HBS_ALARM_ID__PMOND].identity_num = HBS_ALARM_ID__PMOND;
alarm_id_table[HBS_ALARM_ID__SERVICE].identity_str = SERVICESTATUS_LOG_ID;
@ -99,23 +99,23 @@ void alarmData_init ( void )
"If problem consistently occurs after that and Host is reset, then"
"contact next level of support or lock and replace failing Host.");
/** Infrastructure Network Heartbeat Alarm ************************************/
/** Cluster-host Network Heartbeat Alarm ************************************/
ptr = &alarm_list[HBS_ALARM_ID__HB_INFRA];
ptr = &alarm_list[HBS_ALARM_ID__HB_CLSTR];
memset (&ptr->alarm, 0, (sizeof(SFmAlarmDataT)));
snprintf(&ptr->alarm.alarm_id[0], FM_MAX_BUFFER_LENGTH, "%s", INFRA_HB_ALARM_ID);
snprintf(&ptr->alarm.alarm_id[0], FM_MAX_BUFFER_LENGTH, "%s", CLSTR_HB_ALARM_ID);
ptr->name = "Infrastructure Network' Heartbeat" ;
ptr->name = "Cluster-host Network' Heartbeat" ;
ptr->instc_prefix = "network=" ;
ptr->critl_reason = "experienced a persistent critical 'Infrastructure Network' "
ptr->critl_reason = "experienced a persistent critical 'Cluster-host Network' "
"communication failure.";
ptr->major_reason =
ptr->minor_reason = "is experiencing intermittent 'Infrastructure Network' "
ptr->minor_reason = "is experiencing intermittent 'Cluster-host Network' "
"communication failures that have exceeded its lower alarming threshold.";
ptr->clear_reason = "'Infrastructure Network' Heartbeat has 'resumed' if host is 'unlocked' "
ptr->clear_reason = "'Cluster-host Network' Heartbeat has 'resumed' if host is 'unlocked' "
"or 'stopped' if host is 'locked or deleted'";
ptr->alarm.alarm_type = FM_ALARM_COMM ;
@ -128,7 +128,7 @@ void alarmData_init ( void )
ptr->alarm.alarm_state = FM_ALARM_STATE_CLEAR ; /* Dynamic */
snprintf( ptr->alarm.proposed_repair_action, FM_MAX_BUFFER_LENGTH,
"Check 'Infrastructure Network' connectivity and support for multicast messaging."
"Check 'Cluster-host Network' connectivity and support for multicast messaging."
"If problem consistently occurs after that and Host is reset, then"
"contact next level of support or lock and replace failing Host.");

View File

@ -46,9 +46,9 @@ EFmAlarmSeverityT alarmUtil_getSev_enum ( string sev )
int alarmUtil_getId_enum ( string alarmid, alarm_id_enum & id )
{
/* Get the ID */
if ( alarmid.compare(INFRA_HB_ALARM_ID) == 0 )
if ( alarmid.compare(CLSTR_HB_ALARM_ID) == 0 )
{
id = HBS_ALARM_ID__HB_INFRA ;
id = HBS_ALARM_ID__HB_CLSTR ;
}
else if ( alarmid.compare(MGMNT_HB_ALARM_ID) == 0 )
{

View File

@ -291,14 +291,14 @@ nodeLinkClass::nodeLinkClass()
/* Start with no failures */
mnfa_awol_list.clear();
mnfa_host_count[MGMNT_IFACE] = 0 ;
mnfa_host_count[INFRA_IFACE] = 0 ;
mnfa_host_count[CLSTR_IFACE] = 0 ;
mnfa_occurances = 0 ;
mnfa_active = false ;
mgmnt_link_up_and_running = false ;
infra_link_up_and_running = false ;
infra_network_provisioned = false ;
infra_degrade_only = false ;
clstr_link_up_and_running = false ;
clstr_network_provisioned = false ;
clstr_degrade_only = false ;
dor_mode_active = false ;
dor_start_time = 0 ;
@ -497,8 +497,8 @@ nodeLinkClass::node* nodeLinkClass::addNode( string hostname )
ptr->ip = "" ;
ptr->mac = "" ;
ptr->infra_ip = "" ;
ptr->infra_mac = "" ;
ptr->clstr_ip = "" ;
ptr->clstr_mac = "" ;
ptr->patching = false ;
ptr->patched = false ;
@ -554,9 +554,9 @@ nodeLinkClass::node* nodeLinkClass::addNode( string hostname )
ptr->offline_search_count = 0 ;
ptr->mtcAlive_mgmnt = false ;
ptr->mtcAlive_infra = false ;
ptr->mtcAlive_clstr = false ;
ptr->reboot_cmd_ack_mgmnt = false ;
ptr->reboot_cmd_ack_infra = false ;
ptr->reboot_cmd_ack_clstr = false ;
ptr->offline_log_throttle = 0 ;
ptr->offline_log_reported = true ;
@ -783,8 +783,8 @@ struct nodeLinkClass::node* nodeLinkClass::getNode ( string hostname )
{
return ptr ;
}
/* Node can be looked up by infra_ip addr too */
if ( !hostname.compare ( ptr->infra_ip ))
/* Node can be looked up by cluster_host_ip addr too */
if ( !hostname.compare ( ptr->clstr_ip ))
{
return ptr ;
}
@ -1172,7 +1172,7 @@ void nodeLinkClass::print_node_info ( void )
{
for ( int i = 0 ; i < MAX_IFACES ; i++ )
{
if (( i == INFRA_IFACE ) && ( infra_network_provisioned == false ))
if (( i == CLSTR_IFACE ) && ( clstr_network_provisioned == false ))
continue ;
syslog ( LOG_INFO, "+--------------+-----+-------+-------+-------+-------+------------+----------+-----------------+\n");
@ -2330,17 +2330,17 @@ int nodeLinkClass::mod_host ( node_inv_type & inv )
modify = true ; /* we have a delta */
}
if ( node_ptr->infra_ip.compare ( inv.infra_ip ) )
if ( node_ptr->clstr_ip.compare ( inv.clstr_ip ) )
{
if (( hostUtil_is_valid_ip_addr ( inv.infra_ip )) || ( hostUtil_is_valid_ip_addr ( node_ptr->infra_ip )))
if (( hostUtil_is_valid_ip_addr ( inv.clstr_ip )) || ( hostUtil_is_valid_ip_addr ( node_ptr->clstr_ip )))
{
plog ("%s Modify 'infra_ip' from %s -> %s\n",
plog ("%s Modify 'clstr_ip' from %s -> %s\n",
node_ptr->hostname.c_str(),
node_ptr->infra_ip.c_str(), inv.infra_ip.c_str() );
node_ptr->clstr_ip.c_str(), inv.clstr_ip.c_str() );
modify = true ; /* we have a delta */
}
node_ptr->infra_ip = inv.infra_ip ;
node_ptr->clstr_ip = inv.clstr_ip ;
}
if ( (!inv.name.empty()) && (node_ptr->hostname.compare ( inv.name)) )
{
@ -2708,7 +2708,7 @@ int nodeLinkClass::add_host ( node_inv_type & inv )
node_ptr->ip = inv.ip ;
node_ptr->mac = inv.mac ;
node_ptr->uuid = inv.uuid ;
node_ptr->infra_ip = inv.infra_ip ;
node_ptr->clstr_ip = inv.clstr_ip ;
if ( inv.uptime.length() )
{
@ -3256,13 +3256,13 @@ string nodeLinkClass::get_hostaddr ( string & hostname )
return ( null_str );
}
string nodeLinkClass::get_infra_hostaddr ( string & hostname )
string nodeLinkClass::get_clstr_hostaddr ( string & hostname )
{
nodeLinkClass::node* node_ptr ;
node_ptr = nodeLinkClass::getNode ( hostname );
if ( node_ptr != NULL )
{
return ( node_ptr->infra_ip );
return ( node_ptr->clstr_ip );
}
return ( null_str );
}
@ -3275,8 +3275,8 @@ string nodeLinkClass::get_hostIfaceMac ( string & hostname, int iface )
{
if ( iface == MGMNT_IFACE )
return ( node_ptr->mac );
if ( iface == INFRA_IFACE )
return ( node_ptr->infra_mac );
if ( iface == CLSTR_IFACE )
return ( node_ptr->clstr_mac );
}
ilog ("%s has unknown mac address for %s interface\n", hostname.c_str(), get_iface_name_str(iface));
return ( null_str );
@ -3296,7 +3296,7 @@ int nodeLinkClass::set_hostaddr ( string & hostname, string & ip )
return ( rc );
}
int nodeLinkClass::set_infra_hostaddr ( string & hostname, string & ip )
int nodeLinkClass::set_clstr_hostaddr ( string & hostname, string & ip )
{
int rc = FAIL ;
@ -3304,7 +3304,7 @@ int nodeLinkClass::set_infra_hostaddr ( string & hostname, string & ip )
node_ptr = nodeLinkClass::getNode ( hostname );
if ( node_ptr != NULL )
{
node_ptr->infra_ip = ip ;
node_ptr->clstr_ip = ip ;
rc = PASS ;
}
return ( rc );
@ -3499,9 +3499,9 @@ void nodeLinkClass::set_mtcAlive ( string & hostname, int interface )
node_ptr->mtcAlive_offline = false ;
node_ptr->mtcAlive_count++ ;
if ( interface == INFRA_INTERFACE )
if ( interface == CLSTR_INTERFACE )
{
node_ptr->mtcAlive_infra = true ;
node_ptr->mtcAlive_clstr = true ;
}
else
{
@ -4265,7 +4265,7 @@ int nodeLinkClass::service_netlink_events ( int nl_socket , int ioctl_socket )
if ( get_netlink_events ( nl_socket, links_gone_down, links_gone_up ))
{
const char * mgmnt_iface_ptr = daemon_get_cfg_ptr()->mgmnt_iface ;
const char * infra_iface_ptr = daemon_get_cfg_ptr()->infra_iface ;
const char * clstr_iface_ptr = daemon_get_cfg_ptr()->clstr_iface ;
bool running = false ;
if ( !links_gone_down.empty() )
{
@ -4285,11 +4285,11 @@ int nodeLinkClass::service_netlink_events ( int nl_socket , int ioctl_socket )
mgmnt_link_up_and_running = false ;
wlog ("Management link %s is down\n", mgmnt_iface_ptr );
}
if ( !strcmp (infra_iface_ptr, iter_curr_ptr->data()))
if ( !strcmp (clstr_iface_ptr, iter_curr_ptr->data()))
{
care = true ;
infra_link_up_and_running = false ;
wlog ("Infrastructure link %s is down\n", infra_iface_ptr );
clstr_link_up_and_running = false ;
wlog ("Cluster-host link %s is down\n", clstr_iface_ptr );
}
if ( care == true )
@ -4321,10 +4321,10 @@ int nodeLinkClass::service_netlink_events ( int nl_socket , int ioctl_socket )
mgmnt_link_up_and_running = true ;
wlog ("Management link %s is up\n", mgmnt_iface_ptr );
}
if ( !strcmp (infra_iface_ptr, iter_curr_ptr->data()))
if ( !strcmp (clstr_iface_ptr, iter_curr_ptr->data()))
{
infra_link_up_and_running = true ;
wlog ("Infrastructure link %s is up\n", infra_iface_ptr );
clstr_link_up_and_running = true ;
wlog ("Cluster-host link %s is up\n", clstr_iface_ptr );
}
if ( care == true )
{
@ -4515,8 +4515,8 @@ void nodeLinkClass::manage_heartbeat_failure ( string hostname, iface_enum iface
plog ("%s %s Heartbeat failure clear\n", hostname.c_str(), get_iface_name_str(iface));
// if (( mnfa_host_count == 0 ) || ( iface == INFRA_IFACE ))
if ( mnfa_host_count[iface] == 0 ) // || ( iface == INFRA_IFACE ))
// if (( mnfa_host_count == 0 ) || ( iface == CLSTR_IFACE ))
if ( mnfa_host_count[iface] == 0 ) // || ( iface == CLSTR_IFACE ))
{
slog ("%s %s Heartbeat failure clear\n", hostname.c_str(), get_iface_name_str(iface));
node_ptr->hbs_failure[iface] = false ;
@ -4553,9 +4553,9 @@ void nodeLinkClass::manage_heartbeat_failure ( string hostname, iface_enum iface
if ( mnfa_active == false )
{
elog ("%s %s *** Heartbeat Loss ***\n", hostname.c_str(), get_iface_name_str(iface));
if ( iface == INFRA_IFACE )
if ( iface == CLSTR_IFACE )
{
node_ptr->heartbeat_failed[INFRA_IFACE] = true ;
node_ptr->heartbeat_failed[CLSTR_IFACE] = true ;
}
else if ( iface == MGMNT_IFACE )
{
@ -4610,10 +4610,10 @@ void nodeLinkClass::manage_heartbeat_clear ( string hostname, iface_enum iface )
node_ptr->alarms[HBS_ALARM_ID__HB_MGMNT] = FM_ALARM_SEVERITY_CLEAR ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_MGMNT ;
}
if ( i == INFRA_IFACE )
if ( i == CLSTR_IFACE )
{
node_ptr->alarms[HBS_ALARM_ID__HB_INFRA] = FM_ALARM_SEVERITY_CLEAR ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_INFRA ;
node_ptr->alarms[HBS_ALARM_ID__HB_CLSTR] = FM_ALARM_SEVERITY_CLEAR ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_CLSTR ;
}
}
}
@ -4625,10 +4625,10 @@ void nodeLinkClass::manage_heartbeat_clear ( string hostname, iface_enum iface )
node_ptr->alarms[HBS_ALARM_ID__HB_MGMNT] = FM_ALARM_SEVERITY_CLEAR ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_MGMNT ;
}
else if ( iface == INFRA_IFACE )
else if ( iface == CLSTR_IFACE )
{
node_ptr->alarms[HBS_ALARM_ID__HB_INFRA] = FM_ALARM_SEVERITY_CLEAR ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_INFRA ;
node_ptr->alarms[HBS_ALARM_ID__HB_CLSTR] = FM_ALARM_SEVERITY_CLEAR ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_CLSTR ;
}
}
}
@ -4655,10 +4655,10 @@ void nodeLinkClass::manage_heartbeat_degrade ( string hostname, iface_enum iface
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_MGMNT ;
}
else if ( iface == INFRA_IFACE )
else if ( iface == CLSTR_IFACE )
{
node_ptr->no_work_log_throttle = 0 ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_INFRA ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_CLSTR ;
}
hbs_minor_clear ( node_ptr, iface );
@ -4686,11 +4686,11 @@ void nodeLinkClass::manage_heartbeat_degrade ( string hostname, iface_enum iface
node_ptr->degrade_mask |= DEGRADE_MASK_HEARTBEAT_MGMNT ;
}
}
if ( iface == INFRA_IFACE )
if ( iface == CLSTR_IFACE )
{
if ( !(node_ptr->degrade_mask & DEGRADE_MASK_HEARTBEAT_INFRA) )
if ( !(node_ptr->degrade_mask & DEGRADE_MASK_HEARTBEAT_CLSTR) )
{
node_ptr->degrade_mask |= DEGRADE_MASK_HEARTBEAT_INFRA ;
node_ptr->degrade_mask |= DEGRADE_MASK_HEARTBEAT_CLSTR ;
}
}
}
@ -7310,9 +7310,9 @@ int nodeLinkClass::mon_host ( const string & hostname, bool true_false, bool sen
bool want_log = true ;
for ( int iface = 0 ; iface < MAX_IFACES ; iface++ )
{
if ( iface == INFRA_IFACE )
if ( iface == CLSTR_IFACE )
{
if ( this->infra_network_provisioned == false )
if ( this->clstr_network_provisioned == false )
continue ;
if ( node_ptr->monitor[MGMNT_IFACE] == true_false )
@ -7438,21 +7438,21 @@ void nodeLinkClass::manage_pulse_flags ( struct nodeLinkClass::node * node_ptr,
return ;
}
/* Code that manages enabling of Infrastructrure network moonitoring
/* Code that manages enabling of Cluster-host network monitoring
*
* Algorithm: Only monitor a hosts infrastructure network while the
* Algorithm: Only monitor a hosts cluster-host network while the
* management network of that same host is being monitored
* and while that host indicates support for the infrastructure
* network by setting the INFRA_FLAG in its management network
* and while that host indicates support for the cluster-host
* network by setting the CLSTR_FLAG in its management network
* pulse responses. */
if ( node_ptr->monitor[MGMNT_IFACE] == false )
{
node_ptr->monitor[INFRA_IFACE] = false ;
node_ptr->monitor[CLSTR_IFACE] = false ;
}
else if ( flags & INFRA_FLAG )
else if ( flags & CLSTR_FLAG )
{
/* TODO: Does this need to be debounced ??? */
node_ptr->monitor[INFRA_IFACE] = true ;
node_ptr->monitor[CLSTR_IFACE] = true ;
}
/* A host indicates that its process monitor is running by setting the
@ -8034,9 +8034,9 @@ void nodeLinkClass::manage_heartbeat_alarm ( struct nodeLinkClass::node * node_p
}
else
{
entity_ptr = INFRA_NAME ;
id = HBS_ALARM_ID__HB_INFRA ;
alarm_id_ptr = INFRA_HB_ALARM_ID;
entity_ptr = CLSTR_NAME ;
id = HBS_ALARM_ID__HB_CLSTR ;
alarm_id_ptr = CLSTR_HB_ALARM_ID;
}
if ( sev == FM_ALARM_SEVERITY_CLEAR )
@ -8239,11 +8239,11 @@ int nodeLinkClass::lost_pulses ( iface_enum iface, bool & storage_0_responding )
}
}
/* Turn the infra heartbeat loss into a degrade only
* condition if the infra_degrade_only flag is set */
if (( iface == INFRA_IFACE ) &&
/* Turn the cluster-host heartbeat loss into a degrade only
* condition if the clstr_degrade_only flag is set */
if (( iface == CLSTR_IFACE ) &&
( pulse_ptr->b2b_misses_count[iface] >= hbs_failure_threshold ) &&
( infra_degrade_only == true ))
( clstr_degrade_only == true ))
{
/* Only print the log at the threshold boundary */
if (( pulse_ptr->b2b_misses_count[iface]%HBS_LOSS_REPORT_THROTTLE) == hbs_failure_threshold )
@ -8260,9 +8260,9 @@ int nodeLinkClass::lost_pulses ( iface_enum iface, bool & storage_0_responding )
}
}
/* Turn the infra heartbeat loss into a degrade only
/* Turn the clstr heartbeat loss into a degrade only
* condition for inactive controller on normal system. */
else if (( iface == INFRA_IFACE ) &&
else if (( iface == CLSTR_IFACE ) &&
( pulse_ptr->b2b_misses_count[iface] >= hbs_failure_threshold ) &&
( this->system_type == SYSTEM_TYPE__NORMAL ) &&
(( pulse_ptr->nodetype & CONTROLLER_TYPE) == CONTROLLER_TYPE ))
@ -8405,8 +8405,8 @@ void nodeLinkClass::mem_log_general ( void )
my_float_ip.c_str(),
daemon_get_cfg_ptr()->mgmnt_iface,
mgmnt_link_up_and_running ? "Up" : "Down",
daemon_get_cfg_ptr()->infra_iface,
infra_link_up_and_running ? "Up" : "Down");
daemon_get_cfg_ptr()->clstr_iface,
clstr_link_up_and_running ? "Up" : "Down");
mem_log (str);
}
@ -8433,7 +8433,7 @@ void nodeLinkClass::mem_log_mnfa ( void )
my_hostname.c_str(),
mnfa_active ? "ACTIVE" : "inactive",
mnfa_host_count[MGMNT_IFACE],
mnfa_host_count[INFRA_IFACE],
mnfa_host_count[CLSTR_IFACE],
mnfa_threshold,
mnfa_occurances);
mem_log (str);
@ -8591,11 +8591,11 @@ void nodeLinkClass::mem_log_reset_info ( struct nodeLinkClass::node * node_ptr )
void nodeLinkClass::mem_log_network ( struct nodeLinkClass::node * node_ptr )
{
char str[MAX_MEM_LOG_DATA] ;
snprintf (&str[0], MAX_MEM_LOG_DATA, "%s\t%s %s infra_ip: %s Uptime: %u\n",
snprintf (&str[0], MAX_MEM_LOG_DATA, "%s\t%s %s cluster_host_ip: %s Uptime: %u\n",
node_ptr->hostname.c_str(),
node_ptr->mac.c_str(),
node_ptr->ip.c_str(),
node_ptr->infra_ip.c_str(),
node_ptr->clstr_ip.c_str(),
node_ptr->uptime );
mem_log (str);
}

View File

@ -115,11 +115,11 @@ private:
/** The Mac address of the host node */
std::string mac ;
/** The infrastructure network IP address of the host node */
std::string infra_ip ;
/** The cluster-host network IP address of the host node */
std::string clstr_ip ;
/** The Mac address of the host's infra interface */
std::string infra_mac ;
/** The Mac address of the host's cluster-host interface */
std::string clstr_mac ;
/** The type of node 'controller' or 'worker' node */
std::string type ;
@ -305,7 +305,7 @@ private:
int mtcAlive_purge ;
bool mtcAlive_mgmnt ; /* set true when mtcAlive is rx'd from mgmnt network */
bool mtcAlive_infra ; /* set true when mtcAlive is rx'd from infra network */
bool mtcAlive_clstr ; /* set true when mtcAlive is rx'd from clstr network */
/* Both of these booleans are set true upon receipt of a mtcAlive message. */
bool mtcAlive_online ; /* this is consumed by online and offline handler */
@ -436,7 +436,7 @@ private:
string cmdRsp_status_string ;
bool reboot_cmd_ack_mgmnt ;
bool reboot_cmd_ack_infra ;
bool reboot_cmd_ack_clstr ;
/** Tracks back to back Fast Fault Recovery counts */
int graceful_recovery_counter;
@ -1361,14 +1361,14 @@ public:
/** get mac address for any hostname and specified interface */
string get_hostIfaceMac ( string & hostname, int iface );
/** get infrastructure network ip address for any hostname */
string get_infra_hostaddr ( string & hostname );
/** get cluster-host network ip address for any hostname */
string get_clstr_hostaddr ( string & hostname );
/** set a node's ip address */
int set_hostaddr ( string & hostname, string & ip );
/** set a node's infrastructure ip address */
int set_infra_hostaddr ( string & hostname, string & ip );
/** set a node's cluster-host ip address */
int set_clstr_hostaddr ( string & hostname, string & ip );
/** get hostname for any hostname */
string get_hostname ( string & hostaddr );
@ -1592,15 +1592,15 @@ public:
/** true if the management link's operational state is up and running */
bool mgmnt_link_up_and_running ;
bool infra_link_up_and_running ;
bool clstr_link_up_and_running ;
/** A boolean that is used to quickly determine if the infrastructure
/** A boolean that is used to quickly determine if the cluster-host
* network is provisioned and configured for this daemon to use */
bool infra_network_provisioned ;
bool clstr_network_provisioned ;
/** A debug bool hat allows infrastructure heartbeat failures to only
/** A debug bool hat allows cluster-host heartbeat failures to only
* cause host degrade rather than failure */
bool infra_degrade_only ;
bool clstr_degrade_only ;
int service_netlink_events ( int nl_socket , int ioctl_socket );
void manage_heartbeat_minor ( string hostname, iface_enum iface, bool clear_event );

View File

@ -202,10 +202,10 @@ void daemon_exit ( void )
CONFIG_MTC_TO_HBS_CMD_PORT |\
CONFIG_HBS_TO_MTC_EVENT_PORT |\
CONFIG_AGENT_HBS_MGMNT_PORT |\
CONFIG_AGENT_HBS_INFRA_PORT |\
CONFIG_AGENT_HBS_CLSTR_PORT |\
CONFIG_CLIENT_HBS_MGMNT_PORT |\
CONFIG_CLIENT_MTCALARM_PORT |\
CONFIG_CLIENT_HBS_INFRA_PORT |\
CONFIG_CLIENT_HBS_CLSTR_PORT |\
CONFIG_AGENT_SM_SERVER_PORT |\
CONFIG_AGENT_SM_CLIENT_PORT)
@ -342,15 +342,15 @@ static int hbs_config_handler ( void * user,
config_ptr->hbs_client_mgmnt_port = atoi(value);
config_ptr->mask |= CONFIG_CLIENT_HBS_MGMNT_PORT ;
}
else if (MATCH("agent", "hbs_agent_infra_port"))
else if (MATCH("agent", "hbs_agent_clstr_port"))
{
config_ptr->hbs_agent_infra_port = atoi(value);
config_ptr->mask |= CONFIG_AGENT_HBS_INFRA_PORT ;
config_ptr->hbs_agent_clstr_port = atoi(value);
config_ptr->mask |= CONFIG_AGENT_HBS_CLSTR_PORT ;
}
else if (MATCH("client", "hbs_client_infra_port"))
else if (MATCH("client", "hbs_client_clstr_port"))
{
config_ptr->hbs_client_infra_port = atoi(value);
config_ptr->mask |= CONFIG_CLIENT_HBS_INFRA_PORT ;
config_ptr->hbs_client_clstr_port = atoi(value);
config_ptr->mask |= CONFIG_CLIENT_HBS_CLSTR_PORT ;
}
else if ( MATCH("client", "mtcalarm_req_port") )
{
@ -414,22 +414,22 @@ int daemon_configure ( void )
ilog("Mgmnt Port : %d (rx)", hbs_config.hbs_agent_mgmnt_port );
ilog("Mgmnt Port : %d (tx)\n", hbs_config.hbs_client_mgmnt_port );
/* Fetch the infrastructure interface name.
/* Fetch the cluster-host interface name.
* calls daemon_get_iface_master inside so the
* aggrigated name is returned if it exists */
get_infra_iface (&hbs_config.infra_iface );
if ( strlen(hbs_config.infra_iface) )
get_clstr_iface (&hbs_config.clstr_iface );
if ( strlen(hbs_config.clstr_iface) )
{
if (!strcmp(hbs_config.infra_iface, hbs_config.mgmnt_iface))
if (!strcmp(hbs_config.clstr_iface, hbs_config.mgmnt_iface))
{
hbsInv.infra_network_provisioned = false ;
hbsInv.clstr_network_provisioned = false ;
}
else
{
hbsInv.infra_network_provisioned = true ;
ilog ("Infra Name : %s", hbs_config.infra_iface );
ilog ("Infra Port : %d (rx)", hbs_config.hbs_agent_infra_port );
ilog ("Infra Port : %d (tx)", hbs_config.hbs_client_infra_port );
hbsInv.clstr_network_provisioned = true ;
ilog ("Clstr Name : %s", hbs_config.clstr_iface );
ilog ("Clstr Port : %d (rx)", hbs_config.hbs_agent_clstr_port );
ilog ("Clstr Port : %d (tx)", hbs_config.hbs_client_clstr_port );
}
}
@ -440,7 +440,7 @@ int daemon_configure ( void )
hbsInv.hbs_state_change = true ;
/* pull in the degrade only config option */
hbsInv.infra_degrade_only = hbs_config.infra_degrade_only ;
hbsInv.clstr_degrade_only = hbs_config.clstr_degrade_only ;
if ( hbsInv.hbs_degrade_threshold >= hbsInv.hbs_failure_threshold )
{
@ -543,13 +543,13 @@ int _setup_pulse_messaging ( iface_enum i, int rmem_max )
{
iface = hbs_config.mgmnt_iface ;
}
else if (( i == INFRA_IFACE ) && ( hbs_config.infra_iface != NULL ))
else if (( i == CLSTR_IFACE ) && ( hbs_config.clstr_iface != NULL ))
{
iface = hbs_config.infra_iface ;
iface = hbs_config.clstr_iface ;
}
else
{
wlog ("No Infrastructure Interface\n");
wlog ("No Cluster-host Interface\n");
return (RETRY);
}
@ -860,11 +860,11 @@ int hbs_socket_init ( void )
*/
hbs_sock.rx_port[MGMNT_IFACE] = hbs_config.hbs_agent_mgmnt_port ;
hbs_sock.tx_port[MGMNT_IFACE] = hbs_config.hbs_client_mgmnt_port;
hbs_sock.rx_port[INFRA_IFACE] = hbs_config.hbs_agent_infra_port ;
hbs_sock.tx_port[INFRA_IFACE] = hbs_config.hbs_client_infra_port;
hbs_sock.rx_port[CLSTR_IFACE] = hbs_config.hbs_agent_clstr_port ;
hbs_sock.tx_port[CLSTR_IFACE] = hbs_config.hbs_client_clstr_port;
/* Setup the pulse messaging interfaces */
SETUP_PULSE_MESSAGING ( hbsInv.infra_network_provisioned, rmem_max ) ;
SETUP_PULSE_MESSAGING ( hbsInv.clstr_network_provisioned, rmem_max ) ;
if (( hbs_sock.netlink_sock = open_netlink_socket ( RTMGRP_LINK )) <= 0 )
{
@ -1117,7 +1117,7 @@ int _pulse_receive ( iface_enum iface , unsigned int seq_num )
if ( iface == MGMNT_IFACE )
hbs_cluster_save ( hostname, MTCE_HBS_NETWORK_MGMT , hbs_sock.rx_mesg[iface]);
else
hbs_cluster_save ( hostname, MTCE_HBS_NETWORK_INFRA , hbs_sock.rx_mesg[iface]);
hbs_cluster_save ( hostname, MTCE_HBS_NETWORK_CLSTR , hbs_sock.rx_mesg[iface]);
}
}
}
@ -1612,16 +1612,16 @@ void daemon_service_run ( void )
ilog ("Mgmnt %s link is %s\n", hbs_config.mgmnt_iface, hbsInv.mgmnt_link_up_and_running ? "Up" : "Down" );
}
if ( hbsInv.infra_network_provisioned == true )
if ( hbsInv.clstr_network_provisioned == true )
{
if ( get_link_state ( hbs_sock.ioctl_sock, hbs_config.infra_iface, &hbsInv.infra_link_up_and_running ) )
if ( get_link_state ( hbs_sock.ioctl_sock, hbs_config.clstr_iface, &hbsInv.clstr_link_up_and_running ) )
{
hbsInv.infra_link_up_and_running = false ;
wlog ("Failed to query %s operational state ; defaulting to down\n", hbs_config.infra_iface );
hbsInv.clstr_link_up_and_running = false ;
wlog ("Failed to query %s operational state ; defaulting to down\n", hbs_config.clstr_iface );
}
else
{
ilog ("Infra %s link is %s\n", hbs_config.infra_iface, hbsInv.infra_link_up_and_running ? "Up" : "Down" );
ilog ("Cluster-host %s link is %s\n", hbs_config.clstr_iface, hbsInv.clstr_link_up_and_running ? "Up" : "Down" );
}
}
@ -1664,7 +1664,7 @@ void daemon_service_run ( void )
/* tell the cluster which controller this is and
* how many networks are being monitored */
hbs_cluster_nums (hbs_ctrl.controller,hbsInv.infra_network_provisioned ?2:1);
hbs_cluster_nums (hbs_ctrl.controller,hbsInv.clstr_network_provisioned ?2:1);
socket_init_fail_count = 0 ;
wait_log_throttle = 0 ;
@ -1703,7 +1703,7 @@ void daemon_service_run ( void )
hostname_ptr != hostname_inventory.end() ;
hostname_ptr++ )
{
hbsAlarm_clear_all ( hostname_ptr->data(), hbsInv.infra_network_provisioned );
hbsAlarm_clear_all ( hostname_ptr->data(), hbsInv.clstr_network_provisioned );
hbsInv.manage_heartbeat_clear ( hostname_ptr->data(), MAX_IFACES );
}
}
@ -1769,13 +1769,13 @@ void daemon_service_run ( void )
FD_SET(hbs_sock.rx_sock[MGMNT_INTERFACE]->getFD(), &hbs_sock.readfds );
}
/* Add the INFRA network pulse rx socket if its provisioned and have a valid socket */
if (( hbsInv.infra_network_provisioned == true ) &&
( hbs_sock.rx_sock[INFRA_INTERFACE] ) &&
( hbs_sock.rx_sock[INFRA_INTERFACE]->getFD()))
/* Add the cluster-host network pulse rx socket if its provisioned and have a valid socket */
if (( hbsInv.clstr_network_provisioned == true ) &&
( hbs_sock.rx_sock[CLSTR_INTERFACE] ) &&
( hbs_sock.rx_sock[CLSTR_INTERFACE]->getFD()))
{
socks.push_back (hbs_sock.rx_sock[INFRA_INTERFACE]->getFD());
FD_SET(hbs_sock.rx_sock[INFRA_INTERFACE]->getFD(), &hbs_sock.readfds );
socks.push_back (hbs_sock.rx_sock[CLSTR_INTERFACE]->getFD());
FD_SET(hbs_sock.rx_sock[CLSTR_INTERFACE]->getFD(), &hbs_sock.readfds );
}
}
@ -1880,7 +1880,7 @@ void daemon_service_run ( void )
( hbsInv.active_controller == true ))
{
hbsAlarm_clear_all ( hostname,
hbsInv.infra_network_provisioned );
hbsInv.clstr_network_provisioned );
}
}
else if ( msg.cmd == MTC_CMD_DEL_HOST )
@ -1895,7 +1895,7 @@ void daemon_service_run ( void )
( hbsInv.active_controller == true ))
{
hbsAlarm_clear_all ( hostname,
hbsInv.infra_network_provisioned );
hbsInv.clstr_network_provisioned );
}
}
else if ( msg.cmd == MTC_CMD_STOP_HOST )
@ -1970,12 +1970,12 @@ void daemon_service_run ( void )
hbs_sock.fired[MGMNT_INTERFACE] = true ;
}
if (( hbsInv.infra_network_provisioned == true ) &&
( hbs_sock.rx_sock[INFRA_INTERFACE] ) &&
( hbs_sock.rx_sock[INFRA_INTERFACE]->getFD()) &&
( FD_ISSET(hbs_sock.rx_sock[INFRA_INTERFACE]->getFD(), &hbs_sock.readfds)))
if (( hbsInv.clstr_network_provisioned == true ) &&
( hbs_sock.rx_sock[CLSTR_INTERFACE] ) &&
( hbs_sock.rx_sock[CLSTR_INTERFACE]->getFD()) &&
( FD_ISSET(hbs_sock.rx_sock[CLSTR_INTERFACE]->getFD(), &hbs_sock.readfds)))
{
hbs_sock.fired[INFRA_INTERFACE] = true ;
hbs_sock.fired[CLSTR_INTERFACE] = true ;
}
}
@ -2137,8 +2137,8 @@ void daemon_service_run ( void )
/* Load the expected pulses and zero detected */
for ( int iface = 0 ; iface < MAX_IFACES ; iface++ )
{
/* Don't service the infrastructure network if it is not provisioned */
if (( iface == INFRA_IFACE ) && ( hbsInv.infra_network_provisioned == false ))
/* Don't service the cluster-host network if it is not provisioned */
if (( iface == CLSTR_IFACE ) && ( hbsInv.clstr_network_provisioned == false ))
continue ;
#ifdef WANT_HBS_MEM_LOGS
@ -2198,9 +2198,9 @@ void daemon_service_run ( void )
* the pulse responses that have come in */
for ( int iface = 0 ; iface < MAX_IFACES ; iface++ )
{
/* Do not service the infrastructure interface if it is not provisioned
/* Do not service the cluster-host interface if it is not provisioned
* We won't get here anyway ... gate above prevents it */
if (( iface == INFRA_IFACE ) && ( hbsInv.infra_network_provisioned != true ))
if (( iface == CLSTR_IFACE ) && ( hbsInv.clstr_network_provisioned != true ))
continue ;
if ( hbs_sock.fired[iface] == true )
@ -2274,8 +2274,8 @@ void daemon_service_run ( void )
for ( int iface = 0 ; iface < MAX_IFACES ; iface++ )
{
/* Do not service the infrastructure interface if it is not provisioned */
if (( iface == INFRA_IFACE ) && ( hbsInv.infra_network_provisioned != true ))
/* Do not service the cluster-host interface if it is not provisioned */
if (( iface == CLSTR_IFACE ) && ( hbsInv.clstr_network_provisioned != true ))
continue ;
#ifdef WANT_HBS_MEM_LOGS

View File

@ -31,11 +31,11 @@ using namespace std;
#include "hbsAlarm.h" /* for ... this module header */
#include "alarm.h" /* for ... alarm send message to mtcalarmd */
void hbsAlarm_clear_all ( string hostname, bool infra )
void hbsAlarm_clear_all ( string hostname, bool clstr )
{
alarm_clear ( hostname, MGMNT_HB_ALARM_ID, MGMNT_NAME );
if ( infra )
alarm_clear ( hostname, INFRA_HB_ALARM_ID, INFRA_NAME );
if ( clstr )
alarm_clear ( hostname, CLSTR_HB_ALARM_ID, CLSTR_NAME );
alarm_clear ( hostname , PMOND_ALARM_ID, PMON_NAME );
}

View File

@ -24,9 +24,9 @@ using namespace std;
#include "alarm.h" /* for .. mtcAlarm */
#define MGMNT_NAME ((const char *)"Management")
#define INFRA_NAME ((const char *)"Infrastructure")
#define CLSTR_NAME ((const char *)"Cluster-host")
#define PMON_NAME ((char *)"pmond")
void hbsAlarm_clear_all ( string hostname, bool infra );
void hbsAlarm_clear_all ( string hostname, bool clstr );
#endif /* __HBSALARM_H__ */

View File

@ -94,7 +94,7 @@ typedef struct
/* Status Flags
* ------------
* bit 0: Process Monitor Status: 1=running
* bit 1: Infrastructure Network: 1=provisioned
* bit 1: Cluster-host Network: 1=provisioned
*
* */
unsigned int f ;
@ -167,9 +167,9 @@ typedef struct
int ioctl_sock ; /* general ioctl socket */
bool mgmnt_link_up_and_running ;
bool infra_link_up_and_running ;
bool clstr_link_up_and_running ;
bool mgmnt_link_up_and_running_last ;
bool infra_link_up_and_running_last ;
bool clstr_link_up_and_running_last ;
} hbs_socket_type ;
@ -199,7 +199,7 @@ int hbs_self_recovery ( unsigned int cmd );
unsigned int hbs_get_controller_number ( void );
/* Setup the pulse messaging interfaces
* 'p' is a boot that indicates if the infrastructure network is provisioned
* 'p' is a bool that indicates if the cluster-host network is provisioned
* 'p' = true means it is provisioned */
#define SETUP_PULSE_MESSAGING(p,g) \
{ \
@ -209,9 +209,9 @@ unsigned int hbs_get_controller_number ( void );
} \
if ( p == true ) \
{ \
if (( rc = _setup_pulse_messaging ( INFRA_IFACE , g)) != PASS ) \
if (( rc = _setup_pulse_messaging ( CLSTR_IFACE , g)) != PASS ) \
{ \
elog ("Failed to setup 'Infra' network pulse messaging (rc:%d)\n", rc ); \
elog ("Failed to setup 'Cluster-host' network pulse messaging (rc:%d)\n", rc ); \
} \
} \
}

View File

@ -71,9 +71,9 @@ extern "C"
/* Where to send events */
string mtcAgent_ip = "" ;
/* A boolean that is used to quickly determine if the infrastructure
/* A boolean that is used to quickly determine if the cluster-host
* network is provisioned and configured for this daemon to use */
static bool infra_network_provisioned = false ;
static bool clstr_network_provisioned = false ;
/* pmon pulse count clear timer */
struct mtc_timer pmonPulse_timer ;
@ -300,9 +300,9 @@ void stallMon_init ( void )
/** Client Config mask */
#define CONFIG_CLIENT_MASK (CONFIG_AGENT_MULTICAST |\
CONFIG_AGENT_HBS_INFRA_PORT |\
CONFIG_AGENT_HBS_CLSTR_PORT |\
CONFIG_AGENT_HBS_MGMNT_PORT |\
CONFIG_CLIENT_HBS_INFRA_PORT |\
CONFIG_CLIENT_HBS_CLSTR_PORT |\
CONFIG_CLIENT_HBS_MGMNT_PORT |\
CONFIG_CLIENT_PULSE_PORT |\
CONFIG_SCHED_PRIORITY)
@ -338,15 +338,15 @@ static int hbs_config_handler ( void * user,
{
config_ptr->start_delay = atoi(value);
}
else if (MATCH("agent", "hbs_agent_infra_port"))
else if (MATCH("agent", "hbs_agent_clstr_port"))
{
config_ptr->hbs_agent_infra_port = atoi(value);
config_ptr->mask |= CONFIG_AGENT_HBS_INFRA_PORT ;
config_ptr->hbs_agent_clstr_port = atoi(value);
config_ptr->mask |= CONFIG_AGENT_HBS_CLSTR_PORT ;
}
else if (MATCH("client", "hbs_client_infra_port"))
else if (MATCH("client", "hbs_client_clstr_port"))
{
config_ptr->hbs_client_infra_port = atoi(value);
config_ptr->mask |= CONFIG_CLIENT_HBS_INFRA_PORT ;
config_ptr->hbs_client_clstr_port = atoi(value);
config_ptr->mask |= CONFIG_CLIENT_HBS_CLSTR_PORT ;
}
else if (MATCH("client", "scheduling_priority"))
{
@ -429,22 +429,22 @@ int daemon_configure ( void )
get_hostname ( &my_hostname[0], MAX_HOST_NAME_SIZE );
hostname = my_hostname ;
/* Fetch the infrastructure interface name.
/* Fetch the cluster-host interface name.
* calls daemon_get_iface_master inside so the
* aggrigated name is returned if it exists */
get_infra_iface (&hbs_config.infra_iface );
if ( strlen(hbs_config.infra_iface) )
get_clstr_iface (&hbs_config.clstr_iface );
if ( strlen(hbs_config.clstr_iface) )
{
if (strcmp(hbs_config.infra_iface, hbs_config.mgmnt_iface))
if (strcmp(hbs_config.clstr_iface, hbs_config.mgmnt_iface))
{
infra_network_provisioned = true ;
ilog ("Infra Name : %s\n", hbs_config.infra_iface );
clstr_network_provisioned = true ;
ilog ("Cluster-host Name : %s\n", hbs_config.clstr_iface );
}
}
if ( infra_network_provisioned == true )
if ( clstr_network_provisioned == true )
{
ilog("Infra Port : %d (rx)", hbs_config.hbs_client_infra_port );
ilog("Infra Port : %d (tx)", hbs_config.hbs_agent_infra_port );
ilog("Cluster-host Port : %d (rx)", hbs_config.hbs_client_clstr_port );
ilog("Cluster-host Port : %d (tx)", hbs_config.hbs_agent_clstr_port );
}
/* initialize the stall detection monitor */
@ -481,13 +481,13 @@ int _setup_pulse_messaging ( iface_enum i, int rmem )
{
iface = hbs_config.mgmnt_iface ;
}
else if (( i == INFRA_IFACE ) && ( hbs_config.infra_iface != NULL ))
else if (( i == CLSTR_IFACE ) && ( hbs_config.clstr_iface != NULL ))
{
iface = hbs_config.infra_iface ;
iface = hbs_config.clstr_iface ;
}
else
{
wlog ("No Infrastructure Interface\n");
wlog ("No Cluster-host Interface\n");
return (RETRY);
}
@ -584,11 +584,11 @@ int hbs_socket_init ( void )
*/
hbs_sock.rx_port[MGMNT_IFACE] = hbs_config.hbs_client_mgmnt_port;
hbs_sock.tx_port[MGMNT_IFACE] = hbs_config.hbs_agent_mgmnt_port ;
hbs_sock.rx_port[INFRA_IFACE] = hbs_config.hbs_client_infra_port;
hbs_sock.tx_port[INFRA_IFACE] = hbs_config.hbs_agent_infra_port ;
hbs_sock.rx_port[CLSTR_IFACE] = hbs_config.hbs_client_clstr_port;
hbs_sock.tx_port[CLSTR_IFACE] = hbs_config.hbs_agent_clstr_port ;
/* Setup the pulse messaging interfaces */
SETUP_PULSE_MESSAGING(infra_network_provisioned, rmem_max ) ;
SETUP_PULSE_MESSAGING(clstr_network_provisioned, rmem_max ) ;
/***********************************************************/
/* Setup the PMON I'm Alive Pulse Receive Socket */
@ -719,7 +719,7 @@ static unsigned int rri[MTCE_HBS_MAX_CONTROLLERS] = {0,0} ;
* This utility supports the following networks
*
* - management network
* - infrastructure network (if configured)
* - cluster-host network (if configured)
*
* For each message, look inside the message for
*
@ -756,7 +756,7 @@ static int missing_history_count[MAX_IFACES] = {0,0} ;
int _service_pulse_request ( iface_enum iface , unsigned int flags )
{
if (( iface != MGMNT_IFACE ) && ( iface != INFRA_IFACE ))
if (( iface != MGMNT_IFACE ) && ( iface != CLSTR_IFACE ))
return (FAIL_BAD_CASE);
if ( ! hbs_sock.rx_sock[iface] )
@ -844,9 +844,9 @@ int _service_pulse_request ( iface_enum iface , unsigned int flags )
hbs_sock.rx_mesg[iface].f |= ( PMOND_FLAG ) ;
}
if ( infra_network_provisioned == true )
if ( clstr_network_provisioned == true )
{
hbs_sock.rx_mesg[iface].f |= INFRA_FLAG ;
hbs_sock.rx_mesg[iface].f |= CLSTR_FLAG ;
}
/*************************************************************************
@ -1017,7 +1017,7 @@ int _service_pulse_request ( iface_enum iface , unsigned int flags )
memcpy ( &hbs_sock.rx_mesg[iface].m[0], &pulse_resp_tx_hdr[0], HBS_MAX_MSG );
#ifdef WANT_PULSE_RESPONSE_FIT
if (( iface == INFRA_IFACE ) && ( daemon_is_file_present ( MTC_CMD_FIT__NO_INFRA_RSP )))
if (( iface == CLSTR_IFACE ) && ( daemon_is_file_present ( MTC_CMD_FIT__NO_CLSTR_RSP )))
{
wlog ("refusing to send %s pulse reply ; due to FIT\n", get_iface_name_str(iface));
return PASS ;
@ -1362,9 +1362,9 @@ void daemon_service_run ( void )
&hbs_sock.readfds, NULL, NULL,
&hbs_sock.waitd);
if ( infra_network_provisioned == true )
if ( clstr_network_provisioned == true )
{
flags |= INFRA_FLAG ;
flags |= CLSTR_FLAG ;
}
/* Select error */
@ -1414,20 +1414,20 @@ void daemon_service_run ( void )
flags = 0 ;
}
if (hbs_sock.rx_sock[INFRA_IFACE]&&FD_ISSET(hbs_sock.rx_sock[INFRA_IFACE]->getFD(), &hbs_sock.readfds))
if (hbs_sock.rx_sock[CLSTR_IFACE]&&FD_ISSET(hbs_sock.rx_sock[CLSTR_IFACE]->getFD(), &hbs_sock.readfds))
{
/* Receive pulse request from the infrastructure interface and send a response */
/* Receive pulse request from the cluster-host interface and send a response */
/* Note: The flags are taken from the last round of get_pmon_pulses below */
int rc = _service_pulse_request ( INFRA_IFACE, flags );
int rc = _service_pulse_request ( CLSTR_IFACE, flags );
if ( rc != PASS )
{
if ( rc == FAIL_TO_RECEIVE )
{
mlog ("Failed to receive pulse request on infrastructure network (rc:%d)\n",rc);
mlog ("Failed to receive pulse request on cluster-host network (rc:%d)\n",rc);
}
else
{
wlog_throttled ( count, 200, "Failed to service pulse request on infrastructure network (rc:%d)\n",rc);
wlog_throttled ( count, 200, "Failed to service pulse request on cluster-host network (rc:%d)\n",rc);
}
}
}
@ -1456,9 +1456,9 @@ void daemon_service_run ( void )
log_link_events ( hbs_sock.netlink_sock,
hbs_sock.ioctl_sock,
hbs_config.mgmnt_iface,
hbs_config.infra_iface,
hbs_config.clstr_iface,
hbs_sock.mgmnt_link_up_and_running,
hbs_sock.infra_link_up_and_running) ;
hbs_sock.clstr_link_up_and_running) ;
}
}

View File

@ -404,8 +404,8 @@ void hbs_cluster_update ( iface_enum iface,
mtce_hbs_network_enum n ;
if ( iface == MGMNT_IFACE )
n = MTCE_HBS_NETWORK_MGMT ;
else if ( iface == INFRA_IFACE )
n = MTCE_HBS_NETWORK_INFRA ;
else if ( iface == CLSTR_IFACE )
n = MTCE_HBS_NETWORK_CLSTR ;
#ifdef MONITORED_OAM_NETWORK
else if ( iface == OAM_IFACE )
n = MTCE_HBS_NETWORK_OAM ;

View File

@ -97,8 +97,8 @@ string hbs_cluster_network_name ( mtce_hbs_network_enum network )
{
case MTCE_HBS_NETWORK_MGMT:
return ("Mgmnt");
case MTCE_HBS_NETWORK_INFRA:
return ("Infra");
case MTCE_HBS_NETWORK_CLSTR:
return ("Clstr");
#ifdef MONITORED_OAM_NETWORK
case MTCE_HBS_NETWORK_OAM:

View File

@ -29,7 +29,7 @@
typedef enum
{
MTCE_HBS_NETWORK_MGMT = 0,
MTCE_HBS_NETWORK_INFRA = 1,
MTCE_HBS_NETWORK_CLSTR = 1,
#ifdef MONITORED_OAM_NETWORK
MTCE_HBS_NETWORK_OAM,
#endif

View File

@ -51,7 +51,7 @@ int hwmonJson_load_inv ( char * json_str_ptr, node_inv_type & info )
{
int rc = PASS ;
string error = "" ;
string infra_ip = "" ;
string cluster_host_ip = "" ;
/* init to null to avoid trap on early cleanup call with
* bad non-null default pointer value */
@ -79,11 +79,11 @@ int hwmonJson_load_inv ( char * json_str_ptr, node_inv_type & info )
//info.ip = _get_key_value_string ( node_obj, MTC_JSON_INV_HOSTIP );
info.name = _get_key_value_string ( node_obj, MTC_JSON_INV_NAME );
infra_ip = _get_key_value_string ( node_obj, MTC_JSON_INV_INFRAIP );
if ( infra_ip.length() )
cluster_host_ip = _get_key_value_string ( node_obj, MTC_JSON_INV_CLSTRIP );
if ( cluster_host_ip.length() )
{
dlog ("%s inventory has infra_ip=%s\n", info.name.c_str(), infra_ip.c_str());
info.infra_ip = infra_ip;
dlog ("%s inventory has cluster_host_ip=%s\n", info.name.c_str(), cluster_host_ip.c_str());
info.clstr_ip = cluster_host_ip;
}
info.type = _get_key_value_string ( node_obj, MTC_JSON_INV_TYPE );
info.uuid = _get_key_value_string ( node_obj, MTC_JSON_INV_UUID );

View File

@ -54,12 +54,12 @@ typedef struct
/* primary interface names */
#define MGMT_INTERFACE_NAME ((const char *)"mgmt")
#define INFRA_INTERFACE_NAME ((const char *)"infra")
#define CLUSTER_HOST_INTERFACE_NAME ((const char *)"cluster-host")
#define OAM_INTERFACE_NAME ((const char *)"oam")
/* name labels used in platform.conf */
#define MGMT_INTERFACE_FULLNAME ((const char *)"management_interface")
#define INFRA_INTERFACE_FULLNAME ((const char *)"infrastructure_interface")
#define CLUSTER_HOST_INTERFACE_FULLNAME ((const char *)"cluster_host_interface")
#define OAM_INTERFACE_FULLNAME ((const char *)"oam_interface")
/* true if the interface is configured.

View File

@ -22,7 +22,7 @@ static lmon_ctrl_type lmon_ctrl ;
static interface_ctrl_type interfaces[INTERFACES_MAX];
static const char * iface_list[INTERFACES_MAX] = { MGMT_INTERFACE_NAME,
INFRA_INTERFACE_NAME,
CLUSTER_HOST_INTERFACE_NAME,
OAM_INTERFACE_NAME };
/* httpUtil needs a mtclog socket pointer */
@ -140,7 +140,7 @@ void lmonHdlr_http_handler (struct evhttp_request *req, void *arg)
{ "name":"enp0s8.1", "state":"Up/Down", "time":5674323454567 },
{ "name":"enp0s8.2", "state":"Up/Down", "time":5674323454567 }]
},
{ "network":"infra",
{ "network":"cluster-host",
"type":"bond",
"bond":"bond0",
"links": [

View File

@ -186,7 +186,7 @@ int lmon_get_link_state ( int ioctl_socket,
*
* Name : lmon_interfaces_init
*
* Purpose : Map an interface (mgmt, oam or infra) to a physical port.
* Purpose : Map an interface (mgmt, oam or cluster-host) to a physical port.
* See interface_type enum in lmon.h
*
*****************************************************************************/
@ -201,8 +201,8 @@ int lmon_interfaces_init ( interface_ctrl_type * ptr )
/* iface enum to pltform.conf iface name */
if ( strcmp(ptr->name, MGMT_INTERFACE_NAME) == 0 )
str = MGMT_INTERFACE_FULLNAME;
else if ( strcmp(ptr->name, INFRA_INTERFACE_NAME) == 0 )
str = INFRA_INTERFACE_FULLNAME;
else if ( strcmp(ptr->name, CLUSTER_HOST_INTERFACE_NAME) == 0 )
str = CLUSTER_HOST_INTERFACE_FULLNAME;
else if ( strcmp(ptr->name, OAM_INTERFACE_NAME) == 0 )
str = OAM_INTERFACE_FULLNAME;
else

View File

@ -332,7 +332,7 @@ int nodeLinkClass::cmd_handler ( struct nodeLinkClass::node * node_ptr )
* This target handler FSM is responsible for resetting a host through
* progression escalation of interfaces. First a reboot by command is
* attempted over the management network. If that fails the same operation
* is tried over the infrastructure network. If both reboot command
* is tried over the cluster-host network. If both reboot command
* attempts fail and the board management network for this host is
* provisioned then reset through it is attempted.
* Number of reset retries is specified in the command parameter 1
@ -359,7 +359,7 @@ int nodeLinkClass::cmd_handler ( struct nodeLinkClass::node * node_ptr )
bool send_reboot_ok = false ;
node_ptr->reboot_cmd_ack_mgmnt = false ;
node_ptr->reboot_cmd_ack_infra = false ;
node_ptr->reboot_cmd_ack_clstr = false ;
/* send reboot command */
node_ptr->cmdReq = MTC_CMD_REBOOT ;
@ -375,12 +375,12 @@ int nodeLinkClass::cmd_handler ( struct nodeLinkClass::node * node_ptr )
send_reboot_ok = true ;
}
if ( infra_network_provisioned == true )
if ( clstr_network_provisioned == true )
{
plog ("%s Performing REBOOT (infra network)\n", node_ptr->hostname.c_str());
if ( send_mtc_cmd ( node_ptr->hostname, MTC_CMD_REBOOT, INFRA_INTERFACE ) != PASS )
plog ("%s Performing REBOOT (cluster-host network)\n", node_ptr->hostname.c_str());
if ( send_mtc_cmd ( node_ptr->hostname, MTC_CMD_REBOOT, CLSTR_INTERFACE ) != PASS )
{
wlog ("%s REBOOT Request Failed (infra network)\n",
wlog ("%s REBOOT Request Failed (cluster-host network)\n",
node_ptr->hostname.c_str());
}
else

View File

@ -53,7 +53,7 @@ extern "C"
extern char *program_invocation_short_name;
int mtcAlive_mgmnt_sequence = 0 ;
int mtcAlive_infra_sequence = 0 ;
int mtcAlive_clstr_sequence = 0 ;
/* Receive and process commands from controller maintenance */
int mtc_service_command ( mtc_socket_type * sock_ptr, int interface )
@ -62,9 +62,9 @@ int mtc_service_command ( mtc_socket_type * sock_ptr, int interface )
mtc_message_type msg ;
int rc = FAIL ;
if ( interface == INFRA_INTERFACE )
if ( interface == CLSTR_INTERFACE )
{
if ( ! get_ctrl_ptr()->infra_iface_provisioned )
if ( ! get_ctrl_ptr()->clstr_iface_provisioned )
{
wlog ("cannot receive from unprovisioned %s interface\n",
get_iface_name_str(interface) );
@ -88,16 +88,16 @@ int mtc_service_command ( mtc_socket_type * sock_ptr, int interface )
return (FAIL_TO_RECEIVE);
}
}
else if ( interface == INFRA_INTERFACE )
else if ( interface == CLSTR_INTERFACE )
{
if (( sock_ptr->mtc_client_infra_rx_socket ) &&
( sock_ptr->mtc_client_infra_rx_socket->sock_ok() == true ))
if (( sock_ptr->mtc_client_clstr_rx_socket ) &&
( sock_ptr->mtc_client_clstr_rx_socket->sock_ok() == true ))
{
bytes = sock_ptr->mtc_client_infra_rx_socket->read((char*)&msg.hdr[0], sizeof(mtc_message_type));
bytes = sock_ptr->mtc_client_clstr_rx_socket->read((char*)&msg.hdr[0], sizeof(mtc_message_type));
}
else
{
elog ("cannot read from null or failed 'mtc_client_infra_rx_socket'\n");
elog ("cannot read from null or failed 'mtc_client_clstr_rx_socket'\n");
return (FAIL_TO_RECEIVE);
}
}
@ -360,13 +360,13 @@ int mtc_service_command ( mtc_socket_type * sock_ptr, int interface )
get_mtcNodeCommand_str(msg.cmd),
get_iface_name_str (interface) );
}
else if (( interface == INFRA_INTERFACE ) && ( daemon_is_file_present ( MTC_CMD_FIT__NO_INFRA_ACK )))
else if (( interface == CLSTR_INTERFACE ) && ( daemon_is_file_present ( MTC_CMD_FIT__NO_CLSTR_ACK )))
{
wlog ("%s reply ack message - fit bypass (%s)\n",
get_mtcNodeCommand_str(msg.cmd),
get_iface_name_str (interface) );
}
/* Otherwise, send the message back either over the mgmnt or infra interface */
/* Otherwise, send the message back either over the mgmnt or clstr interface */
else if ( interface == MGMNT_INTERFACE )
{
if (( sock_ptr->mtc_client_tx_socket ) &&
@ -380,12 +380,12 @@ int mtc_service_command ( mtc_socket_type * sock_ptr, int interface )
get_iface_name_str (interface) );
}
}
else if ( interface == INFRA_INTERFACE )
else if ( interface == CLSTR_INTERFACE )
{
if (( sock_ptr->mtc_client_infra_tx_socket ) &&
( sock_ptr->mtc_client_infra_tx_socket->sock_ok() == true ))
if (( sock_ptr->mtc_client_clstr_tx_socket ) &&
( sock_ptr->mtc_client_clstr_tx_socket->sock_ok() == true ))
{
rc = sock_ptr->mtc_client_infra_tx_socket->write((char*)&msg.hdr[0], bytes);
rc = sock_ptr->mtc_client_clstr_tx_socket->write((char*)&msg.hdr[0], bytes);
}
else
{
@ -669,9 +669,9 @@ int create_mtcAlive_msg ( mtc_message_type & msg, int cmd, string identity, int
identity.append (get_iface_name_str(interface));
identity.append("\",\"sequence\":");
if ( interface == INFRA_INTERFACE )
if ( interface == CLSTR_INTERFACE )
{
identity.append(itos(mtcAlive_infra_sequence++));
identity.append(itos(mtcAlive_clstr_sequence++));
}
else
{
@ -752,8 +752,8 @@ int send_mtcAlive_msg ( mtc_socket_type * sock_ptr, string identity, int interfa
msgClassSock * mtcAlive_tx_sock_ptr = NULL ;
int rc = FAIL ;
if (( interface == INFRA_INTERFACE ) &&
( get_ctrl_ptr()->infra_iface_provisioned != true ))
if (( interface == CLSTR_INTERFACE ) &&
( get_ctrl_ptr()->clstr_iface_provisioned != true ))
{
dlog2 ("cannot send to unprovisioned %s interface\n",
get_iface_name_str(interface) );
@ -766,10 +766,10 @@ int send_mtcAlive_msg ( mtc_socket_type * sock_ptr, string identity, int interfa
/* management interface */
mtcAlive_tx_sock_ptr = sock_ptr->mtc_client_tx_socket ;
}
else if ( interface == INFRA_INTERFACE )
else if ( interface == CLSTR_INTERFACE )
{
/* infrastructure interface */
mtcAlive_tx_sock_ptr = sock_ptr->mtc_client_infra_tx_socket ;
/* cluster-host interface */
mtcAlive_tx_sock_ptr = sock_ptr->mtc_client_clstr_tx_socket ;
}
else
{

View File

@ -128,17 +128,17 @@ int mtc_service_inbox ( nodeLinkClass * obj_ptr,
mtc_message_type msg ;
int bytes = 0 ;
int rc = PASS ;
if ( iface == INFRA_INTERFACE )
if ( iface == CLSTR_INTERFACE )
{
if ( ( obj_ptr ) &&
( obj_ptr->infra_network_provisioned == true ) &&
( sock_ptr->mtc_agent_infra_rx_socket ))
( obj_ptr->clstr_network_provisioned == true ) &&
( sock_ptr->mtc_agent_clstr_rx_socket ))
{
bytes = sock_ptr->mtc_agent_infra_rx_socket->read((char*)&msg, sizeof(msg));
bytes = sock_ptr->mtc_agent_clstr_rx_socket->read((char*)&msg, sizeof(msg));
}
else
{
return ( FAIL_NO_INFRA_PROV );
return ( FAIL_NO_CLSTR_PROV );
}
}
else
@ -165,9 +165,9 @@ int mtc_service_inbox ( nodeLinkClass * obj_ptr,
string hostaddr = "" ;
string hostname = "" ;
if ( iface == INFRA_INTERFACE )
if ( iface == CLSTR_INTERFACE )
{
hostaddr = sock_ptr->mtc_agent_infra_rx_socket->get_src_str();
hostaddr = sock_ptr->mtc_agent_clstr_rx_socket->get_src_str();
hostname = obj_ptr->get_hostname ( hostaddr ) ;
}
else
@ -275,16 +275,16 @@ int mtc_service_inbox ( nodeLinkClass * obj_ptr,
msg.parm[MTC_PARM_FLAGS_IDX],
obj_ptr->get_mtcAlive_gate ( hostname ) ? "gated" : "open");
string infra_ip = "";
/* Get the infra ip address if it is provisioned */
rc = jsonUtil_get_key_val ( &msg.buf[0], "infra_ip", infra_ip );
string cluster_host_ip = "";
/* Get the clstr ip address if it is provisioned */
rc = jsonUtil_get_key_val ( &msg.buf[0], "cluster_host_ip", cluster_host_ip );
if ( rc == PASS )
{
obj_ptr->set_infra_hostaddr ( hostname, infra_ip );
obj_ptr->set_clstr_hostaddr ( hostname, cluster_host_ip );
}
else
{
mlog ("%s null or missing 'infra_ip' value (rc:%d)\n", hostname.c_str(), rc);
mlog ("%s null or missing 'cluster_host_ip' value (rc:%d)\n", hostname.c_str(), rc);
}
}
else if ( msg.cmd == MTC_MSG_MAIN_GOENABLED )
@ -697,23 +697,23 @@ int send_mtc_cmd ( string & hostname, int cmd , int interface )
/* rc = message size */
rc = sock_ptr->mtc_agent_tx_socket->write((char *)&mtc_cmd, bytes, hostaddr.c_str(), sock_ptr->mtc_cmd_port);
}
else if ((interface == INFRA_INTERFACE) &&
( obj_ptr->infra_network_provisioned == true ) &&
( sock_ptr->mtc_agent_infra_tx_socket != NULL ))
else if ((interface == CLSTR_INTERFACE) &&
( obj_ptr->clstr_network_provisioned == true ) &&
( sock_ptr->mtc_agent_clstr_tx_socket != NULL ))
{
/* SETUP TX -> COMPUTE SOCKET INFRA INTERFACE */
string infra_hostaddr = obj_ptr->get_infra_hostaddr(hostname);
/* SETUP TX -> COMPUTE SOCKET CLSTR INTERFACE */
string clstr_hostaddr = obj_ptr->get_clstr_hostaddr(hostname);
#ifdef WANT_FIT_TESTING
if ( daemon_want_fit ( FIT_CODE__INVALIDATE_INFRA_IP, hostname ) )
infra_hostaddr = "none" ;
if ( daemon_want_fit ( FIT_CODE__INVALIDATE_CLSTR_IP, hostname ) )
clstr_hostaddr = "none" ;
#endif
if ( hostUtil_is_valid_ip_addr( infra_hostaddr ) != true )
if ( hostUtil_is_valid_ip_addr( clstr_hostaddr ) != true )
{
return (FAIL_NO_INFRA_PROV);
return (FAIL_NO_CLSTR_PROV);
}
rc = sock_ptr->mtc_agent_infra_tx_socket->write((char *)&mtc_cmd, bytes, infra_hostaddr.c_str(), sock_ptr->mtc_cmd_port);
rc = sock_ptr->mtc_agent_clstr_tx_socket->write((char *)&mtc_cmd, bytes, clstr_hostaddr.c_str(), sock_ptr->mtc_cmd_port);
}
if ( 0 > rc )
@ -868,16 +868,16 @@ int service_events ( nodeLinkClass * obj_ptr, mtc_socket_type * sock_ptr )
/* The interface that the heartbeat loss occurred over is
* specified in parm[0 for this command
* 0 = MGMNT_IFACE
* 1 = INFRA_IFACE
* 1 = CLSTR_IFACE
* else default to 0 (MGMNT_IFACE) to be backwards compatible
*
* */
iface_enum iface = MGMNT_IFACE;
if ( msg.num > 0 )
{
if ( msg.parm[0] == INFRA_IFACE )
if ( msg.parm[0] == CLSTR_IFACE )
{
iface = INFRA_IFACE ;
iface = CLSTR_IFACE ;
}
}
if ( msg.cmd == MTC_EVENT_HEARTBEAT_MINOR_SET )
@ -910,16 +910,16 @@ int service_events ( nodeLinkClass * obj_ptr, mtc_socket_type * sock_ptr )
/* The interface that the heartbeat loss occurred over is
* specified in parm[0 for this command
* 0 = MGMNT_IFACE
* 1 = INFRA_IFACE
* 1 = CLSTR_IFACE
* else default to 0 (MGMNT_IFACE) to be backwards compatible
*
* */
iface_enum iface = MGMNT_IFACE;
if ( msg.num > 0 )
{
if ( msg.parm[0] == INFRA_IFACE )
if ( msg.parm[0] == CLSTR_IFACE )
{
iface = INFRA_IFACE ;
iface = CLSTR_IFACE ;
}
}
@ -961,16 +961,16 @@ int service_events ( nodeLinkClass * obj_ptr, mtc_socket_type * sock_ptr )
/* The interface that the heartbeat loss occurred over is
* specified in parm[0 for this command
* 0 = MGMNT_IFACE
* 1 = INFRA_IFACE
* 1 = CLSTR_IFACE
* else default to 0 (MGMNT_IFACE) to be backwards compatible
*
* */
iface_enum iface = MGMNT_IFACE;
if ( msg.num > 0 )
{
if ( msg.parm[0] == INFRA_IFACE )
if ( msg.parm[0] == CLSTR_IFACE )
{
iface = INFRA_IFACE ;
iface = CLSTR_IFACE ;
}
}
string hostname = &msg.buf[0] ;

View File

@ -1478,7 +1478,7 @@ void nodeLinkClass::mtcInvApi_get_handler ( struct evhttp_request *req, void *ar
node.oper_subf = json_info.host[i].oper_subf ;
node.avail_subf = json_info.host[i].avail_subf ;
node.infra_ip = json_info.host[i].infra_ip ;
node.clstr_ip = json_info.host[i].clstr_ip ;
if (node.name.compare("none"))
{

View File

@ -153,12 +153,12 @@ void _close_mgmnt_rx_socket ( void )
}
}
void _close_infra_rx_socket ( void )
void _close_clstr_rx_socket ( void )
{
if ( mtc_sock.mtc_client_infra_rx_socket )
if ( mtc_sock.mtc_client_clstr_rx_socket )
{
delete(mtc_sock.mtc_client_infra_rx_socket);
mtc_sock.mtc_client_infra_rx_socket = 0 ;
delete(mtc_sock.mtc_client_clstr_rx_socket);
mtc_sock.mtc_client_clstr_rx_socket = 0 ;
}
}
@ -171,12 +171,12 @@ void _close_mgmnt_tx_socket ( void )
}
}
void _close_infra_tx_socket ( void )
void _close_clstr_tx_socket ( void )
{
if (mtc_sock.mtc_client_infra_tx_socket)
if (mtc_sock.mtc_client_clstr_tx_socket)
{
delete (mtc_sock.mtc_client_infra_tx_socket);
mtc_sock.mtc_client_infra_tx_socket = 0 ;
delete (mtc_sock.mtc_client_clstr_tx_socket);
mtc_sock.mtc_client_clstr_tx_socket = 0 ;
}
}
@ -194,9 +194,9 @@ void daemon_exit ( void )
daemon_files_fini ();
_close_mgmnt_rx_socket ();
_close_infra_rx_socket ();
_close_clstr_rx_socket ();
_close_mgmnt_tx_socket ();
_close_infra_tx_socket ();
_close_clstr_tx_socket ();
_close_amon_sock ();
exit (0) ;
@ -316,50 +316,50 @@ void setup_mgmnt_rx_socket ( void )
}
void setup_infra_rx_socket ( void )
void setup_clstr_rx_socket ( void )
{
if ( ctrl.infra_iface_provisioned == false )
if ( ctrl.clstr_iface_provisioned == false )
{
return ;
}
dlog ("setup of infra RX\n");
/* Fetch the infrastructure interface name.
dlog ("setup of cluster-host RX\n");
/* Fetch the cluster-host interface name.
* calls daemon_get_iface_master inside so the
* aggrigated name is returned if it exists */
get_infra_iface (&mtc_config.infra_iface );
if ( strlen(mtc_config.infra_iface) )
get_clstr_iface (&mtc_config.clstr_iface );
if ( strlen(mtc_config.clstr_iface) )
{
/* Only get the infrastructure network address if it is provisioned */
if ( get_iface_address ( mtc_config.infra_iface, ctrl.address_infra, false ) == PASS )
/* Only get the cluster-host network address if it is provisioned */
if ( get_iface_address ( mtc_config.clstr_iface, ctrl.address_clstr, false ) == PASS )
{
ilog ("Infra iface : %s\n", mtc_config.infra_iface );
ilog ("Infra addr : %s\n", ctrl.address_infra.c_str());
ilog ("Cluster-host iface : %s\n", mtc_config.clstr_iface );
ilog ("Cluster-host addr : %s\n", ctrl.address_clstr.c_str());
}
}
if ( !ctrl.address_infra.empty() )
if ( !ctrl.address_clstr.empty() )
{
_close_infra_rx_socket ();
_close_clstr_rx_socket ();
/* Only set up the socket if an infra interface is provisioned */
mtc_sock.mtc_client_infra_rx_socket = new msgClassRx(ctrl.address_infra.c_str(),mtc_sock.mtc_cmd_port, IPPROTO_UDP, ctrl.infra_iface.data(), false );
/* Only set up the socket if an cluster-host interface is provisioned */
mtc_sock.mtc_client_clstr_rx_socket = new msgClassRx(ctrl.address_clstr.c_str(),mtc_sock.mtc_cmd_port, IPPROTO_UDP, ctrl.clstr_iface.data(), false );
/* update health of socket */
if ( mtc_sock.mtc_client_infra_rx_socket )
if ( mtc_sock.mtc_client_clstr_rx_socket )
{
/* look for fault insertion request */
if ( daemon_is_file_present ( MTC_CMD_FIT__INFRA_RXSOCK ) )
mtc_sock.mtc_client_infra_rx_socket->return_status = FAIL ;
if ( daemon_is_file_present ( MTC_CMD_FIT__CLSTR_RXSOCK ) )
mtc_sock.mtc_client_clstr_rx_socket->return_status = FAIL ;
if ( mtc_sock.mtc_client_infra_rx_socket->return_status == PASS )
if ( mtc_sock.mtc_client_clstr_rx_socket->return_status == PASS )
{
mtc_sock.mtc_client_infra_rx_socket->sock_ok (true);
mtc_sock.mtc_client_clstr_rx_socket->sock_ok (true);
}
else
{
elog ("failed to init 'infrastructure rx' socket (rc:%d)\n",
mtc_sock.mtc_client_infra_rx_socket->return_status );
mtc_sock.mtc_client_infra_rx_socket->sock_ok (false);
elog ("failed to init 'cluster-host rx' socket (rc:%d)\n",
mtc_sock.mtc_client_clstr_rx_socket->return_status );
mtc_sock.mtc_client_clstr_rx_socket->sock_ok (false);
}
}
}
@ -390,32 +390,32 @@ void setup_mgmnt_tx_socket ( void )
}
}
void setup_infra_tx_socket ( void )
void setup_clstr_tx_socket ( void )
{
if ( ctrl.infra_iface_provisioned == false )
if ( ctrl.clstr_iface_provisioned == false )
{
return ;
}
dlog ("setup of infra TX\n");
_close_infra_tx_socket ();
mtc_sock.mtc_client_infra_tx_socket = new msgClassTx(CONTROLLER_NFS,mtc_sock.mtc_agent_port, IPPROTO_UDP, mtc_config.infra_iface);
dlog ("setup of cluster-host TX\n");
_close_clstr_tx_socket ();
mtc_sock.mtc_client_clstr_tx_socket = new msgClassTx(CONTROLLER_NFS,mtc_sock.mtc_agent_port, IPPROTO_UDP, mtc_config.clstr_iface);
if ( mtc_sock.mtc_client_infra_tx_socket )
if ( mtc_sock.mtc_client_clstr_tx_socket )
{
/* look for fault insertion request */
if ( daemon_is_file_present ( MTC_CMD_FIT__INFRA_TXSOCK ) )
mtc_sock.mtc_client_infra_tx_socket->return_status = FAIL ;
if ( daemon_is_file_present ( MTC_CMD_FIT__CLSTR_TXSOCK ) )
mtc_sock.mtc_client_clstr_tx_socket->return_status = FAIL ;
if ( mtc_sock.mtc_client_infra_tx_socket->return_status == PASS )
if ( mtc_sock.mtc_client_clstr_tx_socket->return_status == PASS )
{
mtc_sock.mtc_client_infra_tx_socket->sock_ok(true);
mtc_sock.mtc_client_clstr_tx_socket->sock_ok(true);
}
else
{
elog ("failed to init 'infrastructure tx' socket (rc:%d)\n",
mtc_sock.mtc_client_infra_tx_socket->return_status );
mtc_sock.mtc_client_infra_tx_socket->sock_ok(false);
elog ("failed to init 'cluster-host tx' socket (rc:%d)\n",
mtc_sock.mtc_client_clstr_tx_socket->return_status );
mtc_sock.mtc_client_clstr_tx_socket->sock_ok(false);
}
}
}
@ -461,9 +461,9 @@ void setup_amon_socket ( void )
* Construct the messaging sockets
*
* 1. Unicast receive socket mgmnt (mtc_client_rx_socket)
* 2. Unicast receive socket infra (mtc_client_infra_rx_socket)
* 2. Unicast receive socket clstr (mtc_client_clstr_rx_socket)
* 3. Unicast transmit socket mgmnt (mtc_client_tx_socket)
* 4. Unicast transmit socket infra (mtc_client_infra_tx_socket)
* 4. Unicast transmit socket clstr (mtc_client_clstr_tx_socket)
*
* 5. socket for pmond acive monitoring
*
@ -488,23 +488,23 @@ int mtc_socket_init ( void )
/************************************************************/
setup_mgmnt_tx_socket ();
/* Manage Infrastructure network setup */
string infra_iface_name = daemon_infra_iface();
/* Manage Cluster-host network setup */
string clstr_iface_name = daemon_clstr_iface();
string mgmnt_iface_name = daemon_mgmnt_iface();
if ( !infra_iface_name.empty() )
if ( !clstr_iface_name.empty() )
{
if ( infra_iface_name != mgmnt_iface_name )
if ( clstr_iface_name != mgmnt_iface_name )
{
ctrl.infra_iface_provisioned = true ;
ctrl.clstr_iface_provisioned = true ;
/************************************************************/
/* Setup the Infra Interface Receive Socket */
/* Setup the Clstr Interface Receive Socket */
/************************************************************/
setup_infra_rx_socket () ;
setup_clstr_rx_socket () ;
/*************************************************************/
/* Setup the Infra Interface Transmit Messaging to mtcAgent */
/* Setup the Clstr Interface Transmit Messaging to mtcAgent */
/*************************************************************/
setup_infra_tx_socket () ;
setup_clstr_tx_socket () ;
}
}
@ -524,7 +524,7 @@ int mtc_socket_init ( void )
* personality
* mac address
* mgmnt ip address
* infra ip address
* clstr ip address
*
***************************************************************************************/
string _self_identify ( string nodetype )
@ -544,8 +544,8 @@ string _self_identify ( string nodetype )
ctrl.who_i_am.append( ctrl.address.data() );
ctrl.who_i_am.append( "\"");
ctrl.who_i_am.append( ",\"infra_ip\":\"");
ctrl.who_i_am.append( ctrl.address_infra.data() );
ctrl.who_i_am.append( ",\"cluster_host_ip\":\"");
ctrl.who_i_am.append( ctrl.address_clstr.data() );
ctrl.who_i_am.append( "\"");
ctrl.who_i_am.append( ",\"mgmt_mac\":\"");
@ -917,12 +917,12 @@ int daemon_init ( string iface, string nodetype_str )
ctrl.who_i_am = "" ;
ctrl.macaddr = "" ;
ctrl.address = "" ;
ctrl.address_infra = "" ;
ctrl.address_clstr = "" ;
ctrl.mtcAgent_ip = "";
ctrl.function = 0 ;
ctrl.subfunction = 0 ;
ctrl.system_type = daemon_system_type ();
ctrl.infra_iface_provisioned = false ;
ctrl.clstr_iface_provisioned = false ;
/* convert node type to integer */
ctrl.nodetype = get_host_function_mask ( nodetype_str ) ;
@ -1036,12 +1036,12 @@ void daemon_service_run ( void )
FD_SET(mtc_sock.mtc_client_rx_socket->getFD(), &mtc_sock.readfds);
}
if (( ctrl.infra_iface_provisioned == true ) &&
( mtc_sock.mtc_client_infra_rx_socket ) &&
( mtc_sock.mtc_client_infra_rx_socket->return_status==PASS ))
if (( ctrl.clstr_iface_provisioned == true ) &&
( mtc_sock.mtc_client_clstr_rx_socket ) &&
( mtc_sock.mtc_client_clstr_rx_socket->return_status==PASS ))
{
socks.push_front (mtc_sock.mtc_client_infra_rx_socket->getFD());
FD_SET(mtc_sock.mtc_client_infra_rx_socket->getFD(), &mtc_sock.readfds);
socks.push_front (mtc_sock.mtc_client_clstr_rx_socket->getFD());
FD_SET(mtc_sock.mtc_client_clstr_rx_socket->getFD(), &mtc_sock.readfds);
}
mtc_sock.amon_socket = active_monitor_get_sel_obj ();
@ -1059,9 +1059,9 @@ void daemon_service_run ( void )
socks.sort();
#ifdef WANT_SELECTS
ilog_throttled ( select_log_count, 200 , "Selects: mgmnt:%d infra:%d amon:%d - Size:%ld First:%d Last:%d\n",
ilog_throttled ( select_log_count, 200 , "Selects: mgmnt:%d clstr:%d amon:%d - Size:%ld First:%d Last:%d\n",
mtc_sock.mtc_client_rx_socket,
mtc_sock.mtc_client_infra_rx_socket,
mtc_sock.mtc_client_clstr_rx_socket,
mtc_sock.amon_socket,
socks.size(), socks.front(), socks.back());
#endif
@ -1086,13 +1086,13 @@ void daemon_service_run ( void )
{
mtc_service_command ( sock_ptr, MGMNT_INTERFACE );
}
if (( ctrl.infra_iface_provisioned == true ) &&
( !ctrl.address_infra.empty() ) &&
( mtc_sock.mtc_client_infra_rx_socket ) &&
( mtc_sock.mtc_client_infra_rx_socket->return_status==PASS) &&
( FD_ISSET(mtc_sock.mtc_client_infra_rx_socket->getFD(), &mtc_sock.readfds)))
if (( ctrl.clstr_iface_provisioned == true ) &&
( !ctrl.address_clstr.empty() ) &&
( mtc_sock.mtc_client_clstr_rx_socket ) &&
( mtc_sock.mtc_client_clstr_rx_socket->return_status==PASS) &&
( FD_ISSET(mtc_sock.mtc_client_clstr_rx_socket->getFD(), &mtc_sock.readfds)))
{
mtc_service_command ( sock_ptr, INFRA_INTERFACE );
mtc_service_command ( sock_ptr, CLSTR_INTERFACE );
}
if ( FD_ISSET(mtc_sock.amon_socket, &mtc_sock.readfds))
{
@ -1218,7 +1218,7 @@ void daemon_service_run ( void )
* Look for failing sockets and try to recover them,
* but only one at a time if there are multiple failing.
* Priority is the command receiver, thehn transmitter,
* followed by the infra and others.
* followed by the cluster-host and others.
**/
/* Mgmnt Rx */
@ -1239,23 +1239,23 @@ void daemon_service_run ( void )
socket_reinit = true ;
}
/* Infra Rx */
else if (( ctrl.infra_iface_provisioned == true ) &&
(( mtc_sock.mtc_client_infra_rx_socket == NULL ) ||
( mtc_sock.mtc_client_infra_rx_socket->sock_ok() == false )))
/* Clstr Rx */
else if (( ctrl.clstr_iface_provisioned == true ) &&
(( mtc_sock.mtc_client_clstr_rx_socket == NULL ) ||
( mtc_sock.mtc_client_clstr_rx_socket->sock_ok() == false )))
{
setup_infra_rx_socket();
wlog ("calling setup_infra_rx_socket (auto-recovery)\n");
setup_clstr_rx_socket();
wlog ("calling setup_clstr_rx_socket (auto-recovery)\n");
socket_reinit = true ;
}
/* Infra Tx */
else if (( ctrl.infra_iface_provisioned == true ) &&
(( mtc_sock.mtc_client_infra_tx_socket == NULL ) ||
( mtc_sock.mtc_client_infra_tx_socket->sock_ok() == false )))
/* Clstr Tx */
else if (( ctrl.clstr_iface_provisioned == true ) &&
(( mtc_sock.mtc_client_clstr_tx_socket == NULL ) ||
( mtc_sock.mtc_client_clstr_tx_socket->sock_ok() == false )))
{
setup_infra_tx_socket();
wlog ("calling setup_infra_tx_socket (auto-recovery)\n");
setup_clstr_tx_socket();
wlog ("calling setup_clstr_tx_socket (auto-recovery)\n");
socket_reinit = true ;
}
@ -1277,17 +1277,17 @@ void daemon_service_run ( void )
}
send_mtcAlive_msg ( sock_ptr, ctrl.who_i_am, MGMNT_INTERFACE );
if (( ctrl.infra_iface_provisioned == true ) &&
( mtc_sock.mtc_client_infra_rx_socket != NULL ) &&
( mtc_sock.mtc_client_infra_rx_socket->sock_ok() == true ))
if (( ctrl.clstr_iface_provisioned == true ) &&
( mtc_sock.mtc_client_clstr_rx_socket != NULL ) &&
( mtc_sock.mtc_client_clstr_rx_socket->sock_ok() == true ))
{
send_mtcAlive_msg ( sock_ptr, ctrl.who_i_am, INFRA_INTERFACE );
send_mtcAlive_msg ( sock_ptr, ctrl.who_i_am, CLSTR_INTERFACE );
}
/* Re-Start mtcAlive message timer */
mtcTimer_start ( ctrl.timer, timer_handler, MTC_ALIVE_TIMER );
dlog3 ("Infra is %senabled", ctrl.infra_iface_provisioned ? "" : "NOT ");
dlog3 ("Clstr is %senabled", ctrl.clstr_iface_provisioned ? "" : "NOT ");
if ( daemon_is_file_present ( MTC_CMD_FIT__DIR ) )
{
@ -1308,20 +1308,20 @@ void daemon_service_run ( void )
_close_mgmnt_tx_socket ();
}
}
if ( daemon_is_file_present ( MTC_CMD_FIT__INFRA_RXSOCK ))
if ( daemon_is_file_present ( MTC_CMD_FIT__CLSTR_RXSOCK ))
{
if ( mtc_sock.mtc_client_infra_rx_socket )
if ( mtc_sock.mtc_client_clstr_rx_socket )
{
mtc_sock.mtc_client_infra_rx_socket->sock_ok (false);
_close_infra_rx_socket ();
mtc_sock.mtc_client_clstr_rx_socket->sock_ok (false);
_close_clstr_rx_socket ();
}
}
if ( daemon_is_file_present ( MTC_CMD_FIT__INFRA_TXSOCK ))
if ( daemon_is_file_present ( MTC_CMD_FIT__CLSTR_TXSOCK ))
{
if ( mtc_sock.mtc_client_infra_tx_socket )
if ( mtc_sock.mtc_client_clstr_tx_socket )
{
mtc_sock.mtc_client_infra_tx_socket->sock_ok (false);
_close_infra_tx_socket ();
mtc_sock.mtc_client_clstr_tx_socket->sock_ok (false);
_close_clstr_tx_socket ();
}
}
if ( daemon_is_file_present ( MTC_CMD_FIT__AMON_SOCK ))

View File

@ -63,13 +63,13 @@ typedef struct
char hostname [MAX_HOST_NAME_SIZE+1];
string macaddr ;
string address ;
string address_infra ;
string address_clstr ;
string who_i_am ;
string nodetype_str ;
string mgmnt_iface ;
string infra_iface ;
string clstr_iface ;
unsigned int nodetype ;
unsigned int function ;
@ -77,7 +77,7 @@ typedef struct
struct mtc_timer timer ; /* mtcAlive timer */
bool infra_iface_provisioned ;
bool clstr_iface_provisioned ;
/* tracks the time the level specific goenabled file was last created */
time_t goenabled_main_time ;

View File

@ -161,11 +161,11 @@ void daemon_exit ( void )
if (mtc_sock.mtc_client_tx_socket)
delete (mtc_sock.mtc_client_tx_socket);
if (mtc_sock.mtc_client_infra_rx_socket)
delete (mtc_sock.mtc_client_infra_rx_socket);
if (mtc_sock.mtc_client_clstr_rx_socket)
delete (mtc_sock.mtc_client_clstr_rx_socket);
if (mtc_sock.mtc_client_infra_tx_socket)
delete (mtc_sock.mtc_client_infra_tx_socket);
if (mtc_sock.mtc_client_clstr_tx_socket)
delete (mtc_sock.mtc_client_clstr_tx_socket);
if (mtc_sock.mtc_event_rx_sock)
delete (mtc_sock.mtc_event_rx_sock);
@ -615,30 +615,30 @@ int daemon_configure ( void )
mtc_config.mgmnt_iface = daemon_get_iface_master ( mtc_config.mgmnt_iface );
ilog("Mgmnt iface : %s\n", mtc_config.mgmnt_iface );
/* Fetch the infrastructure interface name.
/* Fetch the cluster-host interface name.
* calls daemon_get_iface_master inside so the
* aggrigated name is returned if it exists */
get_infra_iface (&mtc_config.infra_iface );
if ( strlen (mtc_config.infra_iface) )
get_clstr_iface (&mtc_config.clstr_iface );
if ( strlen (mtc_config.clstr_iface) )
{
string infra_ip = "" ;
rc = get_iface_address ( mtc_config.infra_iface, infra_ip, false );
string clstr_ip = "" ;
rc = get_iface_address ( mtc_config.clstr_iface, clstr_ip, false );
if ( rc )
{
elog ("failed to get IP address fron infra interface '%s' (rc:%d)\n", mtc_config.infra_iface, rc );
elog ("failed to get IP address for cluster-host interface '%s' (rc:%d)\n", mtc_config.clstr_iface, rc );
}
else
{
ilog ("Infra iface : %s\n", mtc_config.infra_iface );
ilog ("Infra addr : %s\n", infra_ip.c_str());
ilog ("Clstr iface : %s\n", mtc_config.clstr_iface );
ilog ("Clstr addr : %s\n", clstr_ip.c_str());
}
if (!strcmp(mtc_config.infra_iface, mtc_config.mgmnt_iface))
if (!strcmp(mtc_config.clstr_iface, mtc_config.mgmnt_iface))
{
mtcInv.infra_network_provisioned = false ;
mtcInv.clstr_network_provisioned = false ;
}
else
{
mtcInv.infra_network_provisioned = true ;
mtcInv.clstr_network_provisioned = true ;
}
}
@ -712,17 +712,17 @@ int mtc_socket_init ( void )
}
/***********************************************************/
/* Setup UDP Maintenance Command Transmit Socket Infra I/F */
/* Setup UDP Maintenance Command Transmit Socket Clstr I/F */
/***********************************************************/
if ( strlen( mtc_config.infra_iface ) )
if ( strlen( mtc_config.clstr_iface ) )
{
/* create infra transmit socket only if the interface is provisioned */
msgClassAddr::getAddressFromInterface(mtc_config.infra_iface, ip_address, INET6_ADDRSTRLEN);
sock_ptr->mtc_agent_infra_tx_socket = new msgClassTx(ip_address, mtc_config.mtc_agent_port, IPPROTO_UDP, mtc_config.infra_iface);
rc = sock_ptr->mtc_agent_infra_tx_socket->return_status;
/* create clstr transmit socket only if the interface is provisioned */
msgClassAddr::getAddressFromInterface(mtc_config.clstr_iface, ip_address, INET6_ADDRSTRLEN);
sock_ptr->mtc_agent_clstr_tx_socket = new msgClassTx(ip_address, mtc_config.mtc_agent_port, IPPROTO_UDP, mtc_config.clstr_iface);
rc = sock_ptr->mtc_agent_clstr_tx_socket->return_status;
if(rc != PASS)
{
delete sock_ptr->mtc_agent_infra_tx_socket;
delete sock_ptr->mtc_agent_clstr_tx_socket;
return rc;
}
}
@ -773,26 +773,26 @@ int mtc_socket_init ( void )
/*********************************************************************
* Setup Maintenance message receiver on the infrastructure network
* Setup Maintenance message receiver on the cluster-host network
* if it is provisioned
*
*********************************************************************/
if ( mtcInv.infra_network_provisioned == true )
if ( mtcInv.clstr_network_provisioned == true )
{
sock_ptr->mtc_agent_infra_rx_socket =
sock_ptr->mtc_agent_clstr_rx_socket =
new msgClassRx(CONTROLLER_NFS, sock_ptr->mtc_agent_port, IPPROTO_UDP );
if (( sock_ptr->mtc_agent_infra_rx_socket == NULL ) ||
( sock_ptr->mtc_agent_infra_rx_socket->return_status ))
if (( sock_ptr->mtc_agent_clstr_rx_socket == NULL ) ||
( sock_ptr->mtc_agent_clstr_rx_socket->return_status ))
{
elog("failed to create mtcClient receive socket on port %d for %s\n",
sock_ptr->mtc_agent_port,
mtc_config.infra_iface );
mtc_config.clstr_iface );
if ( sock_ptr->mtc_agent_infra_rx_socket )
if ( sock_ptr->mtc_agent_clstr_rx_socket )
{
delete (sock_ptr->mtc_agent_infra_rx_socket);
sock_ptr->mtc_agent_infra_rx_socket = NULL ;
delete (sock_ptr->mtc_agent_clstr_rx_socket);
sock_ptr->mtc_agent_clstr_rx_socket = NULL ;
}
return (FAIL_SOCKET_CREATE);
}
@ -800,21 +800,21 @@ int mtc_socket_init ( void )
/* Set messaging buffer size */
/* if we need a bigger then default we can use a sysctl to raise the max */
socket_size = MTC_AGENT_RX_BUFF_SIZE ;
if (( rc = sock_ptr->mtc_agent_infra_rx_socket->setSocketMemory ( mtc_config.infra_iface, "mtce command and event receiver (Infra network)", socket_size )) != PASS )
if (( rc = sock_ptr->mtc_agent_clstr_rx_socket->setSocketMemory ( mtc_config.clstr_iface, "mtce command and event receiver (cluster-host network)", socket_size )) != PASS )
{
elog ("setsockopt failed for SO_RCVBUF (%d:%m)\n", errno );
delete (sock_ptr->mtc_agent_infra_rx_socket);
sock_ptr->mtc_agent_infra_rx_socket = NULL ;
delete (sock_ptr->mtc_agent_clstr_rx_socket);
sock_ptr->mtc_agent_clstr_rx_socket = NULL ;
return (FAIL_SOCKET_OPTION);
}
socklen_t optlen = sizeof(sock_ptr->mtc_agent_infra_rx_socket_size);
getsockopt ( sock_ptr->mtc_agent_infra_rx_socket->getFD(), SOL_SOCKET, SO_RCVBUF,
&sock_ptr->mtc_agent_infra_rx_socket_size, &optlen );
socklen_t optlen = sizeof(sock_ptr->mtc_agent_clstr_rx_socket_size);
getsockopt ( sock_ptr->mtc_agent_clstr_rx_socket->getFD(), SOL_SOCKET, SO_RCVBUF,
&sock_ptr->mtc_agent_clstr_rx_socket_size, &optlen );
ilog ("Listening On: 'mtc client receive' socket %d (%d rx bytes - req:%d) (%s)\n",
sock_ptr->mtc_agent_port,
sock_ptr->mtc_agent_infra_rx_socket_size, MTC_AGENT_RX_BUFF_SIZE,
mtc_config.infra_iface);
sock_ptr->mtc_agent_clstr_rx_socket_size, MTC_AGENT_RX_BUFF_SIZE,
mtc_config.clstr_iface);
}
@ -1250,16 +1250,16 @@ void daemon_service_run ( void )
ilog ("Mgmnt %s link is %s\n", mtc_config.mgmnt_iface, mtcInv.mgmnt_link_up_and_running ? "Up" : "Down" );
}
if ( mtcInv.infra_network_provisioned == true )
if ( mtcInv.clstr_network_provisioned == true )
{
if ( get_link_state ( mtc_sock.ioctl_sock, mtc_config.infra_iface, &mtcInv.infra_link_up_and_running ) )
if ( get_link_state ( mtc_sock.ioctl_sock, mtc_config.clstr_iface, &mtcInv.clstr_link_up_and_running ) )
{
mtcInv.infra_link_up_and_running = false ;
wlog ("Failed to query %s operational state ; defaulting to down\n", mtc_config.infra_iface );
mtcInv.clstr_link_up_and_running = false ;
wlog ("Failed to query %s operational state ; defaulting to down\n", mtc_config.clstr_iface );
}
else
{
ilog ("Infra %s link is %s\n", mtc_config.infra_iface, mtcInv.infra_link_up_and_running ? "Up" : "Down" );
ilog ("Cluster-host %s link is %s\n", mtc_config.clstr_iface, mtcInv.clstr_link_up_and_running ? "Up" : "Down" );
}
}
@ -1336,9 +1336,9 @@ void daemon_service_run ( void )
socks.push_front (mtc_sock.mtc_event_rx_sock->getFD()); // service_events
socks.push_front (mtc_sock.mtc_agent_rx_socket->getFD()); // mtc_service_inbox
if ( mtcInv.infra_network_provisioned == true )
if ( mtcInv.clstr_network_provisioned == true )
{
socks.push_front (mtc_sock.mtc_agent_infra_rx_socket->getFD()); // mtc_service_inbox
socks.push_front (mtc_sock.mtc_agent_clstr_rx_socket->getFD()); // mtc_service_inbox
}
socks.push_front (mtc_sock.netlink_sock);
@ -1430,9 +1430,9 @@ void daemon_service_run ( void )
FD_ZERO(&mtc_sock.readfds);
FD_SET(mtc_sock.mtc_event_rx_sock->getFD(), &mtc_sock.readfds);
FD_SET(mtc_sock.mtc_agent_rx_socket->getFD(), &mtc_sock.readfds);
if ( mtcInv.infra_network_provisioned == true )
if ( mtcInv.clstr_network_provisioned == true )
{
FD_SET(mtc_sock.mtc_agent_infra_rx_socket->getFD(),&mtc_sock.readfds);
FD_SET(mtc_sock.mtc_agent_clstr_rx_socket->getFD(),&mtc_sock.readfds);
}
if ( mtce_event.fd )
@ -1512,18 +1512,18 @@ void daemon_service_run ( void )
}
}
if (( mtcInv.infra_network_provisioned == true ) &&
( sock_ptr->mtc_agent_infra_rx_socket != NULL ) &&
( FD_ISSET(sock_ptr->mtc_agent_infra_rx_socket->getFD(), &mtc_sock.readfds)))
if (( mtcInv.clstr_network_provisioned == true ) &&
( sock_ptr->mtc_agent_clstr_rx_socket != NULL ) &&
( FD_ISSET(sock_ptr->mtc_agent_clstr_rx_socket->getFD(), &mtc_sock.readfds)))
{
int cnt = 0 ;
/* Service up to MAX_RX_MSG_BATCH of messages at once */
for ( ; cnt < MAX_RX_MSG_BATCH ; cnt++ )
{
rc = mtc_service_inbox ( &mtcInv, &mtc_sock, INFRA_INTERFACE ) ;
rc = mtc_service_inbox ( &mtcInv, &mtc_sock, CLSTR_INTERFACE ) ;
if ( rc > RETRY )
{
mlog2 ("mtc_service_inbox failed (rc:%d) (Infra)\n", rc );
mlog2 ("mtc_service_inbox failed (rc:%d) (Clstr)\n", rc );
break ;
}
if ( rc == RETRY )
@ -1531,7 +1531,7 @@ void daemon_service_run ( void )
}
if ( cnt > 1 )
{
mlog2 ("serviced %d messages in one batch (Infra)\n", cnt ); // ERIC dlog
mlog2 ("serviced %d messages in one batch (Clstr)\n", cnt ); // ERIC dlog
}
}
if (FD_ISSET(mtcInv.inotify_shadow_file_fd, &mtc_sock.readfds))

View File

@ -90,9 +90,9 @@ int nodeLinkClass::calc_reset_prog_timeout ( struct nodeLinkClass::node * node_p
ilog ("%s Reboot/Reset progression has %d sec 'wait for offline' timeout\n",
node_ptr->hostname.c_str(), to );
ilog ("%s ... sources - mgmnt:Yes infra:%s bmc:%s\n",
ilog ("%s ... sources - mgmnt:Yes clstr:%s bmc:%s\n",
node_ptr->hostname.c_str(),
infra_network_provisioned ? "Yes" : "No",
clstr_network_provisioned ? "Yes" : "No",
node_ptr->bm_provisioned ? "Yes" : "No" );
return (to);
}
@ -1906,17 +1906,17 @@ int nodeLinkClass::recovery_handler ( struct nodeLinkClass::node * node_ptr )
* NOT in Dead Office Recovery (DOR) mode. */
if ( node_ptr->dor_recovery_mode == false )
{
/* If the infrastructure network is provisioned then try
/* If the cluster-host network is provisioned then try
* and issue a reset over it to expedite the recovery
* for the case where the management heartbeat has
* failed but the infra has not.
* Keeping it simple by just issing the command and not looping on it */
if (( node_ptr->infra_ip.length () > 5 ) &&
* failed but the cluster-host has not.
* Keeping it simple by just issuing the command and not looping on it */
if (( node_ptr->clstr_ip.length () > 5 ) &&
( node_ptr->heartbeat_failed[MGMNT_IFACE] == true ) &&
( node_ptr->heartbeat_failed[INFRA_IFACE] == false ))
( node_ptr->heartbeat_failed[CLSTR_IFACE] == false ))
{
ilog ("%s issuing one time graceful recovery reboot over infra network\n", node_ptr->hostname.c_str());
send_mtc_cmd ( node_ptr->hostname, MTC_CMD_REBOOT, INFRA_INTERFACE ) ;
ilog ("%s issuing one time graceful recovery reboot over cluster-host network\n", node_ptr->hostname.c_str());
send_mtc_cmd ( node_ptr->hostname, MTC_CMD_REBOOT, CLSTR_INTERFACE ) ;
}
if ((node_ptr->bm_provisioned) && (node_ptr->bm_accessible))
@ -3027,9 +3027,9 @@ int nodeLinkClass::disable_handler ( struct nodeLinkClass::node * node_ptr )
/* Tell the host that it is locked */
send_mtc_cmd ( node_ptr->hostname , MTC_MSG_LOCKED, MGMNT_INTERFACE );
if ( infra_network_provisioned )
if ( clstr_network_provisioned )
{
send_mtc_cmd ( node_ptr->hostname , MTC_MSG_LOCKED, INFRA_INTERFACE );
send_mtc_cmd ( node_ptr->hostname , MTC_MSG_LOCKED, CLSTR_INTERFACE );
}
/* Change the oper and avail states in the database */
@ -3219,7 +3219,7 @@ int nodeLinkClass::offline_handler ( struct nodeLinkClass::node * node_ptr )
case MTC_OFFLINE__START:
{
node_ptr->mtcAlive_mgmnt = false ;
node_ptr->mtcAlive_infra = false ;
node_ptr->mtcAlive_clstr = false ;
node_ptr->offline_log_throttle = 0 ;
node_ptr->offline_search_count = 0 ;
@ -3242,13 +3242,13 @@ int nodeLinkClass::offline_handler ( struct nodeLinkClass::node * node_ptr )
node_ptr->mtcAlive_gate = false ;
node_ptr->mtcAlive_mgmnt = false ;
node_ptr->mtcAlive_infra = false ;
node_ptr->mtcAlive_clstr = false ;
/* Request a mtcAlive from host from Mgmnt and Infra (if provisioned) */
/* Request a mtcAlive from host from Mgmnt and Clstr (if provisioned) */
send_mtc_cmd ( node_ptr->hostname, MTC_REQ_MTCALIVE, MGMNT_INTERFACE );
if ( infra_network_provisioned )
if ( clstr_network_provisioned )
{
send_mtc_cmd ( node_ptr->hostname, MTC_REQ_MTCALIVE, INFRA_INTERFACE );
send_mtc_cmd ( node_ptr->hostname, MTC_REQ_MTCALIVE, CLSTR_INTERFACE );
}
/* reload the timer */
@ -3269,7 +3269,7 @@ int nodeLinkClass::offline_handler ( struct nodeLinkClass::node * node_ptr )
plog ("%s offline (external)\n", node_ptr->hostname.c_str());
node_ptr->offlineStage = MTC_OFFLINE__IDLE ;
}
else if ( !node_ptr->mtcAlive_mgmnt && !node_ptr->mtcAlive_infra )
else if ( !node_ptr->mtcAlive_mgmnt && !node_ptr->mtcAlive_clstr )
{
if ( ++node_ptr->offline_search_count > offline_threshold )
{
@ -3298,20 +3298,20 @@ int nodeLinkClass::offline_handler ( struct nodeLinkClass::node * node_ptr )
else
{
node_ptr->mtcAlive_online = true ;
if ( node_ptr->mtcAlive_mgmnt || node_ptr->mtcAlive_infra )
if ( node_ptr->mtcAlive_mgmnt || node_ptr->mtcAlive_clstr )
{
ilog_throttled ( node_ptr->offline_log_throttle, 10,
"%s still seeing mtcAlive (%c:%c)\n",
node_ptr->hostname.c_str(),
node_ptr->mtcAlive_mgmnt ? 'Y' : 'n',
node_ptr->mtcAlive_infra ? 'Y' : 'n');
node_ptr->mtcAlive_clstr ? 'Y' : 'n');
}
else
{
alog ("%s still seeing mtcAlive (%c:%c)\n",
node_ptr->hostname.c_str(),
node_ptr->mtcAlive_mgmnt ? 'Y' : 'n',
node_ptr->mtcAlive_infra ? 'Y' : 'n');
node_ptr->mtcAlive_clstr ? 'Y' : 'n');
}
}

View File

@ -126,9 +126,9 @@ void nodeLinkClass::mnfa_add_host ( struct nodeLinkClass::node * node_ptr , ifac
mnfa_host_count[MGMNT_IFACE],
get_iface_name_str(MGMNT_IFACE),
node_ptr->hbs_minor_count[MGMNT_IFACE],
mnfa_host_count[INFRA_IFACE],
get_iface_name_str(INFRA_IFACE),
node_ptr->hbs_minor_count[INFRA_IFACE]);
mnfa_host_count[CLSTR_IFACE],
get_iface_name_str(CLSTR_IFACE),
node_ptr->hbs_minor_count[CLSTR_IFACE]);
log_mnfa_pool ( mnfa_awol_list );
@ -217,7 +217,7 @@ void nodeLinkClass::mnfa_enter ( void )
for ( struct node * ptr = head ; ; ptr = ptr->next )
{
if ((( ptr->hbs_minor[MGMNT_IFACE] == true ) ||
( ptr->hbs_minor[INFRA_IFACE] == true )) &&
( ptr->hbs_minor[CLSTR_IFACE] == true )) &&
( ptr->operState == MTC_OPER_STATE__ENABLED ))
{
/* Give all the hosts in the mnfa list a graceful
@ -294,12 +294,12 @@ void nodeLinkClass::mnfa_exit ( bool force )
* Clear heartbeat degrades */
for ( struct node * ptr = head ; ; ptr = ptr->next )
{
if ((( ptr->hbs_minor[INFRA_IFACE] == true ) ||
if ((( ptr->hbs_minor[CLSTR_IFACE] == true ) ||
( ptr->hbs_minor[MGMNT_IFACE] == true )) &&
( ptr->operState == MTC_OPER_STATE__ENABLED ))
{
ptr->hbs_minor[MGMNT_IFACE] = false ;
ptr->hbs_minor[INFRA_IFACE] = false ;
ptr->hbs_minor[CLSTR_IFACE] = false ;
if ( force == true )
{
@ -348,7 +348,7 @@ void nodeLinkClass::mnfa_exit ( bool force )
}
mnfa_host_count[MGMNT_IFACE] = 0 ;
mnfa_host_count[INFRA_IFACE] = 0 ;
mnfa_host_count[CLSTR_IFACE] = 0 ;
mnfa_awol_list.clear();
}
@ -378,8 +378,8 @@ void nodeLinkClass::mnfa_cancel ( void )
if ( node_ptr != NULL )
{
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_MGMNT ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_INFRA ;
node_ptr->hbs_minor[INFRA_IFACE] = false ;
node_ptr->degrade_mask &= ~DEGRADE_MASK_HEARTBEAT_CLSTR ;
node_ptr->hbs_minor[CLSTR_IFACE] = false ;
node_ptr->hbs_minor[MGMNT_IFACE] = false ;
node_ptr->mnfa_graceful_recovery = false ;
mtcInvApi_update_task ( node_ptr, "" );
@ -387,7 +387,7 @@ void nodeLinkClass::mnfa_cancel ( void )
}
send_hbs_command ( this->my_hostname, MTC_RECOVER_HBS );
this->mnfa_host_count[MGMNT_IFACE] = 0 ;
this->mnfa_host_count[INFRA_IFACE] = 0 ;
this->mnfa_host_count[CLSTR_IFACE] = 0 ;
this->mnfa_active = false ;
}
mnfa_awol_list.clear();

View File

@ -64,21 +64,21 @@ typedef struct
* maintenance commands to the client (compute) node and
* receive the compute node reply in the receive direction */
msgClassSock* mtc_agent_tx_socket ; /**< tx to mtc client mgmnt */
msgClassSock* mtc_agent_infra_tx_socket; /**< tx to mtc client infra */
msgClassSock* mtc_agent_clstr_tx_socket; /**< tx to mtc client clstr */
msgClassSock* mtc_agent_rx_socket ; /**< rx from mtc client mgmnt */
msgClassSock* mtc_agent_infra_rx_socket; /**< rx from mtc client infra */
msgClassSock* mtc_agent_clstr_rx_socket; /**< rx from mtc client clstr */
int mtc_agent_port ; /**< the agent rx port number */
struct sockaddr_in agent_addr; /**< socket attributes struct */
int mtc_agent_rx_socket_size ;
int mtc_agent_infra_rx_socket_size ;
int mtc_agent_clstr_rx_socket_size ;
/** UDP sockets used by the mtcClient to receive maintenance
* commands from and transmit replies to the mtcAgent */
msgClassSock* mtc_client_rx_socket ; /**< rx from controller */
msgClassSock* mtc_client_tx_socket ; /**< tx to controller mgmnt */
msgClassSock* mtc_client_infra_tx_socket ; /**< tx to controller infra */
msgClassSock* mtc_client_infra_rx_socket ; /**< rx from controller infra */
msgClassSock* mtc_client_clstr_tx_socket ; /**< tx to controller clstr */
msgClassSock* mtc_client_clstr_rx_socket ; /**< rx from controller clstr */
int mtc_cmd_port ; /**< mtc command port number */
struct sockaddr_in mtc_cmd_addr ; /**< socket attributes mgmnt */
@ -129,7 +129,7 @@ int send_mtc_cmd ( string & hostname, int cmd, int interface );
int mtc_service_command ( mtc_socket_type * sock_ptr , int interface );
int mtc_set_availStatus ( string & hostname, mtc_nodeAvailStatus_enum status );
int mtce_send_event ( mtc_socket_type * sock_ptr, int cmd , const char * mtce_name_ptr );
int mtc_infra_init ( mtc_socket_type * sock_ptr , char * iface );
int mtc_clstr_init ( mtc_socket_type * sock_ptr , char * iface );
string get_who_i_am ( void );
#endif

View File

@ -17,10 +17,10 @@ keystone_port = 5000 ; The Keystone Port Number
ha_port = 7777 ; The Inventory Port Number
mtc_agent_port = 2101 ; OBS: ........ Active Controller Maintenance Rx Port
mtc_rx_mgmnt_port = 2101 ; Active Controller Maintenance Mgmnt Network Rx Port
mtc_rx_infra_port = 2111 ; Active Controller Maintenance Infra Network Rx Port
mtc_rx_clstr_port = 2111 ; Active Controller Maintenance Clstr Network Rx Port
hbs_agent_mgmnt_port = 2103 ; Management Interface Heartbeat Pulse Response Rx Port
hbs_agent_infra_port = 2113 ; Infrastructure Interface Heartbeat Pulse Response Rx Port
infra_agent_port = 2110 ; Agent Command Response RX Port
hbs_agent_clstr_port = 2113 ; Cluster-host Interface Heartbeat Pulse Response Rx Port
clstr_agent_port = 2110 ; Agent Command Response RX Port
mtc_to_hbs_cmd_port = 2104 ; Mtc to Hbs Command Port Number
mtc_to_guest_cmd_port = 2108 ; Mtc to guestAgent Command port
hbs_to_mtc_event_port = 2107 ; Hbs to Mtc Event Port Number
@ -69,9 +69,9 @@ api_retries = 10 ; number of API retries b4 failure
[client] ; Client Configuration
scheduling_priority = 99 ; realtime scheduling; range of 1 .. 99 is acceptable
mtc_rx_mgmnt_port = 2118 ; Client Maintenance Command Rx Port
mtc_rx_infra_port = 2115 ; Client Maintenance Command Rx Port
mtc_rx_clstr_port = 2115 ; Client Maintenance Command Rx Port
hbs_client_mgmnt_port = 2106 ; Management Interface Heartbeat Pulse Request Rx Port
hbs_client_infra_port = 2116 ; Infrastructure Interface Heartbeat Pulse Request Rx Port
hbs_client_clstr_port = 2116 ; Cluster-host Interface Heartbeat Pulse Request Rx Port
hwmon_cmd_port = 2114 ; hwmond Command Rx Port Number
pmon_pulse_port = 2109 ; Process Monitor I'm Alive pulse Port Rx Port
sched_delay_threshold = 300 ; scheduler delay time in msecs that will trigger
@ -142,7 +142,7 @@ latency_thld = 500 ; scheduling latency log threshold ; msec
debug_event = none ; string name of HTTP API to trace
debug_filter = none ; filter string (not used yet)
infra_degrade_only = 0 ; Only degrade for infra failures
clstr_degrade_only = 0 ; Only degrade for cluster-host failures
testmode = 0 ; set to 1 to enable test mode
testmask = 0 ; bit field of out-of-service stress tests
fit_code = 0 ; codes are in nodeBase.h -> fit_code_enum