open-iscsi / tcmu-runner

A daemon that handles the userspace side of the LIO TCM-User backstore.
Apache License 2.0
189 stars 149 forks source link

user:glfs create fail when use new version of targetcli and python-rtslib. #426

Open parkch0708 opened 6 years ago

parkch0708 commented 6 years ago

Hello.

I tried to create user:glfs backstore, but failed with this message.

/> backstores/user:glfs create extreme 100g extreme@192.168.2.21/block.img 2018-05-31 21:48:57.572 13728 [DEBUG] handle_netlink:208: cmd 1. Got header version 1. Supported 2. 2018-05-31 21:48:57.572 13728 [DEBUG] dev_added:765 glfs/extreme: Got block_size 512, size in bytes 107374182400 Created user-backed storage object extreme size 107374182400. /> exit Global pref auto_save_on_exit=true Traceback (most recent call last): File "/usr/bin/targetcli", line 122, in main() File "/usr/bin/targetcli", line 118, in main root_node.ui_command_saveconfig() File "/usr/lib/python2.7/site-packages/targetcli/ui_root.py", line 138, in ui_command_saveconfig self.rtsroot.save_to_file(savefile) File "/usr/lib/python2.7/site-packages/rtslib_fb/root.py", line 357, in save_to_file saveconf = self.dump() File "/usr/lib/python2.7/site-packages/rtslib_fb/root.py", line 241, in dump d['storage_objects'] = [so.dump() for so in self.storage_objects] File "/usr/lib/python2.7/site-packages/rtslib_fb/tcm.py", line 886, in dump d['control'] = self.control_tuples File "/usr/lib/python2.7/site-packages/rtslib_fb/tcm.py", line 851, in _get_control_tuples val = self._parse_info('MaxDataAreaMB') File "/usr/lib/python2.7/site-packages/rtslib_fb/tcm.py", line 187, in _parse_info % key, ' '.join(info.split())).group(1) AttributeError: 'NoneType' object has no attribute 'group'

After that, I reinstall python-rtslib and targetcli (use old version. rtslib - 2.1.fb63-5, targetcli - 2.1.fb46-1),

and I could make user:glfs backstore.

Here is the version information of targetcli and python-rtslib

Fail - targetcli 2.1.fb46-4, python-rtslib 2.1.fb63-11

Success - targetcli - 2.1.fb46-1, rtslib - 2.1.fb63-5

mikechristie commented 6 years ago

@pkalever you fixed this in rtslib-fb master branch right?

mikechristie commented 6 years ago

@parkch0708 It might be this patch

https://github.com/open-iscsi/rtslib-fb/commit/eff378068812503ee2394baffba37b5cadd9a0f7

Also, I think the preferred glfs management tool is the gluster block tool. It will not help on this bug, but I think in general it might be easier to use.