Commit Graph

227 Commits

Author SHA1 Message Date
Bart Van Assche
9c037ae577 scstadmin: Fix saving groups without LUNs
Reported-by: Aayush Kasurde <aayush.kasurde@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-25 19:43:30 +00:00
Bart Van Assche
7d3686b481 scstadmin: Suppress a Perl warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6134 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-24 14:46:10 +00:00
Bart Van Assche
1d8c5653a1 scstadmin: Correct rem_group and rem_init help text
Signed-off-by: Aayush Kasurde <aayush.kasurde@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6108 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-20 10:37:14 +00:00
Bart Van Assche
dd249ab556 Spelling fix: occured -> occurred
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:35:00 +00:00
Bart Van Assche
7fd9a3af66 scstadmin test 06-cont-on-err.t: Filter out scstadmin version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5794 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 11:44:14 +00:00
Bart Van Assche
31bd7ef3c4 scstadmin: Sync saved configuration files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5793 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 11:42:54 +00:00
Bart Van Assche
369a8fb306 scstadmin: Avoid that the Perl interpreter prints a warning message about using an undefined variable on Fedora systems
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5731 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-26 09:56:54 +00:00
Vladislav Bolkhovitin
523fe73096 Forgotten versions updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-13 05:03:17 +00:00
Bart Van Assche
08c5b47ce0 regression tests: Sort hash keys before comparing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 15:27:48 +00:00
Bart Van Assche
730f2ee268 regression tests: Sync with a recent sysfs change
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5581 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 15:27:06 +00:00
Bart Van Assche
7922cc2dfb scstadmin, regression tests: Follow-up for r5409
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5475 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-24 18:45:23 +00:00
Bart Van Assche
c664dcb277 scstadmin: List keys alphabetically in the -list_sessions output
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-06 20:26:08 +00:00
Bart Van Assche
ef9d1b9001 scstadmin: Restore LUNs in "scstadmin -list_sessions" output
Signed-off-by: Dave Butler <tears.the@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-06 20:13:53 +00:00
Bart Van Assche
a8a71bf610 Spelling fix: initator -> initiator
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 06:56:44 +00:00
Bart Van Assche
1463890112 scstadmin: Use the "install_vendor" method when building an RPM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5132 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-19 17:20:45 +00:00
Bart Van Assche
e3534beba8 scstadmin: Make the regression tests independent of the installation path of iscsi-scstd
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-19 17:14:23 +00:00
Bart Van Assche
136cbaebb9 scstadmin: Eliminate $SCST->{'err_string'}
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5127 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-19 17:00:50 +00:00
Bart Van Assche
3f1e616262 scstadmin: Add a regression test for saving and restoring scst.conf
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5126 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-19 16:59:50 +00:00
Bart Van Assche
22bd9156c7 scstadmin: -cont_on_err bug fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5112 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-14 10:10:37 +00:00
Bart Van Assche
ff73c5cb2e scstadmin: Make -list_ttgt_attr and -set_ttgt_attr work for local target ports
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-13 21:16:37 +00:00
Bart Van Assche
4f31d1cc0e scstadmin: Sort target group names alphabetically
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5105 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-13 21:08:53 +00:00
Bart Van Assche
40908c5d37 scstadmin: Remove duplicate code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5104 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-13 21:07:19 +00:00
Bart Van Assche
573b0e5dcb scstadmin: Avoid complaints about passing an undefined value to chomp()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-13 21:06:46 +00:00
Bart Van Assche
4e6228fbb0 scstadmin: Avoid confusing Emacs' syntax highlighting algorithm
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-24 07:26:35 +00:00
Bart Van Assche
5d8a563648 scstadmin: Reduce the time needed to save or restore a configuration
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5075 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-21 18:36:01 +00:00
Bart Van Assche
ca750d6383 scstadmin: Add more regression tests
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5070 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 16:40:02 +00:00
Bart Van Assche
a02cf2379d scstadmin, SCST.pm, targets(): Return target names sorted alphabetically
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 16:33:05 +00:00
Bart Van Assche
dad81d3ba5 scstadmin: Add a regression test infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5068 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:37:16 +00:00
Bart Van Assche
0298c2ecc3 scstadmin, SCST.pm: Fix checkTargetDynamicAttributes() return code
If no attributes have been passed to this function via the second argument,
only report success if the driver (first argument) exists.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:36:40 +00:00
Bart Van Assche
5ea0cf813f scstadmin, SCST.pm: Make argument checking more strict
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5066 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:30:31 +00:00
Bart Van Assche
00a6eeafe7 scstadmin: Add command-line option -cont_on_err
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5065 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:28:05 +00:00
Bart Van Assche
4b63daed53 scstadmin, SCST.pm: Fix checkDriverDynamicAttributes() return code
If no attributes have been passed to this function via the second argument,
only report success if the driver (first argument) exists.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:14:11 +00:00
Bart Van Assche
9e77adb8b8 scstadmin, SCST.pm: Fix setLunAttribute() error return code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5063 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:10:58 +00:00
Bart Van Assche
bf82499635 scstadmin, SCST.pm: Fix lunExists() return code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5062 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:09:59 +00:00
Bart Van Assche
960759632f scstadmin, SCST.pm: Avoid triggering runtime warnings about strings having the value "undef"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:08:38 +00:00
Bart Van Assche
70a9baa58a scstadmin, SCST.pm: Check the number of arguments passed to subroutines
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:07:47 +00:00
Bart Van Assche
5fc9261fc8 scstadmin, SCST.pm: Remove dead code
_syswrite() either returns a positive number or undef but never -1.
Hence remove code that would only be executed if _syswrite() would
have returned -1.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5059 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:04:59 +00:00
Bart Van Assche
2a93823408 scstadmin: Fix Perl syntax
The Perl operator for comparing strings is "eq" and not "=".


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:04:16 +00:00
Bart Van Assche
117304c1a7 scstadmin: Fix a typo in a diagnostic message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:03:05 +00:00
Bart Van Assche
140c5af41c scstadmin: Set hardware target attributes correctly
For target drivers that support creating targets, e.g. the Emulex
FC driver, it is possible that a target attribute is both writable
for existing (hardware) targets and that it has to be specified
when creating a (virtual) target. Make sure that scstadmin sets
these attributes for existing (hardware) targets when restoring a
configuration.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:02:25 +00:00
Bart Van Assche
813a97afc3 scstadmin: Add infrastructure for building an RPM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 14:32:40 +00:00
Bart Van Assche
6b6bcca4c8 scstadmin: Ensure that the version number can be parsed from inside Makefile.PL
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4988 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-06 06:39:25 +00:00
Bart Van Assche
f94393b43c scstadmin: Enable targets after the ALUA configuration has been restored
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4942 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-08-04 18:16:51 +00:00
Bart Van Assche
2c67878832 scstadmin: Add ALUA attribute support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4941 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-08-04 18:15:28 +00:00
Bart Van Assche
5d6b0142a8 scstadmin: Fix parsing names of multi-valued attributes
When defining e.g. more than ten CHAP users in scst.conf, scstadmin
only saves the first then CHAP users. Make sure that scstadmin saves
all information defined in sysfs.

Reported-by: Artur Piechocki <artur.piechocki@open-e.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4928 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-30 10:49:02 +00:00
Bart Van Assche
dfe644834c scstadmin: Save multi-valued attributes sorted
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4927 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-30 10:41:15 +00:00
Bart Van Assche
21c8cfa9f1 scstadmin: Escape special characters in initiator names in the LUN masking section
Write out e.g. "INITIATOR iqn.1994-05.com.redhat:29a5cc399d\#192.168.11.1"
instead of "INITIATOR iqn.1994-05.com.redhat:29a5cc399d#192.168.11.1" when
generating a config file such that the hash sign is read in properly when
rereading the SCST config file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-01 11:57:19 +00:00
Vladislav Bolkhovitin
84f6cb5dae scst_vdisk: Add support for nullio "dummy" LUNs
While the SCSI specifications require presence of LUN 0 it is not always
desirable to associate storage with LUN 0. Hence allow LUN 0 (or any
other LUN) to be configured such that it does not appear at the
initiator side. This is realized by adding a "dummy" attribute in to
NULLIO vdisk devices. If that attribute is set, the PERIPHERAL QUALIFIER
field in the INQUIRY response is set to 1 and the PERIPHERAL DEVICE TYPE
is set to 0x1f. Add an example in the scst.conf(5) man page that shows
how to use the new attribute.

Signed-off-by: Bart Van Assche <bvanassche@acm.org> with some fixes and simplifications



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4874 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-22 03:48:26 +00:00
Bart Van Assche
f709ef3150 scstadmin: Speed up restoring a configuration about 40% by caching certain /sys/kernel/scst_tgt/ query results
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4833 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-08 07:30:06 +00:00
Bart Van Assche
ab0b9743b4 scstadmin: Do not save duplicate target information in the ALUA sections
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4808 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-20 14:47:17 +00:00