distcloud/distributedcloud/ocf
Li Zhu 7ce8b72869 Fix up confirm_stop functions of DC OCF scripts
The DC OCF scripts were not updated over the switch to Debian
in StarlingX 8.0. As a result, it could lead to orphan processes
over the service restart or controller swact. The orphan processes
consume resources and perform duplicate/obsolete tasks (e.g.
auditing the same subclouds as the corresponding worker processes)
until their work queues are empty.

This commit fixes up the pgrep option to restore the functionality
of the confirm_stop function of the OCF script. Processes that
fail to be terminated will get killed.

Test Plan:
  - Deploy a small DC system. Verify that all DC services can
    be started, stopped and restarted by SM.
  - Deploy a large DC system with many subclouds. Reduce the
    thread_pool_size of dcmanager-audit-worker. Let the system
    soak for a couple of hours. Restart the service in the
    middle of the audit cycle. Verify that dcmanager-audit-worker
    sevice was successfully restarted and there are no orphan
    processes.

Closes-Bug: 2064368
Change-Id: Ie5cbc89cde374e32d4e0a3799a9f8833c071d206
Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
2024-05-01 08:48:03 -04:00
..
dcdbsync-api Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcmanager-api Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcmanager-audit Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcmanager-audit-worker Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcmanager-manager Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcmanager-orchestrator Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcmanager-state Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcorch-cinder-api-proxy Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
dcorch-engine Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcorch-identity-api-proxy Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcorch-neutron-api-proxy Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
dcorch-nova-api-proxy Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
dcorch-patch-api-proxy Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00
dcorch-sysinv-api-proxy Fix up confirm_stop functions of DC OCF scripts 2024-05-01 08:48:03 -04:00