Mtce: increase hbsAgent/hwmond command RX socket buffer
hbsAgent and hwmond obtain host inventory from the mtcAgent.
After a process restart they emit a "ready" event, which triggers
mtcAgent to send it all node inventory as individula messages for each
host, sometimes 2.
On large deployments (100+ nodes) this burst of messaging can overrun
the current command receive socket buffer, causing dropped inventory
messages that can lead to incomplete monitoring coverage.
This change raises the command channel's SO_RCVBUF for both hbsAgent
and hwmond to rmem size to provide headroom for these restart bursts.
Risk Assessment:
- No protocol change; process form and function remains unchanged.
- Safe for upgrade/rollback with no API change, only local socket
sizing is altered.
- Memory impact is limited to the larger RX buffer allowable
per process.
Test Plan: The issue has been verified to occur with both hwmond and
the hbsAgent processes without this update and then fixed
with this update.
PASS: Verify socket memory is increased to kernel rmem value for both
hbsAgent and hwmond
PASS: Verify in an at-scale 100 node system, running WRCP, WRO and WRA
app stack, on the active controller that a ...
PASS: - hwmond process restart gets required inventory for all node
PASS: - hbsAgent process restart gets required inventory for all nodes
PASS: Verify restart of hbsAgent on the standby controller gets the
required inventory for all nodes.
PASS: Verify restart of each condition above 5 times
Closes-Bug: 2125017
Change-Id: I6b77e0737af7313fba199afc6b9721c7ef48e2c0
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 Wind River Systems, Inc.
|
||||
* Copyright (c) 2013-2020, 2025 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -774,6 +774,7 @@ int hbs_socket_init ( void )
|
||||
{
|
||||
/* load local variables */
|
||||
int port = hbs_config.mtc_to_hbs_cmd_port ;
|
||||
int rmem_max = daemon_get_rmem_max();
|
||||
|
||||
/* Handle re-init case */
|
||||
if ( hbs_sock.mtc_to_hbs_sock != NULL )
|
||||
@@ -788,6 +789,17 @@ int hbs_socket_init ( void )
|
||||
port,
|
||||
IPPROTO_UDP);
|
||||
|
||||
/* Set rx socket buffer size to rmem_max.
|
||||
* Needed to handle inventory push from mtcAgent over
|
||||
* process restart on at-scale system deployments. */
|
||||
if (rmem_max > 0)
|
||||
{
|
||||
hbs_sock.mtc_to_hbs_sock->setSocketMemory(
|
||||
hbs_config.mgmnt_iface,
|
||||
"mtc command rx socket memory",
|
||||
rmem_max );
|
||||
}
|
||||
|
||||
/* Check the socket */
|
||||
if (hbs_sock.mtc_to_hbs_sock != NULL )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016 Wind River Systems, Inc.
|
||||
* Copyright (c) 2013, 2016, 2025 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -70,6 +70,7 @@ void hwmon_msg_fini ( void )
|
||||
int cmd_rx_port_init ( int port )
|
||||
{
|
||||
int rc = PASS ;
|
||||
int rmem_max = daemon_get_rmem_max();
|
||||
hwmon_sock.cmd_port = port ;
|
||||
|
||||
mtcAgent_ip = getipbyname ( CONTROLLER );
|
||||
@@ -82,6 +83,16 @@ int cmd_rx_port_init ( int port )
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/* Set rx socket buffer size to rmem_max.
|
||||
* Needed to handle inventory push from mtcAgent over
|
||||
* process restart on at-scale system deployments. */
|
||||
if (rmem_max > 0)
|
||||
{
|
||||
hwmon_sock.cmd_sock->setSocketMemory(
|
||||
daemon_get_cfg_ptr()->mgmnt_iface,
|
||||
"mtc command rx socket memory",
|
||||
rmem_max );
|
||||
}
|
||||
return (rc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user