Whamcloud - gitweb
LU-6234 util: check fsname and pool name 42/13742/15
authorBobi Jam <bobijam.xu@intel.com>
Thu, 12 Feb 2015 03:58:26 +0000 (11:58 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 18 Aug 2015 11:32:19 +0000 (11:32 +0000)
commit7c25eb1ba2b1db3009a0e88b3ecf229134f8ac92
tree702a05f401f7bde85dc46fc6ff44e22d487666aa
parentf17796cf08df5004fa68b9b4a9b0e221559389dc
LU-6234 util: check fsname and pool name

The pool name length check should not include its fsname. This patch
get rid of the possibly added fsname in the pool name argument.

Check lustre filesystem name (fsname) in mkfs.lustre, it can only
contains alphabetic, digital char and '_'/'-'.

Check pool name in lctl/lfs, its character also abides by the
constraint of the fsname.

Add test cases to check the pool names for length, with and without
a filesystem name prefix, and with invalid names.

Also fix pool_add in the test-framework so that it greps for the
poolname plus the filesystem name, so it doesn't match more lines than
necessary.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I4f542e1bc7b3ea97b35ec60e51aa971e73da91eb
Reviewed-on: http://review.whamcloud.com/13742
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_param.h
lustre/tests/ost-pools.sh
lustre/tests/test-framework.sh
lustre/utils/lfs.c
lustre/utils/mkfs_lustre.c
lustre/utils/obd.c