charm-ceph-osd/templates/ceph.conf
Samuel Walladge ad59f1bda7 Save the crash module auth key
Read the key set on the mon relation,
and use ceph-authtool to save it to a keyring,
for use by the crash module for crash reporting.

When this auth key is set, the crash module (enabled by default)
will update ceph-mon with a report.
It also results in a neat summary of recent crashes
that can be viewed by `ceph health detail`.
For example:

```
$ juju ssh ceph-mon/leader -- sudo ceph health detail

HEALTH_WARN 1 daemons have recently crashed
[WRN] RECENT_CRASH: 1 daemons have recently crashed
    osd.1 crashed on host node-3 at 2023-01-04T05:25:18.218628Z
```

ref. https://docs.ceph.com/en/latest/mgr/crash/

See also https://review.opendev.org/c/openstack/charm-ceph-mon/+/869138
for where the client_crash_key relation data set is implemented.

Depends-On: https://review.opendev.org/c/openstack/charm-ceph-mon/+/869138

Closes-Bug: #2000630
Change-Id: I77c84c368e6665e4988ebe9a735f000f99d0b78e
(cherry picked from commit 97be046f9b)
2023-03-06 00:41:06 +00:00

118 lines
3.2 KiB
Plaintext

[global]
{%- if old_auth %}
auth supported = {{ auth_supported }}
{%- else %}
auth cluster required = {{ auth_supported }}
auth service required = {{ auth_supported }}
auth client required = {{ auth_supported }}
{%- endif %}
mon host = {{ mon_hosts }}
fsid = {{ fsid }}
log to syslog = {{ use_syslog }}
err to syslog = {{ use_syslog }}
clog to syslog = {{ use_syslog }}
debug osd = {{ loglevel }}/5
{% if ceph_public_network is string %}
public network = {{ ceph_public_network }}
{%- endif %}
{%- if ceph_cluster_network is string %}
cluster network = {{ ceph_cluster_network }}
{%- endif %}
{%- if public_addr %}
public addr = {{ public_addr }}
{%- endif %}
{%- if cluster_addr %}
cluster addr = {{ cluster_addr }}
{%- endif %}
{%- if crush_location %}
crush location = {{crush_location}}
{%- endif %}
{%- if upgrade_in_progress %}
setuser match path = /var/lib/ceph/$type/$cluster-$id
{%- endif %}
{%- if crush_initial_weight is not none %}
osd crush initial weight = {{ crush_initial_weight }}
{%- endif %}
{% if global -%}
# The following are user-provided options provided via the config-flags charm option.
# User-provided [global] section config
{% for key in global -%}
{{ key }} = {{ global[key] }}
{% endfor %}
{% endif %}
{% if bluestore_experimental and bluestore -%}
enable experimental unrecoverable data corrupting features = bluestore rocksdb
{%- endif %}
[client.osd-upgrade]
keyring = /var/lib/ceph/osd/ceph.client.osd-upgrade.keyring
[client.osd-removal]
keyring = /var/lib/ceph/osd/ceph.client.osd-removal.keyring
[client.crash]
keyring = /var/lib/ceph/osd/ceph.client.crash.keyring
[mon]
keyring = /var/lib/ceph/mon/$cluster-$id/keyring
[mds]
keyring = /var/lib/ceph/mds/$cluster-$id/keyring
[osd]
keyring = /var/lib/ceph/osd/$cluster-$id/keyring
{% if bluestore -%}
{% if not bluestore_experimental -%}
osd objectstore = bluestore
{%- endif %}
{% if bluestore_block_wal_size -%}
bluestore block wal size = {{ bluestore_block_wal_size }}
{%- endif %}
{% if bluestore_block_db_size -%}
bluestore block db size = {{ bluestore_block_db_size }}
{%- endif %}
{% include 'section-ceph-bluestore-compression' %}
{%- else %}
osd journal size = {{ osd_journal_size }}
filestore xattr use omap = true
journal dio = {{ dio }}
{%- endif %}
bdev enable discard = {{ bdev_discard }}
bdev async discard = {{ bdev_discard }}
{%- if short_object_len %}
osd max object name len = 256
osd max object namespace len = 64
{% endif %}
{%- if osd_max_backfills %}
osd max backfills = {{ osd_max_backfills }}
{%- endif %}
{%- if osd_recovery_max_active %}
osd recovery max active = {{ osd_recovery_max_active }}
{%- endif %}
{% if osd_from_client -%}
# The following are charm provided options provided via the mon relation.
{% for key in osd_from_client -%}
{{ key }} = {{ osd_from_client[key] }}
{% endfor %}
{% endif %}
{% if osd_from_client_conflict -%}
# The following are charm provided options which conflict with options from
# config-flags.
{% for key in osd_from_client_conflict -%}
# {{ key }} = {{ osd_from_client_conflict[key] }}
{% endfor %}
{% endif %}
{% if osd -%}
# The following are user-provided options provided via the config-flags charm option.
{% for key in osd -%}
{{ key }} = {{ osd[key] }}
{% endfor %}
{% endif %}