Fedora Account System
Red Hat Associate
Red Hat Customer
targetcli-2.1.fb49-1.fc30.noarch kernel-5.0.0-0.rc2.git2.1.fc30.x86_64 How reproducible: always Steps to Reproduce: 1. # truncate -s 1G /tmp/xxx 2. # targetcli /backstores/fileio/ create xxx /tmp/xxx Created fileio xxx with size 1073741824 3. # targetcli /backstores/fileio/xxx info [Errno 13] Permission denied: '/sys/kernel/config/target/core/fileio_28/xxx/attrib/pi_prot_format' Also getting nice Python traceback when running targetcli interactively: # targetcli > targetcli shell version 2.1.fb49 > Copyright 2011-2013 by Datera, Inc and others. > For help on commands, type 'help'. > > /> /backstores/fileio/xxx info > Traceback (most recent call last): > File "/usr/bin/targetcli", line 122, in <module> > main() > File "/usr/bin/targetcli", line 112, in main > shell.run_interactive() > File "/usr/lib/python3.7/site-packages/configshell_fb/shell.py", line 905, in run_interactive > self._cli_loop() > File "/usr/lib/python3.7/site-packages/configshell_fb/shell.py", line 734, in _cli_loop > self.run_cmdline(cmdline) > File "/usr/lib/python3.7/site-packages/configshell_fb/shell.py", line 848, in run_cmdline > self._execute_command(path, command, pparams, kparams) > File "/usr/lib/python3.7/site-packages/configshell_fb/shell.py", line 823, in _execute_command > result = target.execute_command(command, pparams, kparams) > File "/usr/lib/python3.7/site-packages/configshell_fb/node.py", line 1406, in execute_command > return method(*pparams, **kparams) > File "/usr/lib/python3.7/site-packages/targetcli/ui_node.py", line 207, in ui_command_info > info = self.rtsnode.dump() > File "/usr/lib/python3.7/site-packages/rtslib_fb/tcm.py", line 693, in dump > d = super(FileIOStorageObject, self).dump() > File "/usr/lib/python3.7/site-packages/rtslib_fb/tcm.py", line 314, in dump > d = super(StorageObject, self).dump() > File "/usr/lib/python3.7/site-packages/rtslib_fb/node.py", line 225, in dump > attrs[item] = int(self.get_attribute(item)) > File "/usr/lib/python3.7/site-packages/rtslib_fb/node.py", line 168, in get_attribute > return fread(path) > File "/usr/lib/python3.7/site-packages/rtslib_fb/utils.py", line 100, in fread > with open(path, 'r') as file_fd: > PermissionError: [Errno 13] Permission denied: '/sys/kernel/config/target/core/fileio_28/xxx/attrib/pi_prot_format' Additional info: Not necessarily targetcli bug in its nature, filing for consideration and better error handling.
Works fine with kernel-4.20.3-200.fc29
failed since kernel-5.x.x, issue reproduced also with kernel-5.0.0-0.rc4.git3.1.fc30
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6baca7601bdee2e57f20c45d63eb53b89b33e816 Looks like this was changed to write-only intentionally and the code is opening with read. This is a userspace regression so I can see about getting this reverted but it also sounds like this should be fixed in targetcli as well.
This is going to be fixed in kernel 5.0 https://marc.info/?l=target-devel&m=154930519830248&w=2
This report has not received an update in over 90 days. If this issue is still relevant to you, please do not hesitate to update this report with any relevant details on recent investigative steps or changes and we will absolutely work to understand how to best move forward. Otherwise, this bug report will need to be closed in 30 days. No worries, however; should you need still assistance after the report is closed, please do not hesitate to create a new bug report referencing this report and with any new details on the matter. NOTE: This is an automated mass update.