How to enable debug logs in Rados gateway in Red Hat Ceph Storage?
Environment
- Red Hat Ceph Storage (RHCS)
- Rados Gateway
Issue
- How to enable debug logs in Rados gateway in Red Hat Ceph Storage?
Resolution
- There are 2 methods to do this depending on the situation:
Method 1 - Update the ceph.conf and restarting the RGW daemon:
* Add the following under the rgw section of the /etc/ceph/ceph.conf
file of Rados gateway node:
debug ms = 1
debug rgw = 20
- Restart the
radosgw
service:
# sudo systemctl list-units | grep -i rgw
# sudo systemctl restart ceph-radosgw@<$service_name>.service
Method 2 - Inject the parameters to the RGW services using it's admin socket (.asok):
- Inject the debug values:
$ ceph --admin-daemon /var/run/ceph/ceph-client.rgw.<name>.asok config set debug_rgw 20
$ ceph --admin-daemon /var/run/ceph/ceph-client.rgw.<name>.asok config set debug_ms 1
- Re-inject the default values:
$ ceph --admin-daemon /var/run/ceph/ceph-client.rgw.<name>.asok config set debug_rgw 1\/5
$ ceph --admin-daemon /var/run/ceph/ceph-client.rgw.<name>.asok config set debug_ms 0\/5
- The logs will be inside
/var/log/ceph/
on the Rados Gateway node.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.