98typedef enum yp_ha_state_t_ {
133typedef struct yp_ha_server_t_ {
157typedef struct yp_ha_service_t_ {
317extern const xmlChar *
395 const xmlChar *revision,
412 const xmlChar **config_stamp);
428 const xmlChar **msg);
436extern const xmlChar *
Multi-Protocol Network Management Server.
Manage Server configuration edit transactions.
agt_ha_role_t
server HA mode mode
Definition: agt.h:790
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.
Definition: agt_yp_ha.c:1317
yp_ha_state_t
YP-HA Shared State.
Definition: agt_yp_ha.h:98
status_t agt_yp_ha_nvstore(void)
Do an <nvstore> in the active role.
Definition: agt_yp_ha.c:1247
yp_ha_server_t * agt_yp_ha_find_server(const xmlChar *server_name)
Find a server record.
Definition: agt_yp_ha.c:1129
status_t agt_yp_ha_get_error_info(const xmlChar **tstamp, const xmlChar **msg)
Get the last error time and error message, if any.
Definition: agt_yp_ha.c:1400
status_t agt_yp_ha_be_standby(const xmlChar *new_server_id)
Put this server in YP-HA Standby mode.
Definition: agt_yp_ha.c:784
agt_ha_role_t agt_yp_ha_get_role(void)
Get the YP-HA server role for this server.
Definition: agt_yp_ha.c:974
status_t agt_yp_ha_add_server_cli(const xmlChar *valstr)
Add an HA server entry from the –ha-server CLI parm.
Definition: agt_yp_ha.c:482
status_t agt_yp_ha_init(void)
Initialize the YP-HA subsys handler (begin phase 2 init)
Definition: agt_yp_ha.c:246
const xmlChar * agt_yp_ha_get_active_server(void)
Get the active server or in progress of connecting.
Definition: agt_yp_ha.c:1435
status_t agt_yp_ha_init2(void)
Initialize the YP-HA shared state (phase 2 init, post external init).
Definition: agt_yp_ha.c:371
void agt_yp_ha_cleanup(void)
Cleanup the YP-HA Module.
Definition: agt_yp_ha.c:448
status_t agt_yp_ha_be_active(void)
Put this server in YP-HA Active mode.
Definition: agt_yp_ha.c:573
void agt_yp_ha_config_update(rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
Do a config update in the active role.
Definition: agt_yp_ha.c:1156
boolean agt_yp_ha_sil_disabled(void)
Check if all hooks are enabled or disabled because of the YP-HA Standby mode.
Definition: agt_yp_ha.c:1284
status_t agt_yp_ha_be_none(void)
Put this server in WAIT_ROLE state.
Definition: agt_yp_ha.c:683
void agt_yp_ha_preinit(void)
Pre-Initialize the YP-HA subsys handler.
Definition: agt_yp_ha.c:220
status_t agt_yp_ha_get_config_info(ncx_transaction_id_t *config_id, const xmlChar **config_stamp)
Get the config ID and timestamp info.
Definition: agt_yp_ha.c:1357
boolean agt_yp_ha_mgmt_enabled(void)
Check if MGMT protocols disabled because YP-HA Standby mode.
Definition: agt_yp_ha.c:930
yp_ha_service_t * agt_yp_ha_get_service_cb(void)
Get the YP-HA service control block for this server.
Definition: agt_yp_ha.c:1065
void agt_yp_ha_check_standby_io(void)
Check if the YP-SA Standby mode needs to check for input.
Definition: agt_yp_ha.c:1082
status_t agt_yp_ha_get_config_counters(uint64 *updates, uint64 *failures)
Get the config-updates and config-failures counters.
Definition: agt_yp_ha.c:1467
const xmlChar * agt_yp_ha_get_role_state(const xmlChar **tstamp)
Get the YP-HA server role for this server as a string.
Definition: agt_yp_ha.c:1016
@ HA_STATE_DISABLED
HA disabled.
Definition: agt_yp_ha.h:103
@ HA_STATE_SHUTTING_DOWN
shutting down HA service
Definition: agt_yp_ha.h:124
@ HA_STATE_WAIT_ROLE
waiting for HA role
Definition: agt_yp_ha.h:109
@ HA_STATE_STANDBY
standby server role
Definition: agt_yp_ha.h:121
@ HA_STATE_ERROR
HA error state.
Definition: agt_yp_ha.h:106
@ HA_STATE_ACTIVE
active server role
Definition: agt_yp_ha.h:115
@ HA_STATE_NONE
not set
Definition: agt_yp_ha.h:100
@ HA_STATE_BE_STANDBY
in process of becoming standby server
Definition: agt_yp_ha.h:118
@ HA_STATE_BE_ACTIVE
in process of becoming active server
Definition: agt_yp_ha.h:112
status_t
global error return code
Definition: status_enum.h:210
#define TSTAMP_MIN_SIZE
normal minimum buffer size for a tstamp buffer
Definition: tstamp.h:71
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:728
global error status code enumerations
Transaction Control Block.
Definition: agt_cfg.h:235
One YANG data-def-stmt.
Definition: obj.h:1229
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
one value to match one type
Definition: val.h:912
For each CLI-configured ha-server there will be one entry entry the active and standby both need this...
Definition: agt_yp_ha.h:133
dlq_hdr_t qhdr
queue header
Definition: agt_yp_ha.h:135
xmlChar * server_name
service name
Definition: agt_yp_ha.h:138
struct yp_ha_subsys_t_ * subsys_cb
maintained only by the active server
Definition: agt_yp_ha.h:147
uint16 server_port
peer TCP port number
Definition: agt_yp_ha.h:144
xmlChar * server_addr
peer IP address or domain name
Definition: agt_yp_ha.h:141
YP-HA service instance.
Definition: agt_yp_ha.h:157
val_value_t * payload_val
payload_val for reuse and faster messages
Definition: agt_yp_ha.h:171
struct yp_ha_standby_t_ * standby_cb
standby mode
Definition: agt_yp_ha.h:186
obj_template_t * yp_ha_obj
YANG object template for service layer.
Definition: agt_yp_ha.h:168
uint64 config_updates
config-updates leaf
Definition: agt_yp_ha.h:192
boolean ha_enabled
HA enabled flag.
Definition: agt_yp_ha.h:177
boolean ha_init_done
HA init done flag.
Definition: agt_yp_ha.h:180
struct yp_ha_active_t_ * active_cb
active mode
Definition: agt_yp_ha.h:183
uint64 config_failures
config-failures leaf
Definition: agt_yp_ha.h:195
yp_ha_server_t * my_server_cb
HA control block.
Definition: agt_yp_ha.h:162
yp_ha_state_t ha_state
current HA state
Definition: agt_yp_ha.h:174
const xmlChar * ha_server_key
shared HA pool key
Definition: agt_yp_ha.h:165
dlq_hdr_t ha_serverQ
common state is a Q of yp_ha_server_t
Definition: agt_yp_ha.h:159
status_t last_error_num
last error message leaf
Definition: agt_yp_ha.h:201