Bug 830672 - Please check WWPN with regex before pass to OS /sys check.
Please check WWPN with regex before pass to OS /sys check.
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: fcoe-target-utils (Show other bugs)
6.0
All Linux
low Severity low
: rc
: ---
Assigned To: Andy Grover
Storage QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 04:05 EDT by Gris Ge
Modified: 2012-06-25 11:00 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-11 15:23:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gris Ge 2012-06-11 04:05:36 EDT
Description of problem:

When user enter a incorrect WWPN, it got wired python error dump:

====
/tcm_fc/20:00:00:1b:21:59:12:37/acls/ create  incorrect
====
==========

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 990, in run_interactive
    self._cli_loop()
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 813, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 934, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 909, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.6/site-packages/targetcli/ui_node.py", line 84, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.6/site-packages/configshell/node.py", line 1405, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.6/site-packages/targetcli/ui_target.py", line 512, in ui_command_create
    node_acl = NodeACL(self.tpg, wwn, mode="create")
  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 786, in __init__
    self._create_in_cfs_ine(mode)
  File "/usr/lib/python2.6/site-packages/rtslib/node.py", line 65, in _create_in_cfs_ine
    os.mkdir(self.path)
OSError: [Errno 22] Invalid argument: '/sys/kernel/config/target/fc/20:00:00:1b:21:59:12:37/tpgt_1/acls/hel'
==========

Version-Release number of selected component (if applicable):
fcoe-target-utils-2.0rc1.fb10-5.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Execute:
===
targetcli /tcm_fc/20:00:00:1b:21:59:12:36/acls/ create incorrect
===
2.
3.
  
Actual results:
Python error dump

Expected results:
WWPN format check for any wwpn option.

Additional info:
Requesting exception.
If we want make fcoe-target-utils looks like an enterprise level software rather than homebrew one, we should fix this.
Comment 1 Andy Grover 2012-06-11 15:23:35 EDT
now fixed in upstream python-rtslib

Note You need to log in before you can comment on or make changes to this bug.