Hi, I have a problem with ISCSI target. Setting cannot be restored through targetcli / ctl. Has anyone found a way to overcome this problem (apart from running all the commands in targetcli after reboot)? Thanks in advance.
$this->bbcode_second_pass_code('', '
[root@nas ~]# targetctl restore /etc/target/saveconfig.json
OSError: [Errno 22] Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/rtslib/node.py", line 140, in set_attribute
fwrite(path, "%s" % str(value))
File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 67, in fwrite
file_fd.write(str(string))
OSError: [Errno 22] Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/targetctl", line 87, in <module>
main()
File "/usr/bin/targetctl", line 84, in main
funcs[sys.argv[1]](savefile)
File "/usr/bin/targetctl", line 47, in restore
errors = RTSRoot().restore_from_file(restore_file=from_file)
File "/usr/lib/python3.4/site-packages/rtslib/root.py", line 260, in restore_from_file
abort_on_error=abort_on_error)
File "/usr/lib/python3.4/site-packages/rtslib/root.py", line 201, in restore
set_attributes(so_obj, so.get('attributes', {}))
File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 440, in set_attributes
obj.set_attribute(name, value)
File "/usr/lib/python3.4/site-packages/rtslib/node.py", line 142, in set_attribute
msg = msg[1]
TypeError: 'OSError' object is not subscriptable
')