Whamcloud - gitweb
LU-7179 scripts: init and ha script fixes 72/16472/4
authorOlaf Faaland <faaland1@llnl.gov>
Thu, 17 Sep 2015 19:10:50 +0000 (12:10 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 6 Oct 2015 01:57:14 +0000 (01:57 +0000)
commit443826218f0e19777dc93efc7064da2bb0eaa456
treef43f379dbea6df4bf01f3f888da0a0a699d7b967
parent978458e05db4cad21e3ee32384168f53fd3e2d72
LU-7179 scripts: init and ha script fixes

1) Because of a typo, Lustre.ha_v2 currently continues running after
determining that a bad resource-name has been provided by the user.

This commit fixes that typo so that die() is called when
the target-name is bad.

2) When a target is in recovery, lustre/scripts/lustre produces
improper output when run as follows, and a relevant target is in
recovery:

/etc/init.d/lustre status
/etc/init.d/lustre status local
/etc/init.d/lustre status foreign

A grep command in health_check() expects variables to contain the path
to /proc files containing recovery status, but these variables'
contents were altered in a prior commit.

e3ddff LU-5030 utils: fix hard-coded /proc/fs/lustre in scripts

This commit fixes health_check() to correctly report recovery by
obtaining recovery status via lctl and checking that with grep.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: I25b8c0d82b637cf9d40feace7d8b964ffcd34251
Reviewed-on: http://review.whamcloud.com/16472
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/scripts/Lustre.ha_v2
lustre/scripts/lustre