yumapro  20.10-10
YumaPro SDK
YP-HA Control

Service layer for High Availability (YP-HA). More...

Collaboration diagram for YP-HA Control:

Data Structures

struct  yp_ha_server_t
 For each CLI-configured ha-server there will be one entry entry the active and standby both need this list; active server will reject register-request request from standby server if their server-id is not in the list. More...
 
struct  yp_ha_service_t
 YP-HA service instance. More...
 

Enumerations

Functions

void agt_yp_ha_preinit (void)
 Pre-Initialize the YP-HA subsys handler. More...
 
status_t agt_yp_ha_init (void)
 Initialize the YP-HA subsys handler (begin phase 2 init) More...
 
status_t agt_yp_ha_init2 (void)
 Initialize the YP-HA shared state (phase 2 init, post external init). More...
 
void agt_yp_ha_cleanup (void)
 Cleanup the YP-HA Module. More...
 
status_t agt_yp_ha_add_server_cli (const xmlChar *valstr)
 Add an HA server entry from the –ha-server CLI parm. More...
 
boolean agt_yp_ha_mgmt_enabled (void)
 Check if MGMT protocols disabled because YP-HA Standby mode. More...
 
status_t agt_yp_ha_be_active (void)
 Put this server in YP-HA Active mode. More...
 
status_t agt_yp_ha_be_none (void)
 Put this server in WAIT_ROLE state. More...
 
status_t agt_yp_ha_be_standby (const xmlChar *new_server_id)
 Put this server in YP-HA Standby mode. More...
 
agt_ha_role_t agt_yp_ha_get_role (void)
 Get the YP-HA server role for this server. More...
 
yp_ha_service_tagt_yp_ha_get_service_cb (void)
 Get the YP-HA service control block for this server. More...
 
void agt_yp_ha_check_standby_io (void)
 Check if the YP-SA Standby mode needs to check for input. More...
 
yp_ha_server_tagt_yp_ha_find_server (const xmlChar *server_name)
 Find a server record. More...
 
void agt_yp_ha_config_update (rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
 Do a config update in the active role. More...
 
status_t agt_yp_ha_nvstore (void)
 Do an <nvstore> in the active role. More...
 
boolean agt_yp_ha_sil_disabled (void)
 Check if all hooks are enabled or disabled because of the YP-HA Standby mode. More...
 
void agt_yp_ha_mod_event (const xmlChar *name, const xmlChar *revision, val_value_t *inputval, boolean is_module, boolean is_load)
 Generate a module event. More...
 

Detailed Description

Service layer for High Availability (YP-HA).

Controls service control that will handle messages and invoke active and/or standy handlers for each message.

Enumeration Type Documentation

YP-HA Shared State.

Enumerator
HA_STATE_NONE 

not set

HA_STATE_DISABLED 

HA disabled.

HA_STATE_ERROR 

HA error state.

HA_STATE_WAIT_ROLE 

waiting for HA role

HA_STATE_BE_ACTIVE 

in process of becoming active server

HA_STATE_ACTIVE 

active server role

HA_STATE_BE_STANDBY 

in process of becoming standby server

HA_STATE_STANDBY 

standby server role

HA_STATE_SHUTTING_DOWN 

shutting down HA service

Function Documentation

status_t agt_yp_ha_add_server_cli ( const xmlChar *  valstr)

Add an HA server entry from the –ha-server CLI parm.

Parameters
valstrCLI value string to parse and use
Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

status_t agt_yp_ha_be_active ( void  )

Put this server in YP-HA Active mode.

Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

status_t agt_yp_ha_be_none ( void  )

Put this server in WAIT_ROLE state.

Returns
status

Here is the call graph for this function:

status_t agt_yp_ha_be_standby ( const xmlChar *  new_server_id)

Put this server in YP-HA Standby mode.

Parameters
new_server_idserver-id of the new active server
Returns
status NO_ERR if this server able to enter YP-HA Standby mode

Here is the call graph for this function:

Here is the caller graph for this function:

void agt_yp_ha_check_standby_io ( void  )

Check if the YP-SA Standby mode needs to check for input.

Called by agt_ncxserver or main loop of some sort.

Here is the call graph for this function:

Here is the caller graph for this function:

void agt_yp_ha_cleanup ( void  )

Cleanup the YP-HA Module.

Called by the server during shutdown.

Here is the call graph for this function:

void agt_yp_ha_config_update ( rpc_msg_t msg,
agt_cfg_transaction_t txcb 
)

Do a config update in the active role.

Parameters
msgRPC msg in progress
txcbtransaction control block

Here is the call graph for this function:

yp_ha_server_t* agt_yp_ha_find_server ( const xmlChar *  server_name)

Find a server record.

** NOT A USER API FUNCTION **

Find a ha_server record

Parameters
server_nameserver name string
Returns
pointer to found record

Here is the call graph for this function:

Here is the caller graph for this function:

agt_ha_role_t agt_yp_ha_get_role ( void  )

Get the YP-HA server role for this server.

Returns
server role enum

Here is the caller graph for this function:

yp_ha_service_t* agt_yp_ha_get_service_cb ( void  )

Get the YP-HA service control block for this server.

Returns
YP-HA service control block
status_t agt_yp_ha_init ( void  )

Initialize the YP-HA subsys handler (begin phase 2 init)

Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

status_t agt_yp_ha_init2 ( void  )

Initialize the YP-HA shared state (phase 2 init, post external init).

The YP-HA role is expected to be set

Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

boolean agt_yp_ha_mgmt_enabled ( void  )

Check if MGMT protocols disabled because YP-HA Standby mode.

Returns
TRUE if management sessions are allowed now

Here is the call graph for this function:

Here is the caller graph for this function:

void agt_yp_ha_mod_event ( const xmlChar *  name,
const xmlChar *  revision,
val_value_t inputval,
boolean  is_module,
boolean  is_load 
)

Generate a module event.

Notify the standby of a new module loaded into the server

Parameters
namemodule or bundle name
revisionmodule or bundle revision version
inputvalparent of any <deviation> parameters
is_moduleTRUE for module; FALSE for bundle
is_loadTRUE for laod; FALSE for unload

Here is the call graph for this function:

status_t agt_yp_ha_nvstore ( void  )

Do an <nvstore> in the active role.

Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

void agt_yp_ha_preinit ( void  )

Pre-Initialize the YP-HA subsys handler.

The ha_serverQ needs to be initialized. This is expected to be set with server records by agt_cli by processing ha-server parameters.

Here is the call graph for this function:

boolean agt_yp_ha_sil_disabled ( void  )

Check if all hooks are enabled or disabled because of the YP-HA Standby mode.

Returns
TRUE if SIL disabled; FALSE if SIL enabled

Here is the call graph for this function:

Here is the caller graph for this function: