Bug 2208480

Summary: RGW RFE: Make configuration for operations logs easier.
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Raimund Sacherer <rsachere>
Component: RGWAssignee: Ali Maredia <amaredia>
Status: NEW --- QA Contact: Madhavi Kasturi <mkasturi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.3CC: amaredia, ceph-eng-bugs, cephqe-warriors, ckulal, mbenjamin
Target Milestone: ---Keywords: FutureFeature
Target Release: 7.1Flags: mbenjamin: needinfo? (amaredia)
rsachere: needinfo? (amaredia)
rsachere: needinfo? (mbenjamin)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Raimund Sacherer 2023-05-19 08:41:52 UTC
Description of problem:
We have CUs who would like to configure either file or socket based RGW logging. As per recommendation CUs might install more than one RGW server on one node. In this case, each RGW server needs its own file or socket to log ops logs.

To achieve this configuration needs to be on the Instance level, so you need to configure it manually for each instance, for example with the following scenario, in this case with file_path, but same principal should apply for sockets:

```
   client.rgw                               advanced  rgw_enable_ops_log       true
   client.rgw                               basic     rgw_log_http_headers     http_x_forwarded_for,http_expect,http_content_md5
   client.rgw.rgwsvcid.mgmt-0.zzebto        advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-client.rgw.rgwsvcid.mgmt-0.zzebto.log
   client.rgw.rgwsvcid.mgmt-0.zzebta        advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-client.rgw.rgwsvcid.mgmt-0.zzebta.log
   client.rgw.rgwsvcid.mgmt-1.zzebtb        advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-client.rgw.rgwsvcid.mgmt-1.zzebtb.log
   client.rgw.rgwsvcid.mgmt-1.zzebtc        advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-client.rgw.rgwsvcid.mgmt-1.zzebtc.log
   client.rgw.rgwsvcid.mgmt-2.zzebtd        advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-client.rgw.rgwsvcid.mgmt-2.zzebtd.log
   client.rgw.rgwsvcid.mgmt-2.zzebte        advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-client.rgw.rgwsvcid.mgmt-2.zzebte.log
```

It would be much easier to be able to configure it with a token-placeholder, which could be replaced by the instancename, this would reduce the configuration needs to the absolut minimum and also reduce human error on configuration and cluster reconfiguration:
```
   client.rgw                               advanced  rgw_enable_ops_log       true
   client.rgw                               advanced  rgw_ops_log_file_path    /var/log/ceph/opslog-%i.log
```


Version-Release number of selected component (if applicable):
N/A

How reproducible:
N/A

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2023-05-19 08:42:01 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 3 Raimund Sacherer 2023-07-12 16:00:57 UTC
Hello Matt, 

I am sorry, but we can close this RFE. I recently found out, browsing the ceph upstream documentation on configuration, that there are a couple of `meta` variables, so this:

```
# sudo ceph config set client.rgw rgw_ops_log_file_path "/var/log/ceph/opslog-\$name.conf"
```

Already does result in this ($name = instancename of the service):
```
/var/log/ceph/9054a67a-ffc4-11ed-a028-fa163eef1596/opslog-client.rgw.rgw-instances.mgmt-0.ecnmpr.conf
```

So we actually can already template the log file path!

Thank you,

Best Regards
Raimund