question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using an IPv6 iscsi target portal causes mount to fail

See original GitHub issue

Using democratic-csi from helm chart v0.13.1.

If I configure:

driver
  config:
    driver: freenas-iscsi
    iscsi:
      targetPortal: '[2001:123:456::1]:3260'

And then request a k8s deployment with a pvc with the appropriate storage class, the pod fails to start with:

MountVolume.MountDevice failed for volume "pvc-5168eaae-77c4-4361-91e9-6994283d36c3" : rpc error: code = Internal desc = {"code":1,"stdout":"","stderr":"iscsiadm: false is an invalid session ID or path\n"," ││ timeout":false}                                                        

The volume is provisioned and shared properly on Freenas, and an iscsi session is opened to the correct portal on the k8s node. However, on the csi-driver log, I can see:

csi-driver executing iscsi command: iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:default-aptcacher-iscsi-claim -p [2001:123:456::1]:3260 -o new
csi-driver executing iscsi command: iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:default-aptcacher-iscsi-claim -p [2001:123:456::1]:3260 -o update --name node.startup --value manual                           
csi-driver executing iscsi command: iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:default-aptcacher-iscsi-claim -p [2001:123:456::1]:3260 -l
csi-driver executing iscsi command: iscsiadm -m session
csi-driver executing iscsi command: iscsiadm -m session -r false --rescan 

The fault here is the last line - it’s trying to rescan a session but passing in a session id of false, which isn’t valid.

It seems this comes from the logic in src/utils/iscsi.js#L181 (https://github.com/democratic-csi/democratic-csi/blob/v1.7.2/src/utils/iscsi.js#L181) which looks to discover the session id. For whatever reason, it doesn’t find it, so returns false rather than a session id, which then gets passed through to rescanSession in https://github.com/democratic-csi/democratic-csi/blob/v1.7.2/src/utils/iscsi.js#L491.

I suspect the portal == i_session.portal comparison is fault somehow, but not really sure how to debug to get any further.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
growsecommented, Aug 3, 2022

Success! Many thanks.

1reaction
travisghansencommented, Aug 2, 2022

And yes, I was discussing that very bug earlier today with the csi team which is what made me realize you would have issues. That specific code is not relevant directly in the case of this driver, but indeed my logic suffers from the exact same issue (and has been resolved in the exact same fashion). I should have v1.7.5 snapped shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is iSCSI Trying to Connect on IPv6 at boot? - Ask Ubuntu
After digging deeper into the Synology NAS, there is a setting in the ISCSI Manager -->Target-->Network Bindings that is checked for 'All ...
Read more >
VMI's and pods fails to consume IPv6 ISCSI PV, PVC's #4150
TargetPortal with IPv6 address. The problem is that VMI's fails to consume PVC of that PV, causing all related tests to fail.
Read more >
1249107 – [targetcli] cannot discover iSCSI target with IPv6
Description of problem: Cannot discover iSCSI target (LIO) on aarch64 with IPv6 Version-Release number of selected component (if applicable): ...
Read more >
Resolve iSCSI error messages on the storage system
There are a number of common iSCSI-related error messages that you can view with the event log show command. You need to know...
Read more >
RHEL7: Configure a system as either an iSCSI target or ...
If you use a version pre-RHEL 7.1 (this step is now automatically done by the iscsi/ create command), you need to create a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found