Summary: | sys-block/targetcli-9999 fails to backup old configuration - errno 13 (permission denied) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | toon <toon> |
Component: | [OLD] Core system | Assignee: | Alexey Shvetsov <alexxy> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | bircoph, cluster, hyedad, mail, ondrej-gentoo, python |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | emerge --info |
Description
toon
2015-10-05 09:03:56 UTC
Created attachment 413772 [details]
emerge --info
Guys, it is worse than I already reported. Today I rebooted the system after an emerge update. After the reboot the target config was totally gone. I entered the config again using targetcli and did a saveconfig. The output was reassuring( for the config files that is... But a closer look revealed that the new config files were created but not written: /iscsi/iqn.20...station/tpgt1> cd / /> ls o- / ............................................................................... [...] o- backstores .................................................................... [...] | o- fileio ......................................................... [0 Storage Object] | o- iblock ......................................................... [1 Storage Object] | | o- iqn.2015-10.nl.vanvergehaald:ocdata1 ........ [/dev/mapper/vg1-ocdata1 activated] | o- pscsi .......................................................... [0 Storage Object] | o- rd_dr .......................................................... [0 Storage Object] | o- rd_mcp ......................................................... [0 Storage Object] o- ib_srpt ................................................................. [0 Targets] o- iscsi .................................................................... [1 Target] | o- iqn.2015-10.nl.vanvergehaald:werkstation .................................. [1 TPG] | o- tpgt1 ................................................................. [enabled] | o- acls .................................................................. [1 ACL] | | o- iqn.2015-11.nl.vanvergehaald:owncloud ........................ [1 Mapped LUN] | | o- mapped_lun0 ................................................... [lun0 (rw)] | o- luns .................................................................. [1 LUN] | | o- lun0 [iblock/iqn.2015-10.nl.vanvergehaald:ocdata1 (/dev/mapper/vg1-ocdata1)] | o- portals ............................................................ [1 Portal] | o- 192.168.3.6:3260 ........................................ [OK, iser disabled] o- loopback ................................................................ [0 Targets]/> saveconfig WARNING: Saving werkstation current configuration to disk will overwrite your boot settings. The current target configuration will become the default boot config. Are you sure? Type 'yes': yes Making backup of loopback/ConfigFS with timestamp: 2015-10-11_18:53:09.861411 Traceback (most recent call last): File "/usr/sbin/tcm_fabric", line 141, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Successfully updated default config /etc/target/loopback_start.sh Making backup of srpt/ConfigFS with timestamp: 2015-10-11_18:53:09.861411 Traceback (most recent call last): File "/usr/sbin/tcm_fabric", line 141, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Successfully updated default config /etc/target/srpt_start.sh Making backup of LIO-Target/ConfigFS with timestamp: 2015-10-11_18:53:09.861411 Traceback (most recent call last): File "/usr/sbin/lio_dump", line 141, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Generated LIO-Target config: /etc/target/backup/lio_backup-2015-10-11_18:53:09.861411.sh Making backup of Target_Core_Mod/ConfigFS with timestamp: 2015-10-11_18:53:09.861411 Traceback (most recent call last): File "/usr/sbin/tcm_dump", line 141, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Generated Target_Core_Mod config: /etc/target/backup/tcm_backup-2015-10-11_18:53:09.861411.sh Successfully updated default config /etc/target/lio_start.sh Successfully updated default config /etc/target/tcm_start.sh # ls -l /etc/target/ total 4 drwxr-xr-x 2 root root 4096 11 okt 18:53 backup -rwxr-xr-x 1 root root 0 11 okt 18:53 lio_start.sh -rw-r--r-- 1 root root 0 11 okt 18:53 loopback_start.sh -rw-r--r-- 1 root root 0 11 okt 18:53 srpt_start.sh -rwxr-xr-x 1 root root 0 11 okt 18:53 tcm_start.sh This is not good. There seems to be something very wrong with the build of this package. I ran into this today as well. The best I can tell it is a change to python-2.7 and how it executes some of its scripts. Try the following cd /usr/lib64/python2.7/site-packages Look at the tcm and lio python files. If they are like mine, they have permissions set to 644. Try chmod 755 tcm_* lio_* Reboot and see if things are working better. I'm still not sure all is well, but my targets showed up again. Hi Karl, I can confirm that changing permissions makes it work on my system. When I reinstall sys-block/lio-utils, the files /usr/lib64/python2.7/site-packages/{tcm,lio}_* have 644 permission and issuing 'saveconfig' inside targetcli results in configuration and backups of configuration to be created without content (zero-sized files). Changing permission for following two files makes the 'saveconfig' work as expected (generating configuration that gets loaded after boot). -rwxr-xr-x. 1 root root 9209 Dec 13 00:10 /usr/lib64/python2.7/site-packages/lio_dump.py -rwxr-xr-x. 1 root root 10950 Dec 13 00:10 /usr/lib64/python2.7/site-packages/tcm_dump.py Bug 565824 - "sys-block/lio-utils - improper mode on required utility scripts" looks like the same issue/solution. *** This bug has been marked as a duplicate of bug 565824 *** |