mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-25 09:14:05 +00:00
9e99dc2580
The xcatd install monitor serves every installing node from one accept loop. It accepts a connection, resolves the peer to a node and dispatches the request in line, so nothing else is accepted until that request returns. On a management node holding three connections that send nothing, a second node waited 5.7 seconds for the monitor's greeting. do_installm_service in xCAT-server/sbin/xcatd calls plugin_command directly in every branch. The per-request fork that once stood there is commented out with the note that the node must be blocked, because 'nodeset next' and 'installstatus' for one node write the same chain row. The monitor now gives each connection its own child and keeps that ordering per node: the child for a node reads a pipe left by the previous child for the same node, and starts when that pipe reaches end of file. Live children are capped at 64 and the rest wait in the listen backlog, the parent reaps them, and a child that dies no longer takes the monitor with it. A per-node lock file was rejected because it needs a new directory and gives no arrival order; letting the parent wait for the busy node was rejected because it blocks the accept loop again. xcatd_install_monitor_concurrency.t lifts do_installm_service out of the program and drives it with real clients. Without this change the second node waits 5.7 seconds and the monitor does not survive a request that kills its handler. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>