Project

General

Profile

Bug #45252

Updated by Kiefer Chang almost 4 years ago

How to reproduce: 

 * Enable cephadm, create a pool and enable rbd application on it. 
 * Create an iSCSI container with that pool. Setup user/password/trusted_ip accordingly. 
 * Setup rbd-target-api's endpoint to Dashboard, e.g.: 
 <pre> 
 ceph dashboard iscsi-gateway-add http://<user>:<pass>@<ip>:<port>  
 config-key set "mgr/dashboard/_iscsi_config" "{\"gateways\": {\"master.mini.com\": {\"service_url\": \"http://admin:admin@192.168.121.20:5000\"}}}" 
 </pre> 
 * Restart mgr container to let Dashboard load the iSCSI config 
 * Go to Block/iSCSI/Targets page, create a target. Error in rbd-target-api log: 

 <pre> 
 2020-04-24 05:15:51,513      ERROR [rbd-target-api:113:unhandled_exception()] - Unhandled Exception 
 Traceback (most recent call last): 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/node.py", line 71, in _create_in_cfs_ine 
     os.mkdir(self.path) 
 FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/config/target/iscsi' 

 During handling of the above exception, another exception occurred: 

 Traceback (most recent call last): 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/fabric.py", line 156, in _check_self 
     self._create_in_cfs_ine('any') 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/node.py", line 74, in _create_in_cfs_ine 
     % self.__class__.__name__) 
 rtslib_fb.utils.RTSLibError: Could not create ISCSIFabricModule in configFS 

 During handling of the above exception, another exception occurred: 

 Traceback (most recent call last): 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/utils.py", line 429, in modprobe 
     kmod.Kmod().modprobe(module) 
   File "kmod/kmod.pyx", line 106, in kmod.kmod.Kmod.modprobe 
   File "kmod/kmod.pyx", line 82, in lookup 
 kmod.error.KmodError: Could not modprobe 

 During handling of the above exception, another exception occurred: 

 Traceback (most recent call last): 
   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request 
     rv = self.dispatch_request() 
   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request 
     return self.view_functions[rule.endpoint](**req.view_args) 
   File "/usr/bin/rbd-target-api", line 106, in decorated 
     return f(*args, **kwargs) 
   File "/usr/bin/rbd-target-api", line 300, in target 
     target.manage('init') 
   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/target.py", line 710, in manage 
     'mutual_password_encryption_enabled']) 
   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/discovery.py", line 14, in set_discovery_auth_lio 
     iscsi_fabric.clear_discovery_auth_settings() 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/fabric.py", line 224, in clear_discovery_auth_settings 
     self._check_self() 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/fabric.py", line 158, in _check_self 
     modprobe(self.kernel_module) 
   File "/usr/lib/python3.6/site-packages/rtslib_fb/utils.py", line 431, in modprobe 
     raise RTSLibError("Could not load module: %s" % module) 
 rtslib_fb.utils.RTSLibError: Could not load module: iscsi_target_mod 
 2020-04-24 05:15:51,514       INFO [_internal.py:87:_log()] - ::ffff:192.168.121.1 - - [24/Apr/2020 05:15:51] "PUT /api/target/iqn.2001-07.com.ceph:1587705336635 HTTP/1.1" 500 - 
 </pre> 


 Looks like lio module files are not bind-mounted inside the container. 
 Tested with these images: 
 * quay.io/ceph-ci/ceph:master 
 * docker.io/ceph/daemon-base     latest-master-devel 

Back