Ceph: When logrotate runs, the RGW service does not reload properly and create a new empty log file.

Solution Verified - Updated -

Issue

When logrotate runs, the RGW service does not reload properly and create a new empty log file.

This occurs when a custom logging configuration is put in place.

Default parameters:

# ceph-conf -D | grep ops_log
rgw_enable_ops_log = false
rgw_ops_log_rados = true
rgw_ops_log_file_path = 

Changed parameters which trigger the code issue

# ceph config dump | grep ops
    global                      advanced  rgw_ops_log_rados               false
    client.rgw                  advanced  rgw_enable_ops_log              true
    client.rgw                  advanced  rgw_ops_log_file_path           /var/log/ceph/ceph-rgw-ops.json

Customer Description:

We log operations to a file that we ingest in our centralized logging application (Splunk) and when logrotate runs Ceph does not properly reload and create a new file to continue logging.  The logrotate service moves and compresses the the RGW logfile however the RGW service does not create a new one.

Logrotate config:
(The killall/pkill line below should cause the creation of a new empty RGW logfile)

/var/log/ceph/948cxxxx-Obfuscated-Cluster-Identifier-yyyyef5fc180/*.json {
    rotate 168
    hourly
    compress
    sharedscripts
    postrotate
        killall -q -1 radosgw || pkill -1 -x 'radosgw' || true
    endscript
    missingok
    notifempty
    su root root
}

Environment

Red Hat Ceph Storage (RHCS) 5.0.x
Red Hat Ceph Storage (RHCS) 5.1.x
Red Hat Ceph Storage (RHCS) 5.2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content