mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 23:00:19 +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>
(cherry picked from commit 693aabbe1e
)
This commit is contained in:
parent
014ab47a57
commit
f0db85daa9
@ -1266,11 +1266,11 @@ var _ = Describe("RBD", func() {
|
|||||||
var runningAttachCmd string
|
var runningAttachCmd string
|
||||||
runningAttachCmd, stdErr, err = execCommandInContainer(
|
runningAttachCmd, stdErr, err = execCommandInContainer(
|
||||||
f,
|
f,
|
||||||
"ps -eo 'cmd' | grep [r]bd-nbd",
|
"pstree --arguments | grep [r]bd-nbd",
|
||||||
cephCSINamespace,
|
cephCSINamespace,
|
||||||
"csi-rbdplugin",
|
"csi-rbdplugin",
|
||||||
&opt)
|
&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
|
// will return with exit code 1
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if strings.Contains(err.Error(), "command terminated with exit code 1") {
|
if strings.Contains(err.Error(), "command terminated with exit code 1") {
|
||||||
|
Loading…
Reference in New Issue
Block a user