mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-22 04:50:23 +00:00
e2e: use pstree
instead of ps
for checking rbd-nbd process
The CentOS Stream 8 base container image does not have `ps` installed. This causes CI jobs to fail, when checking for a restarted rbd-nbd process. Instead of using `ps`, the `pstree` command can be used. This will add some ASCII-tree symbols in front of the command that is logged by the e2e tests, but that is only used for manual reviewing and does not harm the running test. Fixes: #2850 Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
13f1611396
commit
693aabbe1e
@ -1265,11 +1265,11 @@ var _ = Describe("RBD", func() {
|
||||
var runningAttachCmd string
|
||||
runningAttachCmd, stdErr, err = execCommandInContainer(
|
||||
f,
|
||||
"ps -eo 'cmd' | grep [r]bd-nbd",
|
||||
"pstree --arguments | grep [r]bd-nbd",
|
||||
cephCSINamespace,
|
||||
"csi-rbdplugin",
|
||||
&opt)
|
||||
// if the rbd-nbd process is not running the ps | grep command
|
||||
// if the rbd-nbd process is not running the 'grep' command
|
||||
// will return with exit code 1
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "command terminated with exit code 1") {
|
||||
|
Loading…
Reference in New Issue
Block a user