530 Commits

Author SHA1 Message Date
Brian M
1e94a45bd3 scstadmin/init.d: unload qla2x00tgt before qla2xxx_scst
qla2x00tgt holds a reference on qla2xxx_scst, so it must be unloaded
first.  The wrong order caused a 30-second timeout on every shutdown.
2026-03-02 10:11:36 +03:00
Gleb Chesnokov
a2add2daa3 scstadmin.spec: Drop legacy symlink check in RPM %files
The symlink-based %files conditional was added when scstadmin supported
a procfs variant. Procfs support is legacy now, so drop the conditional
and always package the man pages.
2025-12-31 14:55:44 +03:00
Gleb Chesnokov
b2a1f6e66a Bump the version number to 3.11.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 11 0 -pre
2025-12-29 13:06:44 +03:00
Gleb Chesnokov
d4cb03e2b8 Bump the version number to 3.10.0
These changes have been generated by running the following command:

$ scripts/update-version 3 10 0
2025-12-29 12:40:21 +03:00
Gleb Chesnokov
2df209ea5f scstadmin: Fix precedence typo in error propagation
Fix Perl precedence warnings:

  Possible precedence problem between ! and numeric gt (>) at SCST.pm line 980.
  Possible precedence problem between ! and numeric gt (>) at SCST.pm line 1223.
  Possible precedence problem between ! and numeric gt (>) at SCST.pm line 3847.
2025-11-05 11:41:41 +03:00
Gleb Chesnokov
492b6ccbea scstadmin.spec: Install unit into %{_unitdir} and package it
Fixes: https://github.com/SCST-project/scst/issues/323
2025-11-05 11:41:41 +03:00
Brian M
0d3c9018af debian, scstadmin: Add systemd scst.service
Add systemd service file when packaging for Debian.  Current
systemd will automatically generate one, but this functionality
will be removed in a future version of systemd.
2025-10-28 18:15:04 +03:00
Gleb Chesnokov
314659ed7c scstadmin: Normalize SCST version parsing in SCST.pm
scstadmin's version check assumed scstVersion() returns a bare "X.Y.Z".
After changing the sysfs attribute it may return strings like
"SCST version: 3.10.0-pre", which triggered a numeric warning and a
false failure:

  Argument "SCST version: 3" isn't numeric in numeric gt (...)

Parse the version number from the raw string and ignore any
prefix/suffix. If no version can be parsed, keep the existing
failure path.

Fixes: https://github.com/SCST-project/scst/issues/296
2025-08-18 11:45:57 +03:00
Christoph Böhmwalder
3aad61d2fd iscsi-scst: use /run instead of /var/run
When attempting to manage iscsi-scstd using a systemd service file,
systemd warns:

PIDFile= references a path below legacy directory /var/run/, [...]

Change the pidfile path to be under /run instead.

/run has been in use as a replacement for /var/run for many years now
(the original Debian proposal is from 2011). Most distributions symlink
/var/run to /run, which means that this change should not have any
adverse side effects for the vast majority of users.
2025-06-26 15:11:58 +03:00
Gleb Chesnokov
6782003bfc scst: Extend build metadata passed to the SCST
Previously, only the revision string was passed from the build system
into the SCST kernel module. This patch extends that by passing additional
build metadata: kernel version, build date, Git commit hash, build number,
and architecture type.

These values are now consistently exposed in the kernel log, sysfs,
and via modinfo, providing a unified and reliable way to identify the
exact build in use.
2025-05-16 16:37:43 +03:00
Gleb Chesnokov
c934aee1a8 Makefile, specs: Honour %{_sbindir} for helper tools
Fedora 42 maps %{_sbindir} to /usr/bin. Export SBINDIR=%{_sbindir} in
the spec files and let the iscsi-scst/scstadmin Makefiles honour that
variable.

Fixes "File not found: .../iscsi-scst-adm" on unified-/usr systems while
keeping older distros unchanged.
2025-04-18 18:54:20 +03:00
Gleb Chesnokov
2bdc19a61f Bump the version number to 3.10.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 10 0 -pre
2024-12-28 17:14:54 +03:00
Gleb Chesnokov
a68cb8e94d Bump the version number to 3.9.0
These changes have been generated by running the following command:

$ scripts/update-version 3 9 0
2024-12-28 16:44:09 +03:00
m.chernobrov
297034d884 scstadmin: Fix scstadmin -list_sessions error msg in out cmd
In out of "scstadmin -list_sessions" cmd occurs error
"Use of uninitialized value in numeric lt (<) at
/usr/local/sbin/scstadmin line 3679".
2024-11-27 11:33:20 +03:00
Brian Meagher
f4f8da8b4d scstadmin: Eliminate use of uninitialized value in numeric error
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).
2024-01-30 10:55:25 +03:00
Gleb Chesnokov
188256792c Bump the version number to 3.9.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 9 0 -pre
2024-01-15 15:33:45 +03:00
Gleb Chesnokov
1171841931 Bump the version number to 3.8.0
These changes have been generated by running the following command:

$ scripts/update-version 3 8 0
2024-01-15 13:59:19 +03:00
Gleb Chesnokov
e2a6774a2e scstadmin.spec: Replace custom Requires line with package names
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
2023-06-05 13:36:46 +03:00
Gleb Chesnokov
bef30fd6d0 scstadmin.spec: Fix RPM build errors
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.
2023-04-24 17:53:34 +03:00
Brian Meagher
da4f7c6612 scst_vdisk, scstadmin: Allow t10_dev_id to be stored before cluster_mode
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.
2023-03-20 13:05:12 +03:00
Gleb Chesnokov
7b0a2f8e69 Makefile, scstadmin/Makefile: Use git sha1 as the SCST revision
git sha1 is a more convenient way to generate a revision than the number
of commits. Also, remove svn repository support.
2023-01-10 13:52:51 +03:00
Gleb Chesnokov
b78582f34d Bump the version number to 3.8.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 8 0 -pre
2022-12-28 17:08:44 +03:00
Gleb Chesnokov
1ef10b852d Bump the version number to 3.7.0
These changes have been generated by running the following command:

$ scripts/update-version 3 7 0
2022-12-27 16:47:20 +03:00
Bart Van Assche
4b7b3e2c58 ib_srpt: Remove obsolete parameters and update documentation
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.
2022-07-27 20:14:23 -07:00
Gleb Chesnokov
f06a86e4aa scstadmin/scstadmin.sysfs/Makefile: Add makefile target
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.
2022-07-12 19:34:18 +03:00
Chesnokov Gleb
64a8485fe7 Bump the version number to 3.7.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 7 0-pre
2022-01-11 16:37:34 +03:00
Bart Van Assche
9c5406664a Bump the version number to 3.6.0
These changes have been generated by running the following command:

$ scripts/update-version 3 6 0
2021-12-29 19:19:14 -08:00
Bart Van Assche
8042466117 scstadmin/init.d/scst: Remove the 'which' invocation
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
2021-08-27 17:56:28 +00:00
Bart Van Assche
a4b3805d11 scstadmin: Improve performance of make_path()
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
2021-07-12 03:45:32 +00:00
Bart Van Assche
05afc999f1 scstadmin: Fix a bug in the code for forcibly applying a configuration
Pass the -force option from ... to removeGroup().

Signed-off-by: YuFan Chen <wiz.chen@gmail.com>
[ bvanassche: added commit message ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9440 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-18 04:45:40 +00:00
Bart Van Assche
c0151f6cda Bump the version number to 3.6.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-02 23:16:59 +00:00
Bart Van Assche
21ea12d0de scstadmin: Fix the release-archive Makefile target
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9237 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:50:48 +00:00
Bart Van Assche
d3c92ea7aa Bump the version number to 3.5.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 03:38:21 +00:00
Bart Van Assche
2fb10fb2ff scstadmin: Restore support for replacing LUNs that are inside a group
Fixes: a3266ca8f2 ("scstadmin: Remove support for the "new" sysfs interface")
Reported-by: Pavel Klevtsov


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-14 03:31:59 +00:00
Bart Van Assche
443c7ec5d9 scstadmin: Make argument checking more systematic
Additionally, suppress warning messages about 'length(undefined)' on RHEL 6.x.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:47:40 +00:00
Bart Van Assche
4023bdadbd scstadmin: Fix a Perl warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9159 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 18:00:55 +00:00
Bart Van Assche
6d60231631 scstadmin: Support passing an empty string to set*Attribute()
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
2020-09-14 01:56:26 +00:00
Bart Van Assche
7e3fe7a80e scstadmin: Fix the readOnly() subroutine
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:54:26 +00:00
Bart Van Assche
c121a6ded8 scstadmin: Adjust source code formatting
Remove a single space that follows a unary negation operator.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:53:27 +00:00
Bart Van Assche
7e012f4a80 scstadmin: Improve error reporting
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
2020-09-13 23:29:44 +00:00
Bart Van Assche
3825bf2093 scstadmin Makefile: Show diff if a regression test fails
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 22:42:19 +00:00
Bart Van Assche
95993cd9fd scstadmin/scstadmin.sysfs/scst-1.0.0/t/07-scstadmin-args.t: Filter out ib_srpt
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
2020-09-13 22:16:05 +00:00
Bart Van Assche
8d3c1cf3a2 scstadmin: Use length($var) to test whether an argument has been specified
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
2020-09-13 03:20:47 +00:00
Bart Van Assche
a3266ca8f2 scstadmin: Remove support for the "new" sysfs interface
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
2020-09-13 03:12:26 +00:00
Bart Van Assche
c7788ee7ac /etc/init.d/scst: Unload target modules first
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9046 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-12 23:31:34 +00:00
Bart Van Assche
2239719d8e /etc/init.d/scst: Really unload all SCST kernel modules
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 16:49:19 +00:00
Bart Van Assche
00765d8ae2 /etc/init.d/scst: Unload all SCST kernel modules
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
2020-05-23 16:30:42 +00:00
Bart Van Assche
9be823075d /etc/init.d/scst: Fix a shellcheck warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 16:18:13 +00:00
Bart Van Assche
8276dc53d3 scstadmin: Make scstadmin again compatible with older Perl interpreters
Fix the following Perl v5.10.1 warnings:

Ambiguous use of -ENOENT resolved as -&ENOENT() at /usr/local/share/perl5/SCST/SCST.pm line ...

According to https://stackoverflow.com/questions/23215511/ambiguous-use-of-constant-resolved-as-constant
that message indicates a bug in the Perl interpreter.

Reported-by: Gilbert Standen <gilstanden@hotmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8928 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-17 16:43:13 +00:00
Bart Van Assche
d12b0a0d91 Fix spelling in documentation and source code
See also https://github.com/bvanassche/scst/pull/20.

[ bvanassche: left out qla2x00t-32gbit changes and changed patch description ]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8920 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-15 18:53:48 +00:00