Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-108521

invalid /etc/ctl.conf file generated when using high concurrency API requests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Low
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 12.0-U2
    • Component/s: API, iSCSI
    • Labels:
      None
    • Impact:
      Medium

      Description

      When executing many concurrent API requests to create targets/extents/targetextents the end result *can* be an invalid ctl.conf file that will not clean itself up without manual intervention.

      Observe the following snippet of my config file after running many requests:

       cat /etc/ctl.conf
      portal-group "default" {
      }
      target "iqn.2011-03.lan.bitness.istgt:onegear.pvc-4a80757e-5e87-475d-826f-44fcc4719348" {
          alias "onegear.pvc-4a80757e-5e87-475d-826f-44fcc4719348"
      portal-group "pg1" {
          tag "0x0001"
          discovery-filter "portal-name"
          discovery-auth-group "no-authentication"
          listen "0.0.0.0:3260"
          option "ha_shared" "on"
      }
      portal-group "pg2" {
          tag "0x0002"
          discovery-filter "portal-name"
          discovery-auth-group "no-authentication"
          listen "0.0.0.0:3261"
          option "ha_shared" "on"
      }
          portal-group "pg1" "no-authentication"
          lun "0" "onegear.pvc-4a80757e-5e87-475d-826f-44fcc4719348"
      }

      Notice the portal groups got written *inside* the target block. At best this leaves iscsi service unable to properly handle requests, at worst I *think* I've seen it crash the daemon before but that seems uncommon.

      To semi correct the issue I've written crude scripts available here: https://github.com/democratic-csi/democratic-csi/tree/master/contrib

      to run as background 'daemon' services on the server(s)

        Attachments

          Attachments

            JEditor

              Issue Links

                Activity

                  People

                  Assignee:
                  vladimirv Vladimir Vinogradenko
                  Reporter:
                  travisghansen Travis Hansen (community)
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved: