| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fix a ton of speelling errors
|
|
|
|
|
|
| |
While CTL has concept of port options, used at least for iSCSI ports now,
before this change it was impossible to set them manually. There still
no user-configurable port options now, but I am planning to change that.
|
| |
|
|
|
|
| |
Relnotes: yes
|
| |
|
| |
|
|
|
|
| |
They are going to be useful in clustered setups.
|
|
|
|
| |
Not all changes take effect, but that is a different question.
|
|
|
|
|
|
| |
Fix typo.
Sponsored by: iXsystems
|
|
|
|
| |
That is not really an error for the main process.
|
|
|
|
|
|
|
|
|
|
| |
Fix thinko/copypaste error.
When checking the length of the mutual secret password the variable for
the secret password was used by mistake. This resulted in ctld never
warning about the length of the mutual secret being wrong even if it was.
Sponsored by: iXsystems
|
|
|
|
| |
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces new target option "port", that assigns current target
to specified CTL port. On config application ctld(8) will apply LUN mapping
according to target configuration to specified port and bring the port up.
On shutdown cltd(8) will remove the mapping and put the port down.
This change allows to configure both iSCSI and FibreChannel targets in the
same configuration file in alike way.
Kernel side support was added earlier at r278037.
Relnotes: yes
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
|
|
|
| |
This change allows multiple "portal-group" options to be specified per
target. Each of them may include new optional auth-group name parameter
to override per-target auth parameters for specific portal group.
Kernel side support was added earlier at r278161.
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
| |
While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports. By default all ports are created without LUN mapping, exposing all
CTL LUNs as before. But, if needed, LUN mapping can be manually set on
per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.
Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition. LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed. It
allows same LUN to be exposed several times via multiple targets.
While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.
Relnotes: yes
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
|
|
|
| |
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.
This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.
|
|
|
|
|
|
|
|
|
| |
In conf_apply() remove iSCSI ports from kernel before removing LUNs.
Previous order confused initiators with messages about "removed" LUNs
during simple ctld restart without any real config change. After this
commit initiators only reestablish lost connection, receive "Power on
occurred" UNIT ATTENTION status and continue normal operation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing error checking for kernel_port_{add,remove}(). Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.
MFC r275399:
Fix null pointer dereference.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
| |
This fixes problem with ctld reload when it is configured to listen on two
portals with same IP, but different ports.
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for sending redirections to iSCSI target.
MFC r274309:
Fix several nits in redirection handling - don't use wrong CSG,
and avoid use-after-free.
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
| |
Simplify code; no functional changes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Add discovery-filter. This makes it possible to restrict which targets
are returned during discovery based on initiator portal, name, and CHAP
credentials.
|
|
|
|
|
|
| |
Make the initiator-name and initiator-portal checks a little nicer.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
This makes ctld(8) register its iSCSI targets and portals on configured
iSNS servers to allow initiators find them without active discovery.
Fetching of allowed initiators from iSNS is not implemented now, so target
ACLs still should be configured manually.
Relnotes: Yes
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
| |
Fix ctld(8) to not show the "auth-group <name> not assigned to any target"
warning for auth-groups assigned to a portal-group.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Whitespace fixes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
on configuration reload also if that size was not specified in the new
configuration.
Previously it happened only if size was explicitly changed in config.
Approved by: re (delphij)
|
|
|
|
|
|
|
| |
Avoid ctld(8) crash on getaddrinfo(3) failure.
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Turn two errors, which are possible to trigger only by bugs,
into assertions.
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Make the iSCSI stack use __FBSDID() properly.
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Add netmasks support to initiator-portal option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create separate CTL port for every iSCSI target (and maybe portal group).
Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.
This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL. When new target is defined in config fine, ctld will
create respective port in CTL. When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.
As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.
|
|
|
|
|
|
| |
English.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
If we fail to create LUN, try again on next configuration reload.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Use consistent punctuation.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Constify.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Properly pass the initiator address when running in proxy mode.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Use socket address from accept(2) instead of retrieving it via
getpeername(2).
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework the way we enable CTL iSCSI port. Previously conf_apply()
needed it to be already enabled, because listening in proxy mode
requires it; however, it's conf_apply() that opens pidfiles,
so it resulted in port being enabled before pidfile was opened.
This was not so bad, but it was also disabled when pidfile couldn't
be opened due to ctld already running; this means that starting
second ctld instance screwed up the first.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Properly identify target portal when running in proxy mode. While here,
remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Make it possible for the iSCSI target side to operate in both normal
and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually
works again.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Stop treating LUN 0 as mandatory. There is no reason to do that.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).
This makes those short-lived ctld(8) zombies disappear.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it. From now on, assigning auth-group to a target is no longer
mandatory.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Add auth-type.
Sponsored by: The FreeBSD Foundation
|