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

ceph.conf: enable logging for ceph clients #608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lathiat
Copy link
Contributor

@lathiat lathiat commented May 20, 2021

Enable 'log to syslog' and 'err to stderr' for ceph clients.

Currently the default configuration disables "log to syslog" for ceph
primarily targeting the ceph OSD units which log to files in
/var/log/ceph instead. However this value is also used by ceph clients
and as a result even with an error a ceph client such as libvirt/qemu
will not log errors anywhere making issues such as failure to connect
to a ceph cluster or invalid keyrings difficult to diagnose. Hence we
always enable 'log to syslog' for ceph clients.

We could alternatively enable log to a file, however, there are apparmor
and permissions issues that mean access to /var/log/ceph is not
guaranteed and in some cases multiple PIDs may write to this file
creating many different files so syslog seems like the best choice.
(Reference: #204)

Also enable 'err to stderr' which it makes it more likely the error is
surfaced in other important locations such as
/var/log/libvirt/qemu/instance-*.log and on the command line.

Partial-Bug: #1786874

Enable 'log to syslog' and 'err to stderr' for ceph clients.

Currently the default configuration disables "log to syslog" for ceph
primarily targeting the ceph OSD units which log to files in
/var/log/ceph instead. However this value is also used by ceph clients
and as a result even with an error a ceph client such as libvirt/qemu
will not log errors *anywhere* making issues such as failure to connect
to a ceph cluster or invalid keyrings difficult to diagnose. Hence we
always enable 'log to syslog' for ceph clients.

We could alternatively enable log to a file, however, there are apparmor
and permissions issues that mean access to /var/log/ceph is not
guaranteed and in some cases multiple PIDs may write to this file
creating many different files so syslog seems like the best choice.
(Reference: juju#204)

Also enable 'err to stderr' which it makes it more likely the error is
surfaced in other important locations such as
/var/log/libvirt/qemu/instance-*.log and on the command line.

Partial-Bug: #1786874
@lathiat
Copy link
Contributor Author

lathiat commented May 20, 2021

Note: sync to (at least) charm-cinder-ceph, charm-radosgw, charm-nova-compute is needed once merged

Copy link
Collaborator

@wolsen wolsen left a comment

Choose a reason for hiding this comment

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

Generally, I'm +1 on this change. However, I'd like to see a functional test run with these changes. Can you post a change with this modification to one of the consuming charms and link it in the comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants