Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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: 2014-06-18 05:13 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


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.