Fix to shutdown all HCL process that initiated by HTX. #2894
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
code fix to kill/shutdown all HTX/HCL processes that was initiated by HTX before initiating HTX for block devices.
Also this code fix re-initiating the HTX process when its already running.
Actual Issue
[stdlog] 2024-09-12 00:43:03,092 avocado.utils.process process L0715 INFO | Command ' ps -C htxd -o pid=|xargs kill -9' finished with 1 after 0.001392055s
[stdlog] 2024-09-12 00:43:03,092 avocado.test stacktrace L0041 ERROR|
[stdlog] 2024-09-12 00:43:03,092 avocado.test stacktrace L0043 ERROR| Reproduced traceback from: /usr/local/lib/python3.9/site-packages/avocado_framework-106.0-py3.9.egg/avocado/core/test.py:607
[stdlog] 2024-09-12 00:43:03,092 avocado.test stacktrace L0050 ERROR| Traceback (most recent call last):
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| File "/home/OpTest/avocado-fvt-wrapper/tests/avocado-misc-tests/io/disk/htx_block_devices.py", line 166, in test_start
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| process.run(" ps -C htxd -o pid=|xargs kill -9")
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| File "/usr/local/lib/python3.9/site-packages/avocado_framework-106.0-py3.9.egg/avocado/utils/process.py", line 1013, in run
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| raise CmdError(cmd, sp.result)
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| avocado.utils.process.CmdError: Command ' ps -C htxd -o pid=|xargs kill -9' failed.
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| stdout: b''
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| stderr: b"error: unknown sort specifier\n\nUsage:\n ps [options]\n\n Try 'ps --help <simple|list|output|threads|misc|all>'\n or 'ps --help <s|l|o|t|m|a>'\n for additional help text.\n\nFor more details see ps(1).\n"
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0050 ERROR| additional_info: None
[stdlog] 2024-09-12 00:43:03,093 avocado.test stacktrace L0051 ERROR|
[stdlog] 2024-09-12 00:43:03,093 avocado.test test L0611 DEBUG| Local variables:
[stdlog] 2024-09-12 00:43:03,113 avocado.test test L0614 DEBUG| -> self <class 'htx_block_devices.HtxTest'>: 1-/home/OpTest/avocado-fvt-wrapper/tests/avocado-misc-tests/io/disk/htx_block_devices.py:HtxTest.test_start;run-6197
[stdlog] 2024-09-12 00:43:03,113 avocado.test test L0688 ERROR| Traceback (most recent call last):
[stdlog] 2024-09-12 00:43:03,113 avocado.test test L0688 ERROR| File "/usr/local/lib/python3.9/site-packages/avocado_framework-106.0-py3.9.egg/avocado/core/test.py", line 615, in _run_test
[stdlog] raise details
[stdlog] 2024-09-12 00:43:03,114 avocado.test test L0688 ERROR| File "/usr/local/lib/python3.9/site-packages/avocado_framework-106.0-py3.9.egg/avocado/core/test.py", line 602, in _run_test
[stdlog] testMethod()
[stdlog] 2024-09-12 00:43:03,114 avocado.test test L0688 ERROR| File "/home/OpTest/avocado-fvt-wrapper/tests/avocado-misc-tests/io/disk/htx_block_devices.py", line 166, in test_start
[stdlog] process.run(" ps -C htxd -o pid=|xargs kill -9")
[stdlog] 2024-09-12 00:43:03,114 avocado.test test L0688 ERROR| File "/usr/local/lib/python3.9/site-packages/avocado_framework-106.0-py3.9.egg/avocado/utils/process.py", line 1013, in run
[stdlog] raise CmdError(cmd, sp.result)
[stdlog] 2024-09-12 00:43:03,114 avocado.test test L0688 ERROR| avocado.utils.process.CmdError: Command ' ps -C htxd -o pid=|xargs kill -9' failed.
Test results after the fix
[root@ltcever60-lp5 disk]# avocado run htx_block_devices.py -m htx_block_devices.py.data/htx_block_devices.yaml --max-parallel-tasks=1
JOB ID : e4faab510a4e6085fb036b387e6d6eebaa0a10e8
JOB LOG : /home/OpTest/avocado-fvt-wrapper/results/job-2024-09-12T10.42-e4faab5/job.log
(1/3) htx_block_devices.py:HtxTest.test_start;run-8dbf: STARTED
(1/3) htx_block_devices.py:HtxTest.test_start;run-8dbf: PASS (106.31 s)
(2/3) htx_block_devices.py:HtxTest.test_check;run-8dbf: STARTED
(2/3) htx_block_devices.py:HtxTest.test_check;run-8dbf: PASS (60.08 s)
(3/3) htx_block_devices.py:HtxTest.test_stop;run-8dbf: STARTED
(3/3) htx_block_devices.py:HtxTest.test_stop;run-8dbf: PASS (11.12 s)
RESULTS : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/OpTest/avocado-fvt-wrapper/results/job-2024-09-12T10.42-e4faab5/results.html
JOB TIME : 210.28 s