Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5397

fence_scsi: fix registration handling if ISID conflicts (RHEL8)

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-8.10
    • None
    • fence-agents
    • None
    • fence-agents-4.2.1-127.el8
    • None
    • None
    • rhel-sst-high-availability
    • ssg_filesystems_storage_and_HA
    • 13
    • 17
    • 8
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      If an iSCSI client establishes a connection with a device using an ISID (say X) and registers/reserves with the device using a key, the key is associated with the I_T nexus (with ISID X). Now if a device reconnects for some reason (like client reboots), it establishes a new iSCSI connection (with ISID Y) and fence agent tries to register again. However fence_scsi looks up the reservation key for the device, sees that it matches with the key and skips sending a new registration command assuming that the key belongs to it (ignoring the ISID).

      This can cause the iSCSI initiator to have no access to the device since it is not registered.

       

      Patches:

      https://github.com/ClusterLabs/fence-agents/pull/529

      https://github.com/ClusterLabs/fence-agents/pull/558

      Please provide the package NVR for which bug is seen:

      fence-agents-4.10.0-55.el9

      How reproducible:

      100%

      Steps to reproduce

      1. Follow instructions in https://github.com/ClusterLabs/fence-agents/pull/558#issuecomment-1721830437

      Expected results

      Doesnt fail

      Actual results

      Fails

            [RHEL-5397] fence_scsi: fix registration handling if ISID conflicts (RHEL8)

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Moderate: fence-agents security and bug fix update), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:2968

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Moderate: fence-agents security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:2968

            gitlab-bot added a comment -

            oalbrigt mentioned this issue in a commit of Red Hat / centos-stream / rpms / fence-agents on branch RHEL5397-RHEL14343:

            • fence_scsi: fix registration handling if ISID conflicts

            gitlab-bot added a comment - oalbrigt mentioned this issue in a commit of Red Hat / centos-stream / rpms / fence-agents on branch RHEL5397-RHEL14343 : fence_scsi: fix registration handling if ISID conflicts

            I was not able to reproduce the problem before fix ( fence-agents-scsi-4.2.1-121.el8).

            Anyway, the problem is reproducible in the latest version fence-agents-scsi-4.2.1-126.el8

             

            [root@virt-501 ~]# rpm -q fence-agents-scsi
            fence-agents-scsi-4.2.1-126.el8.noarch

             

            1) SIDs BEFORE reboot:

            [root@virt-501 ~]# iscsiadm -m session -P 3 |  grep -e SID -e Target:'
            Target: iqn.2020-01.com.example:derahs3 (non-flash)
                    SID: 23
            Target: iqn.2020-01.com.example:derahs1 (non-flash)
                    SID: 24
            Target: iqn.2020-01.com.example:derahs2 (non-flash)
                    SID: 25

            [root@virt-501 ~]# reboot

             

            1) SIDs AFTER reboot:

            [root@virt-501 ~]# iscsiadm -m session -P 3 |  grep -e SID -e Target:
            Target: iqn.2020-01.com.example:derahs3 (non-flash)
                            SID: 1
            Target: iqn.2020-01.com.example:derahs1 (non-flash)
                            SID: 2
            Target: iqn.2020-01.com.example:derahs2 (non-flash)
                            SID: 3

             

            [root@virt-501 ~]# pcs stonith fence virt-502
            Error: unable to fence 'virt-502'
            stonith_admin: Couldn't fence virt-502: No data available

             

            RESULT: fence_scsi fails to fence node virt-502

            Martin Juricek added a comment - I was not able to reproduce the problem before fix ( fence-agents-scsi-4.2.1-121.el8). Anyway, the problem is reproducible in the latest version fence-agents-scsi-4.2.1-126.el8   [root@virt-501 ~] # rpm -q fence-agents-scsi fence-agents-scsi-4.2.1-126.el8.noarch   1) SIDs BEFORE reboot: [root@virt-501 ~] # iscsiadm -m session -P 3 |  grep -e SID -e Target:' Target: iqn.2020-01.com.example:derahs3 (non-flash)         SID: 23 Target: iqn.2020-01.com.example:derahs1 (non-flash)         SID: 24 Target: iqn.2020-01.com.example:derahs2 (non-flash)         SID: 25 [root@virt-501 ~] # reboot   1) SIDs AFTER reboot: [root@virt-501 ~] # iscsiadm -m session -P 3 |  grep -e SID -e Target: Target: iqn.2020-01.com.example:derahs3 (non-flash)                 SID: 1 Target: iqn.2020-01.com.example:derahs1 (non-flash)                 SID: 2 Target: iqn.2020-01.com.example:derahs2 (non-flash)                 SID: 3   [root@virt-501 ~] # pcs stonith fence virt-502 Error: unable to fence 'virt-502' stonith_admin: Couldn't fence virt-502: No data available   RESULT: fence_scsi fails to fence node virt-502

            gitlab-bot added a comment -

            oalbrigt mentioned this issue in a merge request of Red Hat / centos-stream / rpms / fence-agents on branch RHEL5397:

            • fence_scsi: fix registration handling if ISID conflicts

            gitlab-bot added a comment - oalbrigt mentioned this issue in a merge request of Red Hat / centos-stream / rpms / fence-agents on branch RHEL5397 : fence_scsi: fix registration handling if ISID conflicts

            gitlab-bot added a comment -

            oalbrigt mentioned this issue in a commit of Red Hat / centos-stream / rpms / fence-agents on branch RHEL5397:

            • fence_scsi: fix registration handling if ISID conflicts

            gitlab-bot added a comment - oalbrigt mentioned this issue in a commit of Red Hat / centos-stream / rpms / fence-agents on branch RHEL5397 : fence_scsi: fix registration handling if ISID conflicts

              rhn-engineering-oalbrigt Oyvind Albrigtsen
              rhn-engineering-oalbrigt Oyvind Albrigtsen
              Oyvind Albrigtsen Oyvind Albrigtsen
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: