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 1064753 - targetcli: root.py:257:restore_from_file:IOError: [Errno 2] No such file or directory: '/etc/target/saveconfig.json'
Summary: targetcli: root.py:257:restore_from_file:IOError: [Errno 2] No such file or d...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rtslib
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Bruno Goncalves
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 09:04 UTC by Bruno Goncalves
Modified: 2023-03-08 07:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:25:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bruno Goncalves 2014-02-13 09:04:55 UTC
Description of problem:
Traceback trying to restart target service if "/etc/target/saveconfig.json" does not exist.

Version-Release number of selected component (if applicable):
targetcli-2.1.fb31-2.el7.noarch
python-rtslib-2.1.fb45-1.el7.noarch


How reproducible:
100%

Steps to Reproduce:
1.Install targetcli

2.make sure /etc/target/saveconfig.json does not exist

3.restart target service
systemctl restart target

4.# systemctl restart target
Job for target.service failed. See 'systemctl status target.service' and 'journalctl -xn' for details.

Comment 1 Bruno Goncalves 2014-02-13 09:06:07 UTC
root.py:257:restore_from_file:IOError: [Errno 2] No such file or directory: '/etc/target/saveconfig.json'

Traceback (most recent call last):
  File "/usr/bin/targetctl", line 81, in <module>
    main()
  File "/usr/bin/targetctl", line 78, in main
    funcs[sys.argv[1]](savefile)
  File "/usr/bin/targetctl", line 45, in restore
    errors = RTSRoot().restore_from_file(restore_file=from_file)
  File "/usr/lib/python2.7/site-packages/rtslib/root.py", line 257, in restore_from_file
    with open(restore_file, "r") as f:
IOError: [Errno 2] No such file or directory: '/etc/target/saveconfig.json'

Local variables in innermost frame:
restore_file: '/etc/target/saveconfig.json'
self: <rtslib.root.RTSRoot object at 0x7fa9b8e16290>
abort_on_error: False
clear_existing: True

Comment 3 Bruno Goncalves 2014-02-26 12:55:25 UTC
Verified with:

targetcli-2.1.fb34-1.el7.noarch
python-rtslib-2.1.fb46-1.el7.noarch


# systemctl restart target
#

-----


Feb 26 07:52:15 dell-pe840-02 systemd: Stopping Restore LIO kernel target configuration...
Feb 26 07:52:15 dell-pe840-02 systemd: Starting Restore LIO kernel target configuration...
Feb 26 07:52:15 dell-pe840-02 target: No saved config file at /etc/target/saveconfig.json, ok, exiting
Feb 26 07:52:15 dell-pe840-02 systemd: Started Restore LIO kernel target configuration.

Comment 4 Ludek Smid 2014-06-13 11:25:58 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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