Bug #46138
closedmgr/dashboard: Error creating iSCSI target
0%
Description
On the latest `master` (pacific), I get the following error when trying to create an iSCSI target in Dashboard:
From mgr logs:
Jun 22 12:20:32 master bash[16203]: dashboard.rest_client.RequestException: iscsi REST API failed request with status code 500 Jun 22 12:20:32 master bash[16203]: (b'{"message":"Unhandled exception: [errno 1] RBD permission error (error openi' Jun 22 12:20:32 master bash[16203]: b'ng image b\'rbd1\' at snapshot None)"}\n') Jun 22 12:20:32 master bash[16203]: During handling of the above exception, another exception occurred: Jun 22 12:20:32 master bash[16203]: Traceback (most recent call last): Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 94, in dashboard_exception_handler Jun 22 12:20:32 master bash[16203]: return handler(*args, **kwargs) Jun 22 12:20:32 master bash[16203]: File "/usr/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__ Jun 22 12:20:32 master bash[16203]: return self.callable(*self.args, **self.kwargs) Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 665, in inner Jun 22 12:20:32 master bash[16203]: ret = func(*args, **kwargs) Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 860, in wrapper Jun 22 12:20:32 master bash[16203]: return func(*vpath, **params) Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 467, in wrapper Jun 22 12:20:32 master bash[16203]: raise ex Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 457, in wrapper Jun 22 12:20:32 master bash[16203]: status, value = task.wait(self.wait_for) Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/tools.py", line 648, in wait Jun 22 12:20:32 master bash[16203]: raise self.exception Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/tools.py", line 559, in _run Jun 22 12:20:32 master bash[16203]: val = self.task.fn(*self.task.fn_args, **self.task.fn_kwargs) # type: ignore Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/controllers/iscsi.py", line 300, in create Jun 22 12:20:32 master bash[16203]: clients, groups, 0, 100, config, settings) Jun 22 12:20:32 master bash[16203]: File "/usr/share/ceph/mgr/dashboard/controllers/iscsi.py", line 767, in _create Jun 22 12:20:32 master bash[16203]: raise DashboardException(msg=content_message, component='iscsi')
Files
Updated by Ricardo Marques almost 4 years ago
This is not a Dashboard issue because I get the same error when using `gwcli` tool:
master:~ # cephadm enter --name iscsi.iscsi_service.master.qrbvqp INFO:cephadm:Inferring fsid 89521eb2-b471-11ea-b9e7-525400fa1bc3 [ceph: root@master /]# gwcli /disks> attach mypool rbd1 Failed : Unhandled exception: [errno 1] RBD permission error (error opening image b'rbd1' at snapshot None)
Updated by Ricardo Marques almost 4 years ago
- Project changed from mgr to Orchestrator
- Category changed from 141 to cephadm
Updated by Matthew Oliver almost 4 years ago
- Assignee set to Matthew Oliver
oh interesting, maybe there's another cap we're missing? We did lock it down some. Let me have a play and attempt to recreate.
Updated by Matthew Oliver almost 4 years ago
I managed to recreate the issue. We lock down the caps to just have access to the pool in the config. If I create an RBD image in that pool it all works. If I create a separate rbd pool, create an image and try and attach that it'll fail as did in this bug.
So are you attempting to attach an image from another pool?
In my test env, I've created an iscsi pool for ceph-iscsi to use and so the generated cap is:
client.iscsi.test.ironic-moliver.vakabs
key: AQBT8PNe5/aHCBAAkEFPOayDCjBp9b7OpRXTFA==
caps: [mon] profile rbd, allow command "osd blacklist", allow command "config-key get" with "key" prefix "iscsi/"
caps: [osd] allow rwx pool=iscsi
We could just remove the `pool=iscsi` and open it up to all pools. In fact I did just that. if I remove the pool statement from osd. It all works.
Do we want to remove it? Are we too locked down?
Updated by Sebastian Wagner almost 4 years ago
[12:11:22] <Lenz[m]> SebastianW: I'd assume that we only show pools that have the "rbd" application label attached in the iSCSI target creation [12:12:14] <SebastianW> ok!
I think we have to remove it. yes
Updated by Sebastian Wagner almost 4 years ago
- Status changed from New to Pending Backport
Updated by Sebastian Wagner almost 4 years ago
- Status changed from Pending Backport to Resolved
- Target version set to v15.2.5