From 5b88856cd25a13842fa8ad0699b84fbdfbc13694 Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Fri, 28 Feb 2014 21:43:31 -0800 Subject: [PATCH] Use pgrep radosgw to determine if rados gateway is running. Fixes: 7528 Signed-off-by: Warren Usui --- qa/workunits/rgw/s3_multipart_upload.pl | 4 ++-- qa/workunits/rgw/s3_user_quota.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/workunits/rgw/s3_multipart_upload.pl b/qa/workunits/rgw/s3_multipart_upload.pl index 2566688e9b5..681ea25c1fb 100755 --- a/qa/workunits/rgw/s3_multipart_upload.pl +++ b/qa/workunits/rgw/s3_multipart_upload.pl @@ -75,9 +75,9 @@ sub get_timestamp { # Function to check if radosgw is already running sub get_status { my $service = "radosgw"; - my $cmd = "ps -ef | grep $service | grep -v grep"; + my $cmd = "pgrep $service"; my $status = get_cmd_op($cmd); - if ($status =~ m/client.radosgw/ ){ + if ($status =~ /\d+/ ){ return 0; } return 1; diff --git a/qa/workunits/rgw/s3_user_quota.pl b/qa/workunits/rgw/s3_user_quota.pl index ff0798b36a0..2a72ecc8ec4 100755 --- a/qa/workunits/rgw/s3_user_quota.pl +++ b/qa/workunits/rgw/s3_user_quota.pl @@ -78,9 +78,9 @@ sub get_timestamp { # Function to check if radosgw is already running sub get_status { my $service = "radosgw"; - my $cmd = "ps -ef | grep $service | grep -v grep"; + my $cmd = "pgrep $service"; my $status = get_cmd_op($cmd); - if ($status =~ m/client.radosgw/ ){ + if ($status =~ /\d+/ ){ return 0; } return 1;