Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: change default ops log backend from rados to file #45737

Merged
merged 4 commits into from Apr 26, 2022

Conversation

cbodley
Copy link
Contributor

@cbodley cbodley commented Mar 31, 2022

a proposed change to the default backend when rgw_enable_ops_log is enabled, based on discussion in #45691

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

Copy link
Contributor

@mattbenjamin mattbenjamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -1477,6 +1480,7 @@ options:
desc: File-system path for ops log.
long_desc: Path to file that RGW will log ops logs to.
fmt_desc: The file-system path for writing operations logs.
daemon_default: /var/log/ceph/ops-log-$cluster-$name.log
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that i copied this from the log_file option which defaults to /var/log/ceph/$cluster-$name.log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cfsnyder i'd like to add a blurb about log rotation for rgw_ops_log_file_path. can you summarize how cephadm does this, or point me at docs maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure @cbodley. cephadm automatically adds logrotate config on the host for all files matching /var/log/ceph/{fsid}/*.log. So if the rgw_ops_log_file_path config param matches /var/log/ceph/*.log (container path), it'll be handled by the cephadm config.

Here's an example of the config it generated on one of my test clusters:

root@ceph01:~# cat /etc/logrotate.d/ceph-74016538-b125-11ec-abb9-3daf21fa986b 
# created by cephadm
/var/log/ceph/74016538-b125-11ec-abb9-3daf21fa986b/*.log {
    rotate 7
    daily
    compress
    sharedscripts
    postrotate
        chown 167:167 /var/log/ceph/74016538-b125-11ec-abb9-3daf21fa986b/*.log; killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror cephfs-mirror || pkill -1 -x 'ceph-mon|ceph-mgr|ceph-mds|ceph-osd|ceph-fuse|radosgw|rbd-mirror|cephfs-mirror' || true
    endscript
    missingok
    notifempty
    su root root
}

As you can see, it rotates daily and keeps 7 days of compressed logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's great, thanks

@cbodley cbodley force-pushed the wip-rgw-ops-log-defaults branch 4 times, most recently from 5131412 to 148f8fa Compare April 5, 2022 18:42
@github-actions github-actions bot added the tests label Apr 5, 2022
@cbodley
Copy link
Contributor Author

cbodley commented Apr 5, 2022

hmm

[ RUN      ] TestRGWLua.OpsLog
unix socket connect error: 2
../src/test/rgw/test_rgw_lua.cc:682: Failure
Value of: unix_socket_client_ended_ok
  Actual: false
Expected: true
[  FAILED  ] TestRGWLua.OpsLog (8808 ms)

@github-actions github-actions bot added the rgw label Apr 5, 2022
@cbodley cbodley force-pushed the wip-rgw-ops-log-defaults branch 2 times, most recently from ba7f831 to f195daa Compare April 5, 2022 20:08
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley cbodley changed the title [RFC] rgw: change default ops log backend from rados to file rgw: change default ops log backend from rados to file Apr 5, 2022
Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented Apr 26, 2022

passed qa in https://pulpito.ceph.com/cbodley-2022-04-26_01:02:21-rgw-wip-cbodley-testing-distro-default-smithi/, but depends on the fixes in #46027 so we'll need to merge that first

Copy link
Contributor

@cfsnyder cfsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@cbodley cbodley merged commit 7bc93fc into ceph:master Apr 26, 2022
@cbodley cbodley deleted the wip-rgw-ops-log-defaults branch April 26, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants