Bug 1293833

Summary: [abrt] targetcli: utils.py:90:fread:FileNotFoundError: [Errno 2] No such file or directory: '/sys/block/sdb/size'
Product: [Fedora] Fedora Reporter: Yaniv Kaul <ykaul>
Component: targetcliAssignee: Andy Grover <agrover>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: agrover
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ae95d885166c73bb27b3ec7d886861ee8ee1e8b9
Whiteboard: abrt_hash:b03401d7b0c1bb72fc01141c8124160624b43227;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-20 17:19:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Yaniv Kaul 2015-12-23 08:58:16 UTC
Version-Release number of selected component:
targetcli-2.1.fb41-3.fc23

Additional info:
reporter:       libreport-2.6.3
cmdline:        /usr/bin/python3 /bin/targetcli
executable:     /bin/targetcli
kernel:         4.2.6-301.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
utils.py:90:fread:FileNotFoundError: [Errno 2] No such file or directory: '/sys/block/sdb/size'

Traceback (most recent call last):
  File "/bin/targetcli", line 121, in <module>
    main()
  File "/bin/targetcli", line 111, in main
    shell.run_interactive()
  File "/usr/lib/python3.4/site-packages/configshell_fb/shell.py", line 894, in run_interactive
    self._cli_loop()
  File "/usr/lib/python3.4/site-packages/configshell_fb/shell.py", line 723, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python3.4/site-packages/configshell_fb/shell.py", line 837, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python3.4/site-packages/configshell_fb/shell.py", line 812, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python3.4/site-packages/configshell_fb/node.py", line 1411, in execute_command
    return method(*pparams, **kparams)
  File "/usr/lib/python3.4/site-packages/configshell_fb/node.py", line 710, in ui_command_ls
    tree = self._render_tree(target, depth=depth)
  File "/usr/lib/python3.4/site-packages/configshell_fb/node.py", line 861, in _render_tree
    + self._render_tree(children[i], margin, depth)
  File "/usr/lib/python3.4/site-packages/configshell_fb/node.py", line 861, in _render_tree
    + self._render_tree(children[i], margin, depth)
  File "/usr/lib/python3.4/site-packages/configshell_fb/node.py", line 765, in _render_tree
    (description, is_healthy) = root.summary()
  File "/usr/lib/python3.4/site-packages/targetcli/ui_backstore.py", line 543, in summary
    return ("%s (%s) %s%s %s" % (so.udev_path, bytes_to_human(so.size),
  File "/usr/lib/python3.4/site-packages/rtslib_fb/tcm.py", line 703, in _get_size
    return get_size_for_disk_name(self._parse_info('device')) * int(self._parse_info('SectorSize'))
  File "/usr/lib/python3.4/site-packages/rtslib_fb/utils.py", line 152, in get_size_for_disk_name
    return get_size("/sys/block/%s" % name)
  File "/usr/lib/python3.4/site-packages/rtslib_fb/utils.py", line 141, in get_size
    sect_size = int(fread("%s/size" % path))
  File "/usr/lib/python3.4/site-packages/rtslib_fb/utils.py", line 90, in fread
    with open(path, 'r') as file_fd:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/block/sdb/size'

Local variables in innermost frame:
path: '/sys/block/sdb/size'

Comment 1 Yaniv Kaul 2015-12-23 08:58:21 UTC
Created attachment 1108870 [details]
File: backtrace

Comment 2 Yaniv Kaul 2015-12-23 08:58:23 UTC
Created attachment 1108871 [details]
File: environ

Comment 3 Fedora End Of Life 2016-11-24 14:28:35 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2016-12-20 17:19:53 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.