Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1815160

Summary: Failed to execute RBD [errno 22] error getting id for image
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Anton Nesterov <anestero>
Component: Ceph-DashboardAssignee: Ernesto Puerta <epuertat>
Status: CLOSED ERRATA QA Contact: Preethi <pnataraj>
Severity: medium Docs Contact: Ranjini M N <rmandyam>
Priority: medium    
Version: 4.0CC: ceph-eng-bugs, ceph-qe-bugs, epuertat, rmandyam, tchandra, tserlin, vereddy
Target Milestone: ---   
Target Release: 5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: wip, rbd
Fixed In Version: ceph-15.2.4-4.el8cp Doc Type: Enhancement
Doc Text:
.The {storage-product} Dashboard now supports RBD v1 images Previously, the {storage-product} Dashboard displayed and supported RBD v2 format images only. With this release, users can now manage and migrate their v1 RBD images to v2 RBD images by setting the `RBD_FORCE_ALLOW_V1` to `1`. See the link:{dashboard-guide}#anagement-of-block-devices-using-the-ceph-dashboard[_Management of block devices using the Ceph dashboard_] section in the _{storage-product} Dashboard Guide_ for more information.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-30 08:23:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1959686    
Attachments:
Description Flags
Image list for version 2 none

Description Anton Nesterov 2020-03-19 16:40:48 UTC
Description of problem:
The page Block -> Images fails to display v1 images and throws 
Failed to execute RBD [errno 22] error getting id for image


Version-Release number of selected component (if applicable):
# ceph versions
{
    "mon": {
        "ceph version 14.2.4-51.el7cp (db63624068590e593c47150c7574d08c1ec0d3e4) nautilus (stable)": 3
    },
    "mgr": {
        "ceph version 14.2.4-51.el7cp (db63624068590e593c47150c7574d08c1ec0d3e4) nautilus (stable)": 3
    },
    "osd": {
        "ceph version 14.2.4-51.el7cp (db63624068590e593c47150c7574d08c1ec0d3e4) nautilus (stable)": 132
    },
    "mds": {},
    "overall": {
        "ceph version 14.2.4-51.el7cp (db63624068590e593c47150c7574d08c1ec0d3e4) nautilus (stable)": 138
    }
}


How reproducible:


Steps to Reproduce:
1. Deploy dashboard
2. Go to Block -> Images
3. Get recurrent banner "Failed to execute RBD [errno 22] error getting id for image"

Actual results:
Images are not displayed


Expected results:
Images are displayed 

Additional info:
Seems to be caused by images v1 not having IDs

Upstream bugs (the only workaround is to convert image to v2):
==============================================================
https://tracker.ceph.com/issues/37999
https://tracker.ceph.com/issues/36354

ceph-mgr log:
=============

2020-03-19 17:19:43.673 7f74c8cf8700  0 mgr[dashboard] Error while calling fn=<function _rbd_pool_list at 0x7f74e871c5f0> ex=[errno 22] error getting id for image image-name
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/tools.py", line 147, in run
    val = self.fn(*self.args, **self.kwargs)
  File "/usr/share/ceph/mgr/dashboard/controllers/rbd.py", line 193, in _rbd_pool_list
    stat = cls._rbd_image(ioctx, pool_name, name)
  File "/usr/share/ceph/mgr/dashboard/controllers/rbd.py", line 108, in _rbd_image
    stat['id'] = img.id()
  File "rbd.pyx", line 2996, in rbd.Image.id
InvalidArgument: [errno 22] error getting id for image image-name
2020-03-19 17:19:43.677 7f74d1947700  0 mgr[dashboard] dashboard_exception_handler
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 88, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 649, in inner
    ret = func(*args, **kwargs)
  File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 842, in wrapper
    return func(*vpath, **params)
  File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 44, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 102, in handle_rbd_error
    raise DashboardException(e, component='rbd')
DashboardException: [errno 22] error getting id for image image-name

Comment 1 Anton Nesterov 2020-03-19 19:19:59 UTC
# yum info ceph-mgr-dashboard
...
Installed Packages
Name        : ceph-mgr-dashboard
Arch        : noarch
Epoch       : 2
Version     : 14.2.4
Release     : 51.el7cp
Size        : 24 M
Repo        : installed
From repo   : rhel-7-server-rhceph-4-mon-rpms
...

Comment 9 Ernesto Puerta 2020-05-26 18:22:07 UTC
To be fixed in 5.0

Comment 14 Veera Raghava Reddy 2020-11-05 19:54:04 UTC
Created attachment 1726964 [details]
Image list for version 2

Comment 15 Veera Raghava Reddy 2020-11-05 19:55:56 UTC
Verified

Comment 21 errata-xmlrpc 2021-08-30 08:23:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 5.0 bug fix and enhancement), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:3294