Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 813676

Summary: Failed to save configuration when targetcli exit
Product: Red Hat Enterprise Linux 6 Reporter: Gris Ge <fge>
Component: python-rtslibAssignee: Andy Grover <agrover>
Status: CLOSED ERRATA QA Contact: Gris Ge <fge>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3CC: bdonahue, czhang, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:51:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gris Ge 2012-04-18 08:14:55 UTC
Description of problem:
When "exit" from targetcli, got these errors:
====
/tcm_fc/20:00...5:1e:8f:fa:db> exit
Global pref auto_save_on_exit=true
Existing file /etc/target/saveconfig.json backed up to saveconfig.json.backup
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 93, in <module>
    main()
  File "/usr/bin/targetcli", line 89, in main
    root_node.ui_command_saveconfig()
  File "/usr/lib/python2.6/site-packages/targetcli/ui_root.py", line 70, in ui_command_saveconfig
    f.write(json.dumps(RTSRoot().dump(), sort_keys=True, indent=2))
  File "/usr/lib/python2.6/site-packages/rtslib/root.py", line 160, in dump
    d['targets'] = [t.dump() for t in self.targets]
  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 1453, in dump
    d['tpgs'] = [tpg.dump() for tpg in self.tpgs]
  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 1283, in dump
    d['node_acls'] =  [acl.dump() for acl in self.node_acls]
  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 936, in dump
    val = getattr(self, "chap_" + attr, None)
  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 845, in _get_chap_userid
    value = fread(path).strip()
  File "/usr/lib/python2.6/site-packages/rtslib/utils.py", line 102, in fread
    file_fd = open(path, 'r')
IOError: [Errno 2] No such file or directory: '/sys/kernel/config/target/fc/20:00:00:1b:21:59:12:36/tpgt_1/acls/10:00:00:05:1e:8f:fa:db/auth/userid'
====

This the whole folder contents of /sys/kernel/config/target/fc/20:00:00:1b:21:59:12:36/

http://pastebin.test.redhat.com/85566


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

How reproducible:
100%

Steps to Reproduce:
1. Setup FCoE and try to exit.
2.
3.
  
Actual results:
python complain

Expected results:
configuration saved.

Additional info:

Comment 5 Andy Grover 2012-04-20 05:09:50 UTC
whups, lost acks when I changed components. Please re-ack pm and qe, sorry bout that.

Comment 7 Gris Ge 2012-05-09 08:44:08 UTC
VERIFY for fcoe-target-utils-2.0rc1.fb10-4.el6.noarch.rpm.

configuration saved on exit to /etc/target/saveconfig.json

Comment 9 errata-xmlrpc 2012-06-20 13:51:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0855.html