]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Use pgrep radosgw to determine if rados gateway is running. 1333/head
authorWarren Usui <warren.usui@inktank.com>
Sat, 1 Mar 2014 05:43:31 +0000 (21:43 -0800)
committerWarren Usui <warren.usui@inktank.com>
Sat, 1 Mar 2014 05:43:31 +0000 (21:43 -0800)
Fixes: 7528
Signed-off-by: Warren Usui <warren.usui@inktank.com>
qa/workunits/rgw/s3_multipart_upload.pl
qa/workunits/rgw/s3_user_quota.pl

index 2566688e9b5c4e8748b1a14659cc9fadfc1dea23..681ea25c1fb451ad0048f521f24e1f6241c35b66 100755 (executable)
@@ -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;
index ff0798b36a0673f1c00fe7f8185f5140c4f25314..2a72ecc8ec43f9c9cf31e5f9b1ea11bc95139388 100755 (executable)
@@ -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;