Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3.0 - unable to get iscsi tgt implementation working #24

Open
acidrop opened this issue Nov 3, 2023 · 5 comments
Open

v1.3.0 - unable to get iscsi tgt implementation working #24

acidrop opened this issue Nov 3, 2023 · 5 comments
Assignees

Comments

@acidrop
Copy link

acidrop commented Nov 3, 2023

I'm testing linstor-gateway v1.3.0 and the new feature for iscsi tgt implementation, however I'm unable to get it working. Another user seem to have reported a similar issue in drbd-user mailing list...

https://lists.linbit.com/pipermail/drbd-user/2023-October/026493.html

Please also see attached log file.

linstor-gateway -v
linstor-gateway version 1.3.0
dpkg -l|grep tgt
ii  tgt                                  1:1.0.85-1                          amd64        Linux SCSI target user-space daemon and tools

linstor-gateway iscsi create iqn.2019-08.com.linbit:iscsi-lun1 10.10.3.10/24 10G --resource-group iscsi-group --implementation tgt

linstor-gateway iscsi list
+-----------------------------------+---------------+----------------+-----+---------------+
|                IQN                |  Service IP   | Service state  | LUN | LINSTOR state |
+-----------------------------------+---------------+----------------+-----+---------------+
| iqn.2019-08.com.linbit:iscsi-lun1 | 10.10.3.10/24 | Started (pve1) |   1 | OK            |
+-----------------------------------+---------------+----------------+-----+---------------+

Resource is moving between the nodes, but never starts properly. HA VIP also does not respond to ping requests.

root@pve1:~# drbdadm status
iscsi-lun1 role:Secondary
  volume:0 disk:Diskless
  volume:1 disk:Diskless
  pve2 role:Primary
    volume:0 peer-disk:UpToDate
    volume:1 peer-disk:UpToDate
  pve3 role:Secondary
    volume:0 peer-disk:UpToDate
    volume:1 peer-disk:UpToDate

root@pve1:~# drbdadm status
iscsi-lun1 role:Secondary
  volume:0 disk:Diskless
  volume:1 disk:Diskless
  pve2 role:Secondary
    volume:0 peer-disk:UpToDate
    volume:1 peer-disk:UpToDate
  pve3 role:Secondary
    volume:0 peer-disk:UpToDate
    volume:1 peer-disk:UpToDate

lgtgterr.log

@chrboe
Copy link
Collaborator

chrboe commented Nov 3, 2023

Thank you for the report. To be honest, tgt was not really a big consideration when implementing this feature. The main intent was to allow usage with scst.

Of course, it should also work just as well with tgt. I'll investigate.

@chrboe chrboe self-assigned this Nov 3, 2023
@acidrop
Copy link
Author

acidrop commented Nov 5, 2023

Tested it with scst on Ubuntu 22.04 this time, and there seem to be issues with that too. I see the following line in the logs...

ocf-rs-wrapper[5165]: ocf-exit-reason:Unsupported iSCSI target implementation "scst"

 modinfo scst|head
filename:       /lib/modules/5.19.0-50-generic/updates/dkms/scst.ko
version:        3.7.0
description:    SCSI target core
license:        GPL
author:         Vladislav Bolkhovitin
srcversion:     77B4564098FA1279F50855C
depends:        dlm
retpoline:      Y
name:           scst
vermagic:       5.19.0-50-generic SMP preempt mod_unload modversions
 dpkg -l|grep resource-agents
ii  resource-agents                      1:4.7.0-1ubuntu7.2                      all          Transitional package for the resource-agents
ii  resource-agents-base                 1:4.7.0-1ubuntu7.2                      all          Cluster Resource Agents curated by Ubuntu
ii  resource-agents-common               1:4.7.0-1ubuntu7.2                      amd64        Common files used by the Cluster Resource Agents
ii  resource-agents-extra                1:4.7.0-1ubuntu7.2                      amd64        Cluster Resource Agents

Attaching logs...

ubuntu_lgw_scst.log

@chrboe
Copy link
Collaborator

chrboe commented Nov 5, 2023

That I can probably explain.

scst support was only very recently added to resource-agents, with this pull request to be precise: ClusterLabs/resource-agents#1890

That was only released in version 4.13.0 of resource-agents, so you should make sure you are running that version.

@acidrop
Copy link
Author

acidrop commented Nov 7, 2023

That I can probably explain.

scst support was only very recently added to resource-agents, with this pull request to be precise: ClusterLabs/resource-agents#1890

That was only released in version 4.13.0 of resource-agents, so you should make sure you are running that version.

Thanks for this. Sorry for drifting to a different subject from the original, but I installed v4.13.0 of resource-agents and this time it's showing a different error.. Do you think this that this is some kind of misconfiguration on my end ? scst kernel module seems to be loaded. LIO target (i.e without using --implementation argument) is working fine by the way, even with v4.13.0.

lsmod|grep scst
scst                 3579904  0
dlm                   237568  1 scst
Nov 07 14:02:43 pve1 ocf-rs-wrapper[47220]: Nov 07 14:02:43 ERROR:  Collecting current configuration: done. -> Making requested changes. -> Creating target 'iqn.2019-08.com.linbit:iscsi-lu
n2' for driver 'iscsi': done. -> Done. WARNING: Received the following error: No such driver exists. All done.
Nov 07 14:02:43 pve1 ocf-rs-wrapper[47220]: Nov 07 14:02:43 ERROR:  Collecting current configuration: done. -> Making requested changes. WARNING: Received the following error: targetAttrib
utes(): Driver 'iscsi' is not available -> Done. All done.
Nov 07 14:02:43 pve1 ocf-rs-wrapper[47220]: Nov 07 14:02:43 ERROR:  Collecting current configuration: done. -> Making requested changes. -> Adding new group 'allowed' to driver/target 'isc
si/iqn.2019-08.com.linbit:iscsi-lun2': done. FATAL: Received the following error: No such driver exists.
Nov 07 14:02:43 pve1 ocf-rs-wrapper[47220]: Nov 07 14:02:43 INFO:  Collecting current configuration: done. -> Making requested changes. WARNING: Received the following error: targetAttribu
tes(): Driver 'iscsi' is not available -> Done. All done.
Nov 07 14:02:43 pve1 ocf-rs-wrapper[47220]: /usr/lib/ocf/resource.d/heartbeat/iSCSITarget: line 430: /sys/kernel/scst_tgt/targets/iscsi/enabled: No such file or directory
Nov 07 14:02:43 pve1 ocf-rs-wrapper[47218]: ERROR [ocf_rs_wrapper] iSCSITarget:target_iscsi\x2dlun2,s-a-m,start: FAILED with exit code 7

@chrboe
Copy link
Collaborator

chrboe commented Nov 7, 2023

You need to modprobe scst, iscsi-scst, and scst_vdisk. Also, you need to start the iscsi-scstd userspace daemon.

Should probably document that somewhere... 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants