|
From: Matteo T. <ma...@RM...> - 2011-07-20 18:46:47
|
No, a manual clear_config does not reproduce the issue.
here is waht happens:
[root@nas1 trunk]# sh -x /etc/init.d/scst start
+ '[' -e /lib/lsb/init-functions ']'
+ . /lib/lsb/init-functions
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin
+ SCST_CFG=/etc/scst.conf
+ SCST_DFLT=/etc/default/scst
++ which scstadmin
+ '[' -x /usr/sbin/scstadmin ']'
+ '[' -f /etc/default/scst ']'
+ . /etc/default/scst
+ case "$1" in
+ echo -n 'Loading and configuring SCST'
Loading and configuring SCST+ '[' -e /sys/module/scst -a -e /sys/module/scst/refcnt ']'
+ parse_scst_conf
+ '[' '!' -e /etc/scst.conf ']'
+ local 'nonblanks=[^ ]\{1,\}'
+ local 'blanks=[ ]\{1,\}'
++ sed -n -e 's/^HANDLER[ ]\{1,\}\([^ ]\{1,\}\)[ ]\{1,\}{$/\1/p' -e 's/^\[HANDLER[ ]\{1,\}\([^ ]\{1,\}\)\]$/\1/p' /etc/scst.conf
++ read h
++ sort -u
++ case "$h" in
++ echo scst_vdisk
++ read h
++ sed -n 's/^TARGET_DRIVER[ ]\{1,\}\([^ ]\{1,\}\)[ ]\{1,\}{$/\1/p' /etc/scst.conf
++ read d
++ sort -u
++ case "$d" in
++ echo iscsi_scst
++ read d
+ SCST_MODULES='scst scst_vdisk iscsi_scst '
+ using_iscsi
+ for m in '$SCST_MODULES'
+ '[' scst = iscsi_scst ']'
+ for m in '$SCST_MODULES'
+ '[' scst_vdisk = iscsi_scst ']'
+ for m in '$SCST_MODULES'
+ '[' iscsi_scst = iscsi_scst ']'
+ return 0
+ case "`uname -m`" in
++ uname -m
+ SCST_OPT_MODULES='crc32c-intel '
+ SCST_OPT_MODULES='crc32c crc32c-intel '
+ SCST_DAEMONS='/usr/local/sbin/iscsi-scstd '
+ for m in '$SCST_OPT_MODULES'
+ modprobe crc32c
+ for m in '$SCST_OPT_MODULES'
+ modprobe crc32c-intel
+ for m in '$SCST_MODULES'
++ set
++ sed -n -e 's/^scst_parameters='\''\(.*\)'\''$/\1/p' -e 's/^scst_parameters=\(.*\)$/\1/p'
+ module_params=
+ '[' '!' -e /sys/module/scst ']'
+ modprobe scst
+ for m in '$SCST_MODULES'
++ set
++ sed -n -e 's/^scst_vdisk_parameters='\''\(.*\)'\''$/\1/p' -e 's/^scst_vdisk_parameters=\(.*\)$/\1/p'
+ module_params=
+ '[' '!' -e /sys/module/scst_vdisk ']'
+ modprobe scst_vdisk
+ for m in '$SCST_MODULES'
++ set
++ sed -n -e 's/^iscsi_scst_parameters='\''\(.*\)'\''$/\1/p' -e 's/^iscsi_scst_parameters=\(.*\)$/\1/p'
+ module_params=
+ '[' '!' -e /sys/module/iscsi_scst ']'
+ modprobe iscsi_scst
+ for d in '$SCST_DAEMONS'
+ start_daemon /usr/local/sbin/iscsi-scstd
+ /etc/redhat-lsb/lsb_start_daemon /usr/local/sbin/iscsi-scstd
+ '[' -f /etc/scst.conf ']'
+ echo y
+ scstadmin -clear_config -force
+ tmpout=/tmp/scstadmin-output-13631
+ scstadmin -config /etc/scst.conf
+ log_failure_msg
+ /etc/redhat-lsb/lsb_log_message failure
[FAILED]
+ cat /tmp/scstadmin-output-13631
Collecting current configuration..
groups(, )
Trace begun at /usr/lib/perl5/site_perl/5.8.8/SCST/SCST.pm line 437
SCST::SCST::groups('SCST::SCST=HASH(0x966830)') called at /usr/sbin/scstadmin line 448
main::readWorkingConfig at /usr/sbin/scstadmin line 331
main::main at /usr/sbin/scstadmin line 159
FATAL: Received the following error:
groups(): Driver '' is not available
+ rm -f /tmp/scstadmin-output-13631
+ exit 1
[root@nas1 trunk]#
--
matteo
----- Messaggio originale -----
Da: "Mark Buechler" <mar...@gm...>
A: "Matteo Tescione" <ma...@rm...>, "scst-devel" <scs...@li...>
Inviato: Mercoledì, 20 luglio 2011 20:14:58
Oggetto: Re: [Scst-devel] [PATCH] Unify the three SCST init scripts
Hi
On Wed, Jul 20, 2011 at 11:08 AM, Matteo Tescione < ma...@rm... > wrote:
Mark,
./ib_srpt_target_0
./ib_srpt_target_0/enabled
./ib_srpt_target_0/sessions
./ib_srpt_target_0/luns
./ib_srpt_target_0/luns/mgmt
./ib_srpt_target_0/ini_groups
./ib_srpt_target_0/ini_groups/mgmt
./ib_srpt_target_0/rel_tgt_id
./ib_srpt_target_0/comment
./ib_srpt_target_0/addr_method
./ib_srpt_target_0/io_grouping_type
./ib_srpt_target_0/cpu_mask
./ib_srpt_target_0/login_info
Please consider that the new initd script fails with or without srpt target.
Executing sh -x, we found that the parser is correctly loading the appropriate modules, in this case scst, scst_vdisk, iscsi_scst and ib_srpt, but the scstadmin -config /etc/scst.conf fails with that error.
Please consider too that manual modprobe scst, modprobe scst_vdisk, modprobe iscsi_scst, modprobe ib_srpt, daemon iscsi_scstd and scstadmin -config /etc/scst.conf works just fine.
Many thanks,
--
Ok, let me make sure I have this correct. The problem line is the clear_config line, correct? So, if you manually modprobe and scstadmin -config, what happens when you manually -clear_config?
- Mark.
|