Skip to content

"Update IscsiTarget fail" when using CHAP #40

@franzmueller

Description

@franzmueller

I'm trying to use the CHAP feature introduced in v1.6.0. I can create PVCs when CHAP is disabled, but not with CHAP enabled.

QNAP CHAP config:

Image

Backend Secret:

apiVersion: v1
kind: Secret
metadata:
  name: backend-qts-secret # Required. Name your secret.
  namespace: trident
type: Opaque
stringData:
  username: [REDACTED] # Required. Your NAS username.
  password: [REDACTED] # Required. Your NAS password.
  storageAddress: [REDACTED] # Required. Your NAS IP address.
  https: "false" # Optional. Whether to enable a secure connection. Default: False.
  port: "8080" # Optional. Specify the port. Default: 8080.
  chapInitiatorUsername: qnap # Optional. Username used by the initiator to authenticate to the target.
  chapInitiatorPassword: qnapqnapqnap # Optional. Password for the initiator’s CHAP authentication. 
  chapTargetUsername: qnap # Optional. Username used by the target to authenticate back to the initiator (for mutual CHAP).
  chapTargetPassword: qnapqnapqnap2 # Optional. Password for the target’s CHAP authentication (for mutual CHAP). 

Controller Logs:

time="2026-01-29 09:57:52" level=info msg="---> Receive Storage Add Request"
time="2026-01-29 09:57:52" level=info msg="Create New Session" Host=[REDACTED] Port=8080 Protocol=http Pwd=[REDACTED] User=[REDACTED]
time="2026-01-29 09:57:52" level=info msg="Add Storage Successfully" Host=[REDACTED] Name=pool
time="2026-01-29 09:57:52" level=info msg="---> Receive Net Interface List Request" storage="name:\"pool\""
time="2026-01-29 09:57:54" level=info msg="---> Receive Pool List Request" storage="name:\"pool\""
time="2026-01-29 09:57:57" level=info msg="List Pool Successfully"
time="2026-01-29 09:57:57" level=info msg="Get Cache Volume Successfully"
time="2026-01-29 09:58:00" level=info msg="---> Receive Pool List Request" storage="name:\"pool\""
time="2026-01-29 09:58:03" level=info msg="List Pool Successfully"
time="2026-01-29 09:58:03" level=info msg="Get Cache Volume Successfully"
time="2026-01-29 09:58:03" level=info msg="---> Receive Qvolume Create Request" storage="name:\"pool\""
time="2026-01-29 09:58:03" level=info msg="=====> Create Volume" Feature="map[LvSSD:true SharedFolderRWUsers: fileSystem:ext4 notManaged:false readOnlyClone:false]" Name=trident-pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d Size=1073741824 Type=block
time="2026-01-29 09:58:07" level=info msg="---> Receive Qvolume List Request" storage="name:\"pool\""
time="2026-01-29 09:58:09" level=info msg="Create Volume Successfully"
time="2026-01-29 09:58:09" level=info msg="<==== Create Volume" Feature="map[LvSSD:true SharedFolderRWUsers: fileSystem:ext4 notManaged:false readOnlyClone:false]" Name=trident-pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d Size=1073741824 Type=block
time="2026-01-29 09:58:09" level=info msg="---> Receive Iscsi Create Request" storage="name:\"pool\""
time="2026-01-29 09:58:09" level=info msg="=====> Create iSCSI Target" iSCSI="features:{key:\"BtargetClusterEnable\"  value:\"1\"}  features:{key:\"BtargetDataDigest\"  value:\"0\"}  features:{key:\"BtargetHeaderDigest\"  value:\"0\"}  features:{key:\"NetAdapter\"  value:\"Adapter 8\"}  features:{key:\"TargetAlias\"  value:\"f687e4b99b904a8095c9016d83d7615d\"}  features:{key:\"TargetName\"  value:\"iscsi-trident-pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d\"}"
time="2026-01-29 09:58:10" level=info msg="List Volume Successfully"
time="2026-01-29 09:58:10" level=info msg="---> Receive Qvolume Get Request" storage="name:\"pool\""
time="2026-01-29 09:58:10" level=info msg="=====> Get Volume" Index=1 Type=block
time="2026-01-29 09:58:11" level=warning msg="missing iSCSI target"
time="2026-01-29 09:58:11" level=info msg="Get Volume Successfully"
time="2026-01-29 09:58:11" level=info msg="<==== Get Volume" Index=1 Type=block
time="2026-01-29 09:58:11" level=info msg="---> Receive Qvolume Get Request" storage="name:\"pool\""
time="2026-01-29 09:58:11" level=info msg="=====> Get Volume" Index=2 Type=block
time="2026-01-29 09:58:12" level=warning msg="missing iSCSI target"
time="2026-01-29 09:58:12" level=info msg="Get Volume Successfully"
time="2026-01-29 09:58:12" level=info msg="<==== Get Volume" Index=2 Type=block
time="2026-01-29 09:58:17" level=info msg="Create Iscsi Target Successfully" Alias=f687e4b99b904a8095c9016d83d7615d IQN="iqn.2004-04.com.qnap:ts-h1283xu-rp:iscsi.iscsi-trident-pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d.6715f5" Index=2 Name=iscsi-trident-pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d
time="2026-01-29 09:58:17" level=info msg="<==== Create iSCSI Target" iSCSI="features:{key:\"BtargetClusterEnable\"  value:\"1\"}  features:{key:\"BtargetDataDigest\"  value:\"0\"}  features:{key:\"BtargetHeaderDigest\"  value:\"0\"}  features:{key:\"NetAdapter\"  value:\"Adapter 8\"}  features:{key:\"TargetAlias\"  value:\"f687e4b99b904a8095c9016d83d7615d\"}  features:{key:\"TargetName\"  value:\"iscsi-trident-pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d\"}"
time="2026-01-29 09:58:17" level=info msg="---> Receive Initiator Update Request" storage="name:\"pool\""
time="2026-01-29 09:58:17" level=info msg="=====> Update iSCSI Target ACL" CHAP Username=qnap Global CHAP=1 Mutual CHAP Username=qnap Target Index=2
time="2026-01-29 09:58:18" level=info msg="<==== Update iSCSI Target ACL" CHAP Username=qnap Global CHAP=1 Mutual CHAP Username=qnap Target Index=2
time="2026-01-29 09:58:18" level=error msg="update initiator failed, Error : Update IscsiTarget fail;  API returns result : ; Error Code : "

In the iSCSI Storage view, I can see a new LUN and Target created, but the assignment is missing:
Image

And no TridentVolumes are created:

$ kubectl get TridentVolumes -A
No resources found

My PVC remains in Pending state:

$ kubectl describe pvc/test -n trident
Name:          test
Namespace:     trident
StorageClass:  cat2
Status:        Pending
Volume:
Labels:        app=test
Annotations:   volume.beta.kubernetes.io/storage-provisioner: csi.trident.qnap.io
               volume.kubernetes.io/storage-provisioner: csi.trident.qnap.io
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Used By:       <none>
Events:
  Type     Reason                Age                     From                                                                                          Message
  ----     ------                ----                    ----                                                                                          -------
  Warning  ProvisioningFailed    8m29s                   csi.trident.qnap.io_trident-controller-5798f5447b-mz5wk_ebd205b7-d74e-4974-8079-960221294d9b  failed to provision volume with StorageClass "cat2": rpc error: code = InvalidArgument desc = no available storage for access modes: [ReadWriteOnce]
  Normal   ExternalProvisioning  2m33s (x26 over 8m29s)  persistentvolume-controller                                                                   Waiting for a volume to be created either by the external provisioner 'csi.trident.qnap.io' or manually by the system administrator. If volume creation is delayed, please verify that the provisioner is running and correctly registered.
  Normal   Provisioning          87s (x13 over 8m29s)    csi.trident.qnap.io_trident-controller-5798f5447b-mz5wk_ebd205b7-d74e-4974-8079-960221294d9b  External provisioner is provisioning volume for claim "trident/test"
  Warning  ProvisioningFailed    77s (x12 over 8m3s)     csi.trident.qnap.io_trident-controller-5798f5447b-mz5wk_ebd205b7-d74e-4974-8079-960221294d9b  failed to provision volume with StorageClass "cat2": rpc error: code = Unknown desc = encountered error(s) in creating the volume: [Failed to create volume pvc-f687e4b9-9b90-4a80-95c9-016d83d7615d on storage pool pool-cat2 from backend pool: failed to create volume on each pool; err : rpc error: code = Unknown desc = Update IscsiTarget fail;  API returns result : ; Error Code : ]

HW info:

TS-h1283XU-RP
Firmware: QuTS hero h5.2.8.3359

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions