Using scstadmin to reload a configuration with fewer targets can result
in a "Use of uninitialized value in numeric ne" error. Rectify by adding
a check for the undefined value and handling the situation (by disabling
the target in question, unless the driver is copy_manager).
The scstadmin.spec.in file contained a custom Requires line that
generated dependencies based on the full paths of the killall and rm
commands. This approach is unconventional and could cause issues with
dependency resolution.
This patch replaces the custom Requires line with the package names
providing the required commands, namely 'psmisc' for killall and
'coreutils' for rm. This change ensures proper dependency resolution
and adheres to recommended practices for specifying dependencies in
spec files.
Fixes: https://github.com/SCST-project/scst/issues/152
This patch fixes RPM build errors caused by incorrect file paths:
RPM build errors:
File must begin with "/": %{perl_vendorlib}/SCST
File must begin with "/": %{perl_vendorarch}/auto/SCST_SCST
For some reasons, the perl_vendorlib and perl_vendorarch variables may
not be defined by default on newer RHEL systems.
Therefore, assign the variables explicitly to avoid these errors.
Since cluster_mode relies upon the t10_dev_id to generate a namespace, once
cluster_mode is set the t10_dev_id can no longer be changed.
However, because cluster_mode is listed as one of the various add_dev_params,
this meant that it would be set earlier than t10_dev_id when scstadmin
processes scst.conf
Rectify by adding t10_dev_id to fileio_add_dev_params, etc and modifying the
SCST.pm openDevice so that cluster_mode is set last.
Support for the ib_srpt_target_<n> target port names was removed in 2015.
Update the documentation that still uses this target port name format.
Remove all references to the obsolete ib_srpt kernel module parameters
use_port_guid_in_session_name and use_node_guid_in_target_name. Remove
the references from srpt/README to target port name formats that are no
longer supported.
Most targets of this Makefile require a underlying Makefile to be
created before they are called. Otherwise you will get an error like
this:
make -C scst-1.0.0 clean
make[3]: Entering directory '/.../scst/scstadmin/scstadmin.sysfs/scst-1.0.0'
make[3]: *** No rule to make target 'clean'. Stop.
Hence add a target that creates a underlying Makefile and add it as a
dependency for all required targets.
Remove the invocation of the 'which' command since that command has been
deprecated in Debian 11 and since I am not aware of any other portable
approach for querying the path of a command.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since `make_path` is called in pretty much any interaction with sysfs,
speed degradation in it has visible impact when plenty of resources
being managed. So much that it reaches the same great execution time as
calls to filesystem, such as `-d`.
Reported-by: Dyadyushkin Aleksandr <dyadyushkin.a@raidix.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9485 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Validate the $value argument of set functions with defined() instead of
length(). Append a newline to the end of $value before writing it into
a sysfs attribute to make sure something gets written if $value eq "".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9158 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Report "Failed to set a SCST attribute" instead of "SCST attribute specified
is static" if modifying of an attribute fails.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The scstadmin output for the ib_srpt driver depends on whether or not an
RDMA HCA is present and also on the port GUIDs. Hence filter out the
ib_srpt data.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch fixes a bug by making it again possible to use "0" as e.g. the
name of an SCST device group. See also commit 858f50e4d3 ("scstadmin:
Improve robustness").
Reported-by: Pavel Klevtsov
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Around 2011 a sysfs-tree-changes branch was created in the SourceForge
repository because Greg KH asked to rework the SCST sysfs interface. That
interface is called the "new" sysfs interface. The current and only used
API is called the "old" sysfs interface. Since the "new" sysfs interface
never had any users other than myself, remove support for that interface.
See also commit a66cbc4115 ("scstadmin: Add support for the sysfs
interface provided by the code on the sysfs-tree-changes branch").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Also unload SCST kernel modules that have been loaded manually or that are
no longer referenced by /etc/scst.conf.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Fix the following failure:
# scstadmin -resync_dev volume01
Collecting current configuration: done.
-> Making requested changes.
-> WARNING: Device 'volume01' lacks the settable attribute 'resync_size', ignoring.
-> Done.
All done.
This patch fixes a regression that was introduced by r8171 (commit
aedcfc5997 ("scstadmin: Avoid that Perl complains about undefined values
for write-only attributes") # v3.4.
Reported-by: Marc Smith <msmith626@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Instead of only interpreting the empty string as "no argument passed", also
consider 'undef' as "no argument passed".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8905 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Make sure that the qla2xxx_scst kernel module is reloaded after an upgrade
of SCST.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8161 d57e44dd-8a1f-0410-8b47-8ef2f437770f