From b8d8ce676f5f4219cd8da6f044b760eb099ee75d Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Fri, 23 Nov 2018 13:37:20 -0500 Subject: [PATCH] Mtce: Fix guestAgent inventory query Maintenance was recently modified to support - receiving Ready Events and Command Responses and - sending Ready Events, Commands and Inventory from/to surrogate daemons over its floating IP rather than the LO interface in support of surrogate daemons that run on the inactive controller or any hosts in the system for that matter. Unfortunately the guestAgent was not modified to send its Ready Event or Receive commands and inventory in the same way. This update fixes that by binding its Inventory/Command receiver and Ready event transmitter to the active controllers floating IP. With that change the guestAgent once again gets its Inventory/Commands on its process startup as well as on the restart of the mtcAgent. Change-Id: I0b07596501f45d28ca0d6c82293d0b904a5e39fb Closes-Bug: 1804579 Signed-off-by: Eric MacDonald --- mtce-guest/centos/build_srpm.data | 2 +- mtce-guest/src/guestAgent.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mtce-guest/centos/build_srpm.data b/mtce-guest/centos/build_srpm.data index f8556950..a6783bd5 100644 --- a/mtce-guest/centos/build_srpm.data +++ b/mtce-guest/centos/build_srpm.data @@ -1,3 +1,3 @@ SRC_DIR="src" -TIS_PATCH_VER=139 +TIS_PATCH_VER=140 BUILD_IS_SLOW=5 diff --git a/mtce-guest/src/guestAgent.cpp b/mtce-guest/src/guestAgent.cpp index c2bb5647..d852087b 100644 --- a/mtce-guest/src/guestAgent.cpp +++ b/mtce-guest/src/guestAgent.cpp @@ -379,7 +379,7 @@ int _socket_init ( void ) /* UDP Tx Message Socket Towards guestServer */ /******************************************************************/ - _ctrl.sock.agent_tx_sock = new msgClassTx(guestAgent_ip.c_str(), guest_config.client_rx_port, IPPROTO_UDP, guest_config.mgmnt_iface); + _ctrl.sock.agent_tx_sock = new msgClassTx(guestAgent_ip.data(), guest_config.client_rx_port, IPPROTO_UDP, guest_config.mgmnt_iface); rc = _ctrl.sock.agent_tx_sock->return_status; if ( rc ) { @@ -392,7 +392,7 @@ int _socket_init ( void ) /******************************************************************/ _ctrl.sock.mtc_event_tx_port = guest_config.hbs_to_mtc_event_port ; - _ctrl.sock.mtc_event_tx_sock = new msgClassTx(LOOPBACK_IP, guest_config.hbs_to_mtc_event_port, IPPROTO_UDP); + _ctrl.sock.mtc_event_tx_sock = new msgClassTx(guestAgent_ip.data(), guest_config.hbs_to_mtc_event_port, IPPROTO_UDP, guest_config.mgmnt_iface); rc = _ctrl.sock.mtc_event_tx_sock->return_status; if ( rc ) { @@ -407,7 +407,7 @@ int _socket_init ( void ) /***************************************************************/ _ctrl.sock.mtc_cmd_port = guest_config.mtc_to_guest_cmd_port ; - _ctrl.sock.mtc_cmd_sock = new msgClassRx(LOOPBACK_IP, guest_config.mtc_to_guest_cmd_port, IPPROTO_UDP); + _ctrl.sock.mtc_cmd_sock = new msgClassRx(guestAgent_ip.data(), guest_config.mtc_to_guest_cmd_port, IPPROTO_UDP); rc = _ctrl.sock.mtc_cmd_sock->return_status; if ( rc ) {