]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Use pgrep radosgw to determine if rados gateway is running.
authorWarren Usui <warren.usui@inktank.com>
Sat, 1 Mar 2014 05:43:31 +0000 (21:43 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 11 Mar 2014 03:40:52 +0000 (20:40 -0700)
Fixes: 7528
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Warren Usui <warren.usui@inktank.com>
(cherry picked from commit 5b88856cd25a13842fa8ad0699b84fbdfbc13694)

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;