SCST iSCSI Gateway¶
The SCST iSCSI gateway provides shared disks that support SCSI-3 PRs. Windows guests use these disks to build WSFC clusters on StarlingX.
The gateway is included in a patch release as an extension to the Rook Ceph application. By default, the gateway is disabled and must be configured through Helm overrides.
To understand the design, start with Gateway Overview.
To set it up, see Prerequisites to Enable the Gateway and Enable and Configure the Gateway.
To let Windows guests on other subnets connect, see Provide Network Access to the Portal.
To plan for a controller swact or failure, see Understand Failover Behavior.
To install the patch release, see Apply the Patch Release. To undo it, see Remove the Patch Release.
Gateway Overview¶
WSFC uses SCSI-3 Persistent Reservations to decide which cluster node owns a shared disk. Ceph RBD volumes presented directly to a guest do not provide this capability, and WSFC disk validation fails without it.
The gateway presents Ceph RBD images as iSCSI LUNs from a target that implements persistent reservations. The Windows guests connect to it with the Windows iSCSI initiator that is built into the guest operating system. The hypervisor takes no part in the reservation path.
Component |
Description |
|---|---|
SCST kernel modules |
The |
Gateway pod |
The |
Device plugin |
A DaemonSet on the control-plane nodes exposes the SCST control
device, |
Disk storage |
Each LUN is one Ceph RBD image in the |
Reservation state |
Persistent reservation registrations are saved under
|
Portal address |
The gateway listens on TCP port 3260 at the cluster-host floating address. The address moves with the active controller. |
Placement |
A SM service named |
Only one gateway runs at a time. The Ceph exclusive lock on each image keeps a second controller from writing to a LUN that is in use.
Configuration |
Support |
|---|---|
AIO-DX |
Supported. |
Standard |
Supported. The gateway runs on a controller. |
AIO-SX |
Supported, with no controller failover. There is no second controller to move to, so the gateway is unavailable while the controller is down. The pod is restarted if it fails. |
The access controls are as follows.
Initiator access is controlled by groups. Each group lists the IQNs of the initiators that may connect and the LUN IDs that those initiators can see. Several WSFC clusters can share one gateway, each in its own group, and a cluster sees only its own disks.
Authentication with one-way CHAP is optional. The credentials are held in a Kubernetes Secret and are not written to the chart configuration.
Network access to port 3260 is limited to the networks that you list. See Provide Network Access to the Portal.
Auditing: iSCSI logins, logouts, initiator names, and authentication failures are written to the gateway log.
Prerequisites to Enable the Gateway¶
Before you enable the gateway, confirm the following.
The patch release that delivers the gateway is applied to both controllers. See Apply the Patch Release.
The system is AIO-DX, Standard, or AIO-SX.
The Rook Ceph application is applied, and the
ceph-rookstorage backend provides theblockservice. See Install Rook Ceph.The
rook-ceph-provisionerchart is enabled. It creates thekube-rbdclient and theceph-pool-kube-rbdSecret that the gateway uses.The NFD application is applied. The Rook Ceph application checks the loaded kernel modules that NFD reports.
The SCST kernel modules are loaded on each controller.
~(keystone_admin)]$ lsmod | grep -E '^(scst|scst_vdisk|iscsi_scst) ' ~(keystone_admin)]$ ssh controller-1 lsmod | grep -E '^(scst|scst_vdisk|iscsi_scst) '
Each command must list all three modules. On AIO-SX, run the first command only.
You know the name and size of each LUN, the IQN of each Windows initiator that may connect and the LUNs it may see, and the subnets that the Windows guests connect from.
The apply of the Rook Ceph application fails with a message that names the missing item if the chart is enabled and one of the following is true.
The NFD application is not applied.
An SCST module is not loaded on a controller. NFD can take up to an hour to report a module that was loaded after NFD started. A module that is loaded at boot is reported when NFD starts.
The
blockservice is not provided, or therook-ceph-provisionerchart is disabled.The overrides set
ceph.pool.name,ceph.user,ceph.keyringSecret, orceph.keyringSecretKeyto anything other than the platform values.
Enable and Configure the Gateway¶
Create an override file, for example
scst-gateway-overrides.yaml.enabled: true luns: - name: lun01 rbdImage: wsfc-lun01 lunId: 0 sizeGiB: 50 - name: lun02 rbdImage: wsfc-lun02 lunId: 1 sizeGiB: 100 iscsi: targetIQN: "iqn.2026-01.com.example:scst-gateway" groups: - name: wsfc-cluster-1 initiatorACLs: - iqn.1991-05.com.microsoft:wsfc-node-a - iqn.1991-05.com.microsoft:wsfc-node-b luns: [0, 1] networkPolicy: initiatorSubnets: - 172.16.10.0/24 - fd00:172:16:10::/64
Each group lists the initiators that may connect and the LUN IDs that they can see. Add one group for each WSFC cluster. At least one LUN is required. For all overrides and their limits, see Override Parameters Reference.
Optional: Enable CHAP authentication.
Create a Secret in the
rook-cephnamespace with the user name and password. The password must have at least 12 characters. Neither value can contain white space or double quotes.~(keystone_admin)]$ kubectl -n rook-ceph create secret generic scst-chap --from-literal=username=<user> --from-literal=password=<password>
Add the following to the override file.
iscsi: chap: enabled: true secretName: scst-chap
Set the overrides.
~(keystone_admin)]$ system helm-override-update rook-ceph scst-iscsi-gateway rook-ceph --values scst-gateway-overrides.yaml
Enable the chart.
~(keystone_admin)]$ system helm-chart-attribute-modify --enabled true rook-ceph scst-iscsi-gateway rook-ceph
Apply the Rook Ceph application.
~(keystone_admin)]$ system application-apply rook-ceph
Wait until the application is
applied.~(keystone_admin)]$ system application-show rook-ceph
If the apply is rejected, the message names the missing prerequisite. See Prerequisites to Enable the Gateway. Correct it and apply again.
Verify the gateway.
Confirm that the pod is running on the active controller.
~(keystone_admin)]$ kubectl -n rook-ceph get pods -l app.kubernetes.io/name=scst-iscsi-gateway -o wide
The pod must show
1/1andRunning, on the active controller.Confirm that SM manages the placement service. Skip this step on AIO-SX, where the service is not used.
~(keystone_admin)]$ sudo sm-dump | grep scst-gw-exit
The service must be
enabled-activeon the active controller.Confirm that the portal is listening.
~(keystone_admin)]$ getent hosts controller-cluster-host ~(keystone_admin)]$ sudo ss -ltn 'sport = :3260'
The address that the first command returns is the portal address. The second command must show a listener on port 3260.
In each Windows guest, use the Windows iSCSI initiator to connect.
Discover the portal at the portal address on port 3260, and connect to the target. If you enabled CHAP, supply the user name and password. The guest sees only the LUNs of its group.
The gateway now exports the configured LUNs on the cluster-host floating address. The Windows guests can use the disks, including persistent reservations, as shared cluster disks.
Change the Configuration¶
To add or remove a LUN, change a group, or change the subnets, edit the override file, set the overrides again, and apply the application.
~(keystone_admin)]$ system helm-override-update rook-ceph scst-iscsi-gateway rook-ceph --values scst-gateway-overrides.yaml
~(keystone_admin)]$ system application-apply rook-ceph
Warning
Applying a change to the gateway configuration, such as the LUNs or the groups, restarts the gateway. All LUNs are unavailable while it restarts, and the Windows initiators reconnect afterward. Make changes when the cluster can tolerate the interruption.
The gateway creates the image for a LUN in luns if the image does not exist
when the gateway starts. The size is used only when the image is created.
Removing a LUN from the list stops exporting it but does not delete its image.
Override Parameters Reference¶
Set these values with system helm-override-update. The values that you do not set keep the defaults.
Override |
Default |
Description |
|---|---|---|
|
|
Deploys the gateway when |
|
None |
Name of the LUN device. Required. It is unique, has at most 16
characters, and uses only letters, digits, |
|
None |
Name of the Ceph RBD image in the |
|
None |
LUN ID, 0 to 255, unique. Groups refer to LUNs by this ID. |
|
None |
Size in GiB, a positive integer. It is used only when the image is created. |
|
Set by the chart |
IQN of the target. It must be a valid |
|
None |
Name of the initiator group. |
|
None |
IQNs of the initiators that may connect. The key |
|
None |
LUN IDs that the group can see. |
|
|
Requires one-way CHAP from initiators. |
|
Empty |
Secret with |
|
Empty |
Subnets that may reach port 3260. Nothing is widened if the list is empty. |
|
Both controllers |
Calico selector for the host endpoints that the policy applies to. Narrow it to admit port 3260 on one platform network only. |
|
|
Number of SCST threads for each device. |
|
|
iSCSI port. The system selects the portal address. |
|
|
How long the gateway waits for a held image lock when it maps an image. |
|
|
Runs the gateway privileged when |
|
|
Stops the gateway and deletes the LUN images that are listed in |
Note
The scst.nvCache and scst.writeThrough overrides ensure write
durability across controller failovers, which is required by WSFC. Do not
change these settings to improve performance.
If you use an existing RBD image, it can have only the layering and
exclusive-lock features. The gateway rejects an image with the
object-map, fast-diff, deep-flatten, or journaling feature, and an
image that is encrypted with LUKS. The images that the gateway creates have only
the two supported features.
Provide Network Access to the Portal¶
The gateway listens on TCP port 3260 at the cluster-host floating address. Each Windows guest must be able to route to that address.
By default, the platform firewall on each network admits traffic only from the network’s own subnet. A guest that reaches the portal across a router arrives with a source address from its own subnet, and the platform drops its connection before it reaches the gateway.
To admit the guests, list their subnets in networkPolicy.initiatorSubnets
and apply the override. The gateway then creates a Calico global network policy
named scst-iscsi-gateway-portal. The policy:
admits TCP port 3260 only, from the listed subnets only
applies to the host endpoints of both controllers by default
adds to the platform policies and does not replace them, so other platform ports stay closed to those subnets
To confirm the policy, run the following command.
~(keystone_admin)]$ kubectl get globalnetworkpolicy scst-iscsi-gateway-portal
Understand Failover Behavior¶
The gateway always runs on the active controller. The SM service
scst-gw-exit follows the active role. On AIO-SX there is only one
controller, the service is not used, and the gateway does not fail over.
Planned Swact¶
A planned swact moves the active controller role to the other controller in a controlled way. During a planned swact, the gateway moves to the new active controller as follows.
SM removes the placement label from the outgoing controller and deletes the gateway pod there, which closes the target, unmaps the images, and releases their Ceph locks.
SM labels the new active controller. The gateway pod starts there.
An init container holds the pod until the platform DRBD filesystem is mounted, so that the gateway never starts on an empty reservation store.
The gateway maps the images, configures the target, and opens the portal only when every LUN is ready.
Registrations and reservations are preserved because their state is stored on the DRBD filesystem. The Windows initiators reconnect to the same portal address. The disks are typically unavailable for one to two minutes.
Unplanned Controller Failure¶
If the active controller fails without releasing its Ceph locks, the new active
gateway detects the held locks. It confirms that the previous holder is not a
live client, blocklists it, removes the lock, and maps the image. A live holder
is never forced off. Recovery is automatic. Blocklisting needs a permission that
the rook-ceph-provisioner chart grants to client.kube-rbd when the Rook
Ceph application is applied.
Caution
Recovery after an unplanned loss of the active controller takes longer than a planned swact, and the time depends on how quickly Ceph detects the loss and marks the OSDs of the failed controller down. Windows initiators time out and report the disk as failed if the portal is unavailable for longer than their reconnect timeout. Plan the WSFC timeouts and maintenance accordingly.
Monitor the Gateway¶
The gateway does not generate its own alarms. Check the following components instead.
Pod status.
~(keystone_admin)]$ kubectl -n rook-ceph get pods -l app.kubernetes.io/name=scst-iscsi-gateway -o wide
The gateway log, which records iSCSI logins, logouts, initiator names, and authentication failures.
~(keystone_admin)]$ kubectl -n rook-ceph logs deployment/scst-iscsi-gateway
The placement service and its log. Not applicable to AIO-SX.
~(keystone_admin)]$ sudo sm-dump | grep scst-gw-exit ~(keystone_admin)]$ sudo tail /var/log/ceph/scst-iscsi-gateway-service.log
The pod is ready only when the portal address is local to the controller, the platform DRBD filesystem is mounted, the target is enabled, and every LUN in the applied configuration is present.
Back Up and Restore the Gateway State¶
When the gateway is enabled, the platform backup includes the persistent
reservation state stored in /opt/platform/scst. The platform restore
operation restores this state. See Back Up System Data Overview and
Restore Platform System Data and Storage.
The Helm overrides are saved in the system database backup. The Ceph images are kept as long as the Ceph cluster survives.
The platform backup does not include the data in your LUNs. You are responsible for protecting that data, for example with backups done inside the guest, Ceph RBD snapshots, or Ceph pool mirroring.
Disable the Gateway¶
Stop all initiators from using the disks. Take the WSFC disk resources offline and disconnect the initiators in the guests.
Disable the chart and apply the application.
~(keystone_admin)]$ system helm-chart-attribute-modify --enabled false rook-ceph scst-iscsi-gateway rook-ceph ~(keystone_admin)]$ system application-apply rook-ceph
Disabling the gateway stops the service, unmaps the images, and releases their Ceph locks. The Ceph images and application overrides are retained. To re-enable the gateway, re-enable the chart and reapply the application. See Enable and Configure the Gateway.
Delete the LUN Images¶
Warning
This permanently deletes the data in the images. Back up anything you need first.
To delete the images, set cleanup.deletePool: true in the overrides and apply
the application. The gateway stops and a job deletes only the images listed in
luns. The kube-rbd pool is shared with other consumers and is never
deleted or changed. Set cleanup.deletePool back to false before you enable
the gateway again.
Warning
Deleting the images does not delete their persistent reservation state under
/opt/platform/scst/pr, which is named after the LUN. A LUN that you
create again with the same name inherits the old registrations. Use a new
LUN name for new images.
Apply the Patch Release¶
The patch release requires a reboot of each controller. Apply it with the standard software deployment procedure, manual or orchestrated. See Manual Metapackage Host Software Deployment.
The patch release installs the software that provides the gateway, including the SCST kernel modules. The gateway stays disabled until you enable it. To use it, follow Prerequisites to Enable the Gateway after the reboot of the last controller.
Remove the Patch Release¶
The patch release requires a reboot. The system prevents removal while the gateway is enabled.
Disable the gateway. See Disable the Gateway.
Remove the patch release with the standard procedure. See Manual Removal Host Software Deployment.
If the gateway is still enabled, the removal stops at the start of the deployment and prints the steps to disable it first.
Note
You can force the removal with the --force option. The system then stops
the gateway pod on the active controller, which releases the Ceph locks,
removes the scst-gw-exit service from SM, and removes the placement
label. The service on the standby controller is removed when that controller
rolls back. The Ceph images are left in place. Use --force only if you
cannot disable the gateway first.
Limitations¶
Only one portal and one path is supported. Multipath I/O with several portals is not supported.
The gateway is active-passive. Active-active access is not supported.
Changing the LUN inventory or the access groups restarts the gateway. All LUNs are briefly unavailable while it restarts.
LUN names are limited to 16 characters.
The kernel RBD client supports only the
layeringandexclusive-lockimage features.On AIO-SX there is no controller failover.
The gateway does not raise its own alarms. Use the pod status and the probes to monitor it.
Troubleshoot the Gateway¶
Problem |
Cause and action |
|---|---|
The apply is rejected. |
A prerequisite is missing. The message names it. See Prerequisites to Enable the Gateway. |
The apply fails with an error about no |
The override fails validation. Correct it using the limits in Override Parameters Reference. |
The pod stays |
No controller has the placement label. Check that |
The pod stays in |
The platform DRBD filesystem is not mounted on that controller. The init container log names the node and the reason. |
The pod fails or restarts repeatedly after CHAP is enabled. |
The CHAP password may have fewer than 12 characters, or a value contains
white space or a double quote. Also confirm that the Secret exists in the
|
The pod restarts and the log reports an unsupported image feature or an encrypted image. |
The image has a feature other than |
The pod is running but not ready. |
A LUN is missing, or the wrong device is behind a LUN. Check the gateway log for the LUN and its image. |
An initiator cannot reach the portal. |
The initiator subnet is not in |
An initiator connects but sees no disk. |
Its IQN is not in |
A LUN does not come up after a controller failure. |
A stale Ceph lock is held. The gateway breaks it after it fences the previous holder. Check the gateway log for the lock and the blocklist messages. See Understand Failover Behavior. |