# Ceph Dashboard returns HTTP 500 on RGW buckets with a lifecycle: "NameError: name 'xmltodict' is not defined", plus a separate multi-realm bug

> On Ceph Tentacle, and Squid from 19.2.3, installed from Debian or Ubuntu packages, opening an RGW bucket that has a lifecycle configuration in the Dashboard can fail with HTTP 500 and a NameError for xmltodict in the mgr log. The upstream deb packages do not declare the Python dependency that the Fedora and RHEL 9+ RPM packages do. How to confirm it, the fix, and a second, separate Dashboard bug on multi-realm setups that is still under review upstream.

- URL: https://ngnext.tech/knowledge/ceph-dashboard-500-rgw-lifecycle-xmltodict
- Published: 2026-11-28
- Updated: 2026-11-29
- Author: Nishant Gauraw, [NG-NeXT](https://ngnext.tech)
- Tags: ceph, ceph-dashboard, radosgw, s3, lifecycle, debian, ubuntu

If you run the Ceph Object Gateway (RGW) and the Dashboard shows an error 500 as soon as you open a bucket that has a lifecycle rule, look in the active mgr's log for this traceback:

```
[dashboard ERROR dashboard.services.exception] Internal Server Error
Traceback (most recent call last):
  ...
  File "/usr/share/ceph/mgr/dashboard/controllers/rgw.py", line 639, in get
    result['lifecycle'] = self._get_lifecycle(bucket_name, daemon_name, owner)
  File "/usr/share/ceph/mgr/dashboard/controllers/rgw.py", line 471, in _get_lifecycle
    return rgw_client.get_lifecycle(bucket_name)
  File "/usr/share/ceph/mgr/dashboard/rest_client.py", line 538, in func_wrapper
    return func(
  File "/usr/share/ceph/mgr/dashboard/services/rgw_client.py", line 760, in get_lifecycle
    lifecycle = xmltodict.parse(remove_namespace(result), process_namespaces=False)
NameError: name 'xmltodict' is not defined
[dashboard ERROR dashboard.tools] [...] [GET] [500] [0.359s] [my-dashboard-user] [513.0B] /api/rgw/bucket/my-bucket-2
```

That is from a [thread on r/ceph posted on 12 November](https://www.reddit.com/r/ceph/comments/1xu84y4/ceph_dashboard_shows_error_500_for_buckets_with/). The poster runs Ceph for S3 workloads, saw the problem on v19.2.x (Squid) and again on v20.2.4 (Tentacle), and found that on Tentacle the Dashboard often became completely unresponsive until the page was refreshed. The log also showed `RGW REST API failed GET req status: 404` lines that the poster could not explain.

A reply two days later named the cause correctly: a missing Python package, not a configuration mistake. The poster installed it and thanked them, but reported that the page still worked only partly and often froze. That turned out to be a second, separate problem, a genuine Dashboard bug covered further down. This post puts both in one place with the evidence, because the first one is a packaging gap that is likely to catch others who install Ceph from deb packages.

## Why the module is missing

The Dashboard's RGW client parses the bucket lifecycle XML with the Python library `xmltodict`. It imports the library inside a `try` block, so a missing library does not stop the module from loading; it only writes one error message through Python's logging at import time. This is the code in [`rgw_client.py`](https://github.com/ceph/ceph/blob/v20.2.4/src/pybind/mgr/dashboard/services/rgw_client.py) in Tentacle v20.2.4; Squid from 19.2.3 onwards has the same block without the `# type: ignore` comment, and earlier Squid releases do not have it:

```
try:
    import xmltodict  # type: ignore
except ModuleNotFoundError:
    logging.error("Module 'xmltodict' is not installed.")
```

The first real use of the name then fails with `NameError`. The line numbers in the traceback above match the v20.2.4 source exactly: `rgw.py` line 639 and `rgw_client.py` line 760.

The dependency came in with [ceph/ceph PR #61781](https://github.com/ceph/ceph/pull/61781), "mgr/dashboard: fix lifecycle get request" ([tracker #70128](https://tracker.ceph.com/issues/70128), with a Squid backport tracked as [#70556](https://tracker.ceph.com/issues/70556)). That PR added `xmltodict` to the Dashboard's `requirements.txt`, to `ceph.spec.in` and to `debian/control`. The two packaging changes are not equivalent:

- In [`ceph.spec.in`](https://github.com/ceph/ceph/blob/v20.2.4/ceph.spec.in), the `ceph-mgr-dashboard` RPM gets `Requires: python%{python3_pkgversion}-xmltodict`, inside a block that applies to Fedora and RHEL 9 or later.
- In [`debian/control`](https://github.com/ceph/ceph/blob/v20.2.4/debian/control), `python3-xmltodict` is listed only under `Build-Depends`, with the `<pkg.ceph.check>` build profile, which is used for running tests at build time. The `ceph-mgr-dashboard` binary package itself depends only on `ceph-mgr` and `${python3:Depends}`.
- That `${python3:Depends}` is generated by `dh_python3`, which [`debian/rules`](https://github.com/ceph/ceph/blob/v20.2.4/debian/rules) runs with `--requires=debian/ceph-mgr-dashboard.requires`. The [`ceph-mgr-dashboard.requires`](https://github.com/ceph/ceph/blob/v20.2.4/debian/ceph-mgr-dashboard.requires) file lists bcrypt, CherryPy, PyJWT, requests, Routes and a few others, but not xmltodict. The PR added the library to the Dashboard's `requirements.txt`, but not to this file.

You can see the result in the upstream repositories. As read on 28 November 2026, the `Packages` index at download.ceph.com for [Tentacle on Ubuntu 24.04 "noble"](https://download.ceph.com/debian-tentacle/dists/noble/main/binary-amd64/Packages) lists `ceph-mgr-dashboard` 20.2.5-1noble with these dependencies:

```
Depends: ceph-mgr (= 20.2.5-1noble), python3-bcrypt, python3-ceph-common, python3-cherrypy3, python3-jwt, python3-more-itertools, python3-openssl, python3-prettytable, python3-requests, python3-routes, python3-yaml
```

The Tentacle 20.2.5 and Squid 19.2.7 builds for Debian 12 "bookworm" list the same Python dependencies, each with its own `ceph-mgr` version pin. There is no `python3-xmltodict`, so the Dashboard package does not pull it in; it is only there if something else installed it. The traceback in the thread shows CherryPy under `/lib/python3/dist-packages/`, a path that points to a Debian or Ubuntu package install.

Other packagings may differ. If you use your distribution's or your hypervisor vendor's Ceph packages, check the actual package rather than assuming; the commands are below. The RPM packaging for Fedora and RHEL 9 or later does declare the dependency, as shown above.

## Why the NameError appears only for buckets with a lifecycle

The Dashboard asks RGW for `GET /<bucket>?lifecycle` before it parses anything. For a bucket without a lifecycle configuration, RGW answers 404 with the code `NoSuchLifecycleConfiguration`, and the client returns `None` (no lifecycle) without ever touching `xmltodict`. Only when a lifecycle exists does the code reach `xmltodict.parse()`, and that is where it fails. This matches what the poster saw: the error appeared as soon as a lifecycle was set. The poster also mentioned bucket policies; in the v20.2.4 code, reading a bucket policy does not use `xmltodict`, so if a bucket with only a policy and no lifecycle fails, look for a different traceback (the second bug below is one candidate).

The bucket notification code in the same file also calls `xmltodict.parse()`, so expect the Dashboard's bucket notification features to fail in the same way.

The unexplained 404 lines are most likely harmless. For each bucket, the Dashboard also asks RGW for the bucket's encryption, policy and replication settings. When one of these is not configured, RGW answers 404 with a specific code (for example `ServerSideEncryptionConfigurationNotFoundError`, `NoSuchBucketPolicy` or `ReplicationConfigurationNotFoundError`; the object lock check does the same with `ObjectLockConfigurationNotFoundError`), the Dashboard's REST client logs every 4xx or 5xx answer as `RGW REST API failed ... status: 404` (or whatever the status is), and the calling function then treats that code as "not configured". The source shows this handling in [`rgw_client.py`](https://github.com/ceph/ceph/blob/v20.2.4/src/pybind/mgr/dashboard/services/rgw_client.py). The log line does not say which request failed, so this is the likely explanation, not a proven one for that specific log.

## How to confirm it

On every host that runs a ceph-mgr daemon, active or standby:

```
# Quick first check: can the system Python 3 import it?
# A ModuleNotFoundError naming xmltodict means the library is missing.
# (A package-based mgr embeds the system Python 3, but this is still a shell check, not the mgr itself.)
python3 -c 'import xmltodict; print(xmltodict.__file__)'

# Does the installed ceph-mgr-dashboard package declare it? Look for python3-xmltodict.
dpkg-query -s ceph-mgr-dashboard | grep '^Depends'
```

You can also search the mgr log for the message that the import writes when it fails:

```
Module 'xmltodict' is not installed.
```

Where that log lives depends on your setup: on a package-based install, a file under `/var/log/ceph/` or the systemd journal for the `ceph-mgr@<id>` unit; under cephadm, the journal for a unit named like `ceph-<fsid>@mgr.<id>`. Do not treat its absence as proof; whether that early message reaches the log depends on how logging is set up when the module is imported. The `python3` check above, together with the traceback, is the better evidence.

If you deploy with cephadm, the mgr runs from the Ceph container image, not from host packages, so the host's `python3` check above tells you nothing. The upstream [Containerfile](https://github.com/ceph/ceph/blob/v20.2.4/container/Containerfile) builds on CentOS Stream 9 and installs the RPM packages, which declare the dependency, so this specific cause is less likely there. Read the traceback in the mgr log to be sure.

## The fix

The thread gave the fix, and the poster accepted it as the cause: install the package on every mgr host, then fail over the mgr so that the Dashboard module is loaded again:

```
apt install python3-xmltodict
ceph mgr fail
```

Two details matter:

- **Every mgr host, standbys included.** If a standby without the package takes over later, the 500 comes back.
- **Install first, then fail over.** Installing the package does not re-run the import in the Dashboard module that is already active. Fail over only after every mgr host has the package, so the newly active mgr loads the Dashboard with the library present. If the error persists, restart the mgr daemon on each host, one at a time, so every one starts fresh; on a package-based install that is `systemctl restart ceph-mgr.target`.

`python3-xmltodict` is a normal package in Debian [12](https://packages.debian.org/bookworm/python3-xmltodict) and [13](https://packages.debian.org/trixie/python3-xmltodict) and in [Ubuntu 24.04](https://launchpad.net/ubuntu/+source/python-xmltodict). Add it to whatever provisions your mgr hosts (Ansible, a preseed, a package list), so a rebuilt host does not lose it.

This traceback is a Dashboard failure while displaying the lifecycle; it says nothing either way about whether the lifecycle rules are correct or being processed. While you wait for a maintenance window, you can read the configuration without the Dashboard:

```
radosgw-admin lc get --bucket=<bucket>
aws s3api get-bucket-lifecycle-configuration --bucket <bucket> --endpoint-url https://<rgw-endpoint>
```

## The second bug: multi-realm setups and "lifecycleProgress is undefined"

After installing the package, the poster found that the bucket page now worked only some of the time and still froze the Dashboard, with this message:

```
can't access property "status", i.lifecycleProgress is undefined
```

The poster traced it and filed [tracker #83204](https://tracker.ceph.com/issues/83204), "Dashboard becomes unresponsive after clicking on a bucket's policies tab". The setup has several realms, zonegroups and zones, each with its own RGW daemons. According to the report:

- When you pick the RGW daemon of a non-default realm in the Dashboard and open a bucket's Policies tab, the response contains lifecycle progress from the default realm (the report says this was confirmed on the node with `radosgw-admin lc list`, run with and without `--rgw-realm`).
- The front end freezes when it cannot find a progress entry for the selected bucket.
- On v19.2.x this showed as an error notification; on v20.2.4 the page stops responding until it is refreshed.

The Dashboard source is consistent with this. In the v20.2.4 bucket details component, the "Lifecycle progress" row is shown whenever the progress list is non-empty for any bucket, but the template then reads `lifecycleProgress.status`, which can be undefined when the selected bucket has no entry in that list. On the server side, `get_lifecycle_progress()` in `rgw_client.py` runs `radosgw-admin lc list` with no realm argument, so it reports for whatever realm the mgr's configuration resolves to by default, not for the daemon selected in the Dashboard. The current main branch adds `--rgw-realm` from the realm of the RGW client it uses, but the bucket view still asks a default admin client rather than the daemon selected in the UI; passing the selected daemon through is what PR #74004 changes.

As read on 28 and again on 29 November 2026, the tracker status is "Fix Under Review" (last updated 18 November), with backports requested for Umbrella and Tentacle, and the fix is in [ceph/ceph PR #74004](https://github.com/ceph/ceph/pull/74004), which is still open and unmerged. Until a release includes it, the reporter's own observation is only a partial workaround: the page works when you select the default realm's RGW daemon and open a bucket that has lifecycle progress, but opening a bucket without a lifecycle can freeze it again. On a multi-realm cluster, the dependable route for now is `radosgw-admin` and the S3 API.

## What I would take away

- When the Dashboard shows a 500, look for a Python traceback in the mgr log before you change any RGW or bucket configuration. Here, the traceback pointed at a missing library, not at the bucket settings.
- After a Ceph upgrade on deb packages, check that the Python libraries used by the mgr modules and features you rely on are actually installed. This particular import is wrapped in `try`, so the upgrade itself gives no warning; the module logs one error when it loads, and the `NameError` appears only when the feature is used.
- On multi-realm RGW setups, treat the Dashboard as a convenience and keep `radosgw-admin` and the S3 API as the source of truth.

## Evidence

As of 29 November 2026 (Ceph Tentacle 20.2.4 source; 20.2.5 and Squid 19.2.7 packages). We did not reproduce either bug or install the packages for this post. The source and package-index facts were read from Ceph's repositories; the user symptoms are from one forum thread.

| Claim | Status | Basis |
|---|---|---|
| Dashboard 500 with `NameError: name 'xmltodict' is not defined` on a bucket with a lifecycle, on Squid 19.2.x and Tentacle 20.2.4, after a deb install | Reported, not reproduced | [r/ceph thread of 12 Nov 2026](https://www.reddit.com/r/ceph/comments/1xu84y4/ceph_dashboard_shows_error_500_for_buckets_with/); one reporter |
| The Dashboard imports `xmltodict` inside a `try` block and the traceback line numbers match v20.2.4 (`rgw.py` 639, `rgw_client.py` 760) | Verified against a primary source | [`rgw_client.py` at v20.2.4](https://github.com/ceph/ceph/blob/v20.2.4/src/pybind/mgr/dashboard/services/rgw_client.py) |
| The dependency came in with PR #61781; the RPM requires `python3-xmltodict` on Fedora and RHEL 9+ and the Debian package does not | Verified against a primary source | [PR #61781](https://github.com/ceph/ceph/pull/61781), [`ceph.spec.in`](https://github.com/ceph/ceph/blob/v20.2.4/ceph.spec.in), [`debian/control`](https://github.com/ceph/ceph/blob/v20.2.4/debian/control) and [`ceph-mgr-dashboard.requires`](https://github.com/ceph/ceph/blob/v20.2.4/debian/ceph-mgr-dashboard.requires) |
| `ceph-mgr-dashboard` 20.2.5-1noble on download.ceph.com does not depend on `python3-xmltodict` | Verified against a primary source | [Packages index for Tentacle on noble](https://download.ceph.com/debian-tentacle/dists/noble/main/binary-amd64/Packages), read 28 and 29 Nov 2026 |
| Installing the package on every mgr host and failing over the mgr fixes the 500 | Reported, not reproduced | The reporter's account and Ceph's code paths; we did not run it |
| Second bug (multi-realm, "lifecycleProgress is undefined"): tracker #83204 "Fix Under Review"; fix in open PR #74004 | Verified against a primary source | [Tracker #83204](https://tracker.ceph.com/issues/83204) and [PR #74004](https://github.com/ceph/ceph/pull/74004), read 29 Nov 2026 |
| The reporter's observation that the page works on the default realm's daemon | Reported, not reproduced | Tracker report; partial workaround only |
| The unexplained RGW 404 log lines are most likely harmless | Not tested (our inference) | Our reading of the Dashboard code: some unconfigured optional bucket settings return a 404 that is logged; not every unset setting does; not tested |

## FAQ

### Why does the Ceph Dashboard return HTTP 500 on a bucket with a lifecycle?

On deb-package installs, the Dashboard's RGW client needs the Python library `xmltodict`, but the `ceph-mgr-dashboard` Debian package does not depend on it. The import is wrapped in a `try`, so in the reported lifecycle path the failure appears as a `NameError` when that code runs (the module also uses `xmltodict` elsewhere).

### How do I fix the xmltodict NameError?

Install `python3-xmltodict` on every host that runs a ceph-mgr daemon, standbys included, then fail over the mgr so the Dashboard module is loaded again. If the error persists, restart each mgr daemon one at a time.

### Does this affect cephadm deployments?

It is less likely: the mgr runs from the container image, which is built from RPM packages that declare the dependency. Read the traceback in the mgr log to be sure; the host's Python check tells you nothing.

### Is the xmltodict problem fixed in Tentacle 20.2.5?

Not in the packaging: as of 29 November 2026 the `ceph-mgr-dashboard` 20.2.5-1noble package on download.ceph.com still lists no `python3-xmltodict` dependency.

### What is the second Dashboard bug?

In multi-realm RGW setups, selecting a non-default realm's daemon and opening a bucket's Policies tab can show another realm's lifecycle progress and freeze the page ("lifecycleProgress is undefined"). It is tracker #83204, Fix Under Review, with the fix in open PR #74004.

### Are the 404 lines in the mgr log a problem?

Most likely not. The Dashboard asks RGW for optional bucket settings, and some of them, when not configured, return a logged 404.

### Can I check a bucket's lifecycle without the Dashboard?

Yes. The post shows how to read the configuration with the S3 API or `radosgw-admin`, which is the source of truth on multi-realm setups.

If you run Ceph object storage on your own hardware and want a second pair of eyes on it, the know-how here stays free. [NG-NeXT](https://ngnext.tech) also does consulting and turnkey builds for self-hosted storage. Tell us what you run through the [contact page](https://ngnext.tech/contact).

— Nishant Gauraw, Founder and CEO, [NG-NeXT Tech](https://ngnext.tech)

## Updated and author

Last updated 2026-11-29 by Nishant Gauraw, [NG-NeXT](https://ngnext.tech).
