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

[targetcli] Uncaught exception: AttributeError: 'UILUNs' object has no attribute 'rtsnode'

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-9.2.0
    • targetcli
    • Minor
    • sst_storage_io
    • ssg_platform_storage
    • 3
    • False
    • Hide

      None

      Show
      None
    • If docs needed, set a value

      Description of problem:
      targetcli exits with exception when invalid storage_object is passed when creating lun.
      Crashes observed with `luns/ create storage_object=` and `storage_object=.`

      /iscsi/iqn.20...49601261/tpg1> luns/ create
      Missing required parameter storage_object
      /iscsi/iqn.20...49601261/tpg1> luns/ create storage_object=/invalid/path/
      storage object or path not valid
      /iscsi/iqn.20...49601261/tpg1> luns/ create storage_object=something
      storage object or path not valid
      /iscsi/iqn.20...49601261/tpg1> luns/ create storage_object=.
      Traceback (most recent call last):
      File "/usr/bin/targetcli", line 329, in <module>
      main()
      File "/usr/bin/targetcli", line 317, in main
      shell.run_interactive()
      File "/usr/lib/python3.9/site-packages/configshell_fb/shell.py", line 900, in run_interactive
      self._cli_loop()
      File "/usr/lib/python3.9/site-packages/configshell_fb/shell.py", line 729, in _cli_loop
      self.run_cmdline(cmdline)
      File "/usr/lib/python3.9/site-packages/configshell_fb/shell.py", line 843, in run_cmdline
      self._execute_command(path, command, pparams, kparams)
      File "/usr/lib/python3.9/site-packages/configshell_fb/shell.py", line 818, in _execute_command
      result = target.execute_command(command, pparams, kparams)
      File "/usr/lib/python3.9/site-packages/configshell_fb/node.py", line 1406, in execute_command
      return method(*pparams, **kparams)
      File "/usr/lib/python3.9/site-packages/targetcli/ui_target.py", line 1122, in ui_command_create
      so = self.get_node(storage_object).rtsnode
      AttributeError: 'UILUNs' object has no attribute 'rtsnode'

      Version-Release number of selected component (if applicable):
      python3-configshell-1:1.1.28-7.el9.noarch
      python3-rtslib-2.1.75-1.el9.noarch
      targetcli-2.1.53-7.el9.noarch
      kernel-5.14.0-283.el9.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1.create iscsi tpg
      2.attempt to create lun with `storage_object=`
      3.observe exception

      Actual results:
      targetcli exits with python AttributeError

      Expected results:
      "storage object or path not valid" message, without exiting targetcli shell

      Additional info:

            mlombard@redhat.com Maurizio Lombardi
            mhoyer@redhat.com Martin Hoyer
            Maurizio Lombardi Maurizio Lombardi
            Martin Hoyer Martin Hoyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: