Change:
Kubelet was not able to attach + mount an iSCSI PV when it has IPv6 server address. Volume is mounted + attached. Set up iSCSI target that's reachable over IPv6 and create a PV for it. For example: Kubelet logs: Notice around the IP address. Various iSCSI files in /sys and /dev/disk/by-path do not have these square brackets and kubelet is then not able to find the iSCSI host in /sys. That's where comes from. No response <detailsA recent master: console NAME="Fedora Linux" VERSION="36 (Workstation Edition)" </details<detailshack/local-up- </details<details</details<details</details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig storage /priority important-soon
/assign

Discussion:
klog.Errorf("iscsi: could not find transport name in iface %s", b.Iface) return "", fmt.Errorf("could not parse iface file for %s", b.Iface) } <ins> addr := tp if strings.HasPrefix(tp, "[") { // Delete [] from IP address, links in /dev/disk/by-path do not have it. addr = strings.NewReplacer("[", "", "]", "").Replace(tp) } </ins> if iscsiTransport == "tcp" { <del> devicePath = strings.Join([]string{"/dev/disk/by-path/ip", tp, "iscsi", b.Iqn, "lun", b.Lun}, "-") </del> <ins> devicePath = strings.Join([]string{"/dev/disk/by-path/ip", addr, "iscsi", b.Iqn, "lun", b.Lun}, "-") </ins> } else { <del> devicePath = strings.Join([]string{"/dev/disk/by-path/pci", "*", "ip", tp, "iscsi", b.Iqn, "lun", b.Lun}, "-") </del> <ins> devicePath = strings.Join([]string{"/dev/disk/by-path/pci", "*", "ip", addr, "iscsi", b.Iqn, "lun", b.Lun}, "-") </ins> } if exist := waitForPathToExist(&devicePath, deviceDiscoveryTimeout, iscsiTransport); !exist {

if err != nil || portal != "127.0.0.1:3260" || iqn != "eui.02004567A425678D" { t.Errorf("extractPortalAndIqn: got %v %s %s", err, portal, iqn) } <ins> devicePath = "[2001:db8:0:f101::1]:3260-iqn.2014-12.com.example:test.tgt00-lun-0" portal, iqn, err = extractPortalAndIqn(devicePath) if err != nil || portal != "[2001:db8:0:f101::1]:3260" || iqn != "iqn.2014-12.com.example:test.tgt00" { t.Errorf("extractPortalAndIqn: got %v %s %s", err, portal, iqn) } </ins> } func TestRemoveDuplicate(t *testing.T) {

import ( "errors" "fmt" <ins> "net" </ins> "os" "path/filepath" "strconv"

// Add entries to the map for both the current and persistent portals // pointing to the SCSI host for those connections <del> portal := strings.TrimSpace(string(addr)) + ":" + strings.TrimSpace(string(port)) </del> <ins> // JoinHostPort will add `[]` around IPv6 addresses. portal := net.JoinHostPort(strings.TrimSpace(string(addr)), strings.TrimSpace(string(port))) </ins> portalHostMap[portal] = hostNumber <del> persistentPortal := strings.TrimSpace(string(persistentAddr)) + ":" + strings.TrimSpace(string(persistentPort)) </del> <ins> persistentPortal := net.JoinHostPort(strings.TrimSpace(string(persistentAddr)), strings.TrimSpace(string(persistentPort))) </ins> portalHostMap[persistentPortal] = hostNumber } }