Whamcloud - gitweb
LU-6937 test: use ps in get_agent_uuid() 93/20093/2
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 10 May 2016 14:36:42 +0000 (09:36 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 May 2016 02:47:36 +0000 (02:47 +0000)
Use 'ps -C $HSMTOOL_BASE -o args=' rather than 'pgrep -fl
$HSMTOOL_BASE' to get the copytool command line.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idb1238966de1a8bea5d5c225632936d8c0a88529
Reviewed-on: http://review.whamcloud.com/20093
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index 6c7b890..014bf41 100755 (executable)
@@ -3620,8 +3620,8 @@ get_agent_uuid() {
 
        # Lustre mount-point is mandatory and last parameter on
        # copytool cmd-line.
-       local mntpnt=$(do_rpc_nodes $agent pgrep -fl $HSMTOOL_BASE |
-                      grep -v pgrep | awk '{print $NF}')
+       local mntpnt=$(do_rpc_nodes $agent ps -C $HSMTOOL_BASE -o args= |
+                      awk '{print $NF}')
        [ -n "$mntpnt" ] || error "Found no Agent or with no mount-point "\
                                  "parameter"
        do_rpc_nodes $agent get_client_uuid $mntpnt | cut -d' ' -f2