The Capacity section and the Pools page on the Ceph dashboard now work fine
Previously, the inability to access OSD settings through the dashboard API impaired the monitoring and configuration capabilities in a live production environment. The Pools page and API also failed. As a result, the capacity section in the Ceph dashboard did not display the capacity and pool information correctly.
With this fix, the code is changed a correct handler for checking invalid values in API calls is added and hence the Capacity section, Pools and the APIs work fine.
After upgrading from Ceph 5.3 to Ceph 7 (18.2.0-192.el9cp), we encountered multiple issues on the Ceph Dashboard, particularly with the "Capacity" section not displaying and resulting in error 500 - internal server errors.
### Error Details:
With dashboard debug enabled, the following error is seen in the logs when the system accesses the /api/osd/settings endpoint:
Traceback (most recent call last):
File "/usr/share/ceph/mgr/dashboard/controllers/osd.py", line 173, in settings
'nearfull_ratio': results['nearfull_ratio'],
TypeError: string indices must be integers
This error suggests that the 'results' variable, which should be a dictionary, is being treated as a string, leading to a TypeError when trying to access 'nearfull_ratio'.
### Environment Details:
- **Ceph Version:** 7.0 (18.2.0-192.el9cp)
- **Dashboard:** Ceph Dashboard included in the above Ceph version
- **Environment:** Live production environment
- **Test Environment:** Not affected; test environment with the same upgrade procedure works correctly
### Steps to Reproduce:
1. Upgrade from Ceph 5.3 to Ceph 7 (18.2.0-192.el9cp)
2. Access the Ceph Dashboard
3. Navigate to the "Capacity" section or trigger the /api/osd/settings endpoint
4. Observe error 500 and TypeError in logs
### Impact:
The Ceph Dashboard's "Capacity" section does not display, and the inability to access OSD settings via the dashboard API impairs the monitoring and configuration capabilities in a live production environment.
### Upstream Reference:
This issue appears to be related to an upstream bug tracked here: https://tracker.ceph.com/issues/62089
The upstream bug suggests that the issue arises due to the results variable being treated as a string instead of a dictionary.
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 7.1 security, bug fix, enhancement, and known issue updates), 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-2025:1770
After upgrading from Ceph 5.3 to Ceph 7 (18.2.0-192.el9cp), we encountered multiple issues on the Ceph Dashboard, particularly with the "Capacity" section not displaying and resulting in error 500 - internal server errors. ### Error Details: With dashboard debug enabled, the following error is seen in the logs when the system accesses the /api/osd/settings endpoint: Traceback (most recent call last): File "/usr/share/ceph/mgr/dashboard/controllers/osd.py", line 173, in settings 'nearfull_ratio': results['nearfull_ratio'], TypeError: string indices must be integers This error suggests that the 'results' variable, which should be a dictionary, is being treated as a string, leading to a TypeError when trying to access 'nearfull_ratio'. ### Environment Details: - **Ceph Version:** 7.0 (18.2.0-192.el9cp) - **Dashboard:** Ceph Dashboard included in the above Ceph version - **Environment:** Live production environment - **Test Environment:** Not affected; test environment with the same upgrade procedure works correctly ### Steps to Reproduce: 1. Upgrade from Ceph 5.3 to Ceph 7 (18.2.0-192.el9cp) 2. Access the Ceph Dashboard 3. Navigate to the "Capacity" section or trigger the /api/osd/settings endpoint 4. Observe error 500 and TypeError in logs ### Impact: The Ceph Dashboard's "Capacity" section does not display, and the inability to access OSD settings via the dashboard API impairs the monitoring and configuration capabilities in a live production environment. ### Upstream Reference: This issue appears to be related to an upstream bug tracked here: https://tracker.ceph.com/issues/62089 The upstream bug suggests that the issue arises due to the results variable being treated as a string instead of a dictionary.