From: Warren Usui Date: Sat, 1 Mar 2014 05:43:31 +0000 (-0800) Subject: Use pgrep radosgw to determine if rados gateway is running. X-Git-Tag: v0.79~187^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1333%2Fhead;p=ceph.git Use pgrep radosgw to determine if rados gateway is running. Fixes: 7528 Signed-off-by: Warren Usui --- diff --git a/qa/workunits/rgw/s3_multipart_upload.pl b/qa/workunits/rgw/s3_multipart_upload.pl index 2566688e9b5c..681ea25c1fb4 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 ff0798b36a06..2a72ecc8ec43 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;