Remove support for creating FileStore OSDs. Also prevent upgrade
attempts to Reef if a FileStore OSD is detected
Change-Id: I9609bc0222365cb1f4059312b466a12ef4e0397f
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
This new action allows users to either purge an OSD, or remove it,
opening up the possibility of recycling the previous OSD id. In
addition, this action will clean up any bcache devices that were
created in previous steps.
Change-Id: If3566031ba3f02dac0bc86938dcf9e85a66a66f0
Depends-On: Ib959e81833eb2094d02c7bdd507b1c8b7fbcd3db
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/683
Sync in updates from charm-helpers and charms.ceph.
Depends-On: I153c22efb952fc38c5e3d36eed5d85c953e695f7
Depends-On: Ibec4e3221387199adbc1a920e130975d7b25343c
Change-Id: I028440002cdd36be13aaee4a0f50c6a0bca7abda
Apply OSD settings requested by the mons via the juju relation.
Add the OSD settings to config too. Before applying the settings
config-flags is checked to ensure there is no overlap.
Change-Id: Id69222217a1c99d0269831913abdf488791cb572
This change implements a new option called 'bdev-enable-discard' to control
behaviour of issuing discards to SSDs on ceph bluestore. The new code tries
to autodetect cases where it should be enabled by default but will allow
forcing if desired.
Change-Id: I7b83605c827eb4058bc4b46c92eb114c11108c93
Closes-Bug: #1788433
Ensure that code snips don't slurp to much whitespace,
resulting in a broken set of keys within the generated
configuration file.
Change-Id: I7cfe026c60c04ac19741a3a2b364cec3fb8746ba
vaultlocker provides support for storage of encryption keys
for LUKS based dm-crypt device in Hashicorp Vault.
Add support for this key management approach for Ceph
Luminous or later. Applications will block until vault
has been initialized and unsealed at which point OSD devices
will be prepared and booted into the Ceph cluster.
The dm-crypt layer is placed between the block device
parition and the top level LVM PV used to create VG's
and LV's to support OSD operation.
Vaultlocker enables a systemd unit for each encrypted
block device to perform unlocking during reboots of the
unit; ceph-volume will then detect the new VG/LV's and
boot the ceph-osd processes as required.
Note that vault/vaultlocker usage is only supported with
ceph-volume, which was introduced into the Ubuntu packages
as of the 12.2.4 point release for Luminous. If vault is
configured as the key manager in deployments using older
versions, a hook error will be thrown with a blocked
status message to this effect.
Change-Id: I713492d1fd8d371439e96f9eae824b4fe7260e47
Depends-On: If73e7bd518a7bc60c2db08e2aa3a93dcfe79c0dd
Depends-On: https://github.com/juju/charm-helpers/pull/159
Fixes the conditional in the ceph.conf template so it renders the
crush-initial-weight config option if set to 0.
Change-Id: Iaecbdf52bd3731effa3132e61364918407116dbe
Closes-Bug: 1764077
Adds bluestore-specific options related to the metadata-only journal.
The options allow a user to control:
1. path to a bluestore wal (block special file or regular file)
2. path to a bluestore db (block special file or regular file)
3. size of both
Their configuration works similarly to the FileStore journal. If paths
are not specified both WAL and DB will be collocated on the same block
device as data.
Other options can be configured via an existing config-flags option if needed.
http://docs.ceph.com/docs/master/rados/configuration/bluestore-config-ref/
Closes-Bug: #1710474
Change-Id: Ia85092230d4dcb0435354deb276012f923547393
Depends-On: I483ee9dae4ce69c71ae06359d0fb96aaa1c56cbc
Depends-On: Idbbb69acec92b2f2efca80691ca73a2030bcf633
Upstream Ceph removed the `osd crush location` option in
commit f9db479a14d9103a2b7c0a24d958fe5fff94100e [0]. This
causes new clusters deployed from the Pike UCA (Luminous)
using the customize-failure-domain option to not create or
move the OSD to the correct spot in the OSD tree. The end
result is that placement groups will fail to peer because
there are no racks to select hosts and OSDs from.
Instead, the charm should set the more generic `crush
location` option in the ceph.conf file. It is and has been
supported since the Firefly (trusty-icehouse) version of
Ceph.
[0] f9db479a14
Change-Id: I0b7055b20f54096a2f33583079326aee17726355
Closes-Bug: 1730839
Added options for osd_max_backfills and osd_recovery_max_active, if we
should want to override the default.
Change-Id: Iaeb93d3068b1fab242acf2d741c36be5f4b29b57
Closes-bug: #1661560
In small clusters, adding OSDs at their full weight causes massive IO
workload which makes performance unacceptable. This adds a config
option to change the initial weight, we can set it to 0 or something
small for clusters that would be affected.
Closes-Bug: 1716783
Change-Id: Idadfd565fbda9ffc3952de73c5c58a0dc1dc69c9
Drop explicit global configuration of keyring, supporting
installation of the ceph/ceph-mon/ceph-osd charms in the
same machine.
Change-Id: Ib4afd01fbcc4478ce90de5bd464b7829ecc5da7e
Closes-Bug: 1681750
Add highly experimental support for bluestore storage format for
OSD devices; this is disabled by default and should only be enabled
in deployments where loss of data does not present a problem!
Change-Id: I21beff9ce535f1b5c16d7f6f51c35126cc7da43e
Depends-On: I36f7aa9d7b96ec5c9eaa7a3a970593f9ca14cb34
Some upgrade scenarios (hammer->jewel) require that the ownership
of the ceph osd directories are changed from root:root to ceph:ceph.
This patch improves the upgrade experience by upgrading one OSD at
a time as opposed to stopping all services, changing file ownership,
and then restarting all services at once.
This patch makes use of the `setuser match path` directive in the
ceph.conf, which causes the ceph daemon to start as the owner of the
OSD's root directory. This allows the ceph OSDs to continue running
should an unforeseen incident occur as part of this upgrade.
Change-Id: I00fdbe0fd113c56209429341f0a10797e5baee5a
Closes-Bug: #1662591
This patch starts down the road to automated performance
tuning. It attempts to identify optimal settings for
hard drives and network cards and then persist them
for reboots. It is conservative but configurable via
config.yaml settings.
Change-Id: Id4e72ae13ec3cb594e667f57e8cc70b7e18af15b
Adds a new config-flags option to the charm that
supports setting a dictionary of ceph configuration
settings that will be applied to ceph.conf.
This implementation supports config sections so that
settings can be applied to any section supported by
the ceph.conf template in the charm.
Change-Id: I306fd138820746c565f8c7cd83d3ffcc388b9735
Closes-Bug: 1522375
In addition to ensuring that we have AZ set, we ned to ensure that
the user has asked to have the crush map customized, ensuring
that uysing the availability zone features are entirely opt-in
Change-Id: Ie13f50d4d084317199813d417a8de6dab25d340d
Closes-Bug: 1582274
As of the Ceph Jewel release, certain limitations apply to
OSD object name lengths: specifically if ext4 is in use for
block devices or a directory based OSD is configured, OSD's
must be configured to limit object name length:
osd max object name len = 256
osd max object namespace len = 64
This may cause problems storing objects with long names via
the ceph-radosgw charm or for direct users of RADOS.
Also ensure that ceph.conf as a final newline as ceph requires
this.
Change-Id: I26f1d8a6f9560b307929f294d2d637c92986cf41
Closes-Bug: 1580320
Closes-Bug: 1578403
This reverts commit c94e0b4b0e.
Support for juju provided zones was broken on older Ceph releases
where MAAS zones are not configured (i.e. nothing other than the
default zone).
Backing this change out until we can provide a more complete and
backwards compatible solution.
Closes-Bug: 1570960
Change-Id: I889d556d180d47b54af2991a65efcca09d685332
This change adds functionality to allow the ceph osd cluster to
upgrade in a serial rolled fashion. This will use the ceph monitor
cluster to lock and allows only 1 ceph osd server at a time to upgrade.
The upgrade is initiated setting a config value for source for the
service which will prompt the osd cluster to upgrade to that new
source and restart all osds processes server by server. If an osd
server has been waiting on a previous server for more than 10 minutes
and hasn't seen it finish it will assume it died during the upgrade
and proceed with its own upgrade.
I had to modify the amulet test slightly to use the ceph-mon charm
instead of the default ceph charm. I also changed the test so that
it uses 3 ceph-osd servers instead of 1.
Limtations of this patch: If the osd failure domain has been set to osd
than this patch will cause brief temporary outages while osd processes
are being restarted. Future work will handle this case.
This reverts commit db09fdce93.
Change-Id: Ied010278085611b6d552e050a9d2bfdad7f3d35d
This change adds functionality to allow the ceph osd cluster to
upgrade in a serial rolled fashion. This will use the ceph monitor
cluster to lock and allows only 1 ceph osd server at a time to upgrade.
The upgrade is initiated setting a config value for source for the
service which will prompt the osd cluster to upgrade to that new
source and restart all osds processes server by server. If an osd
server has been waiting on a previous server for more than 10 minutes
and hasn't seen it finish it will assume it died during the upgrade
and proceed with its own upgrade.
I had to modify the amulet test slightly to use the ceph-mon charm
instead of the default ceph charm. I also changed the test so that
it uses 3 ceph-osd servers instead of 1.
Limtations of this patch: If the osd failure domain has been set to osd
than this patch will cause brief temporary outages while osd processes
are being restarted. Future work will handle this case.
Change-Id: Id9f89241f3aebe4886310e9b208bcb19f88e1e3e
The approach here is to use the availability zone as an imaginary rack.
All hosts that are in the same AZ will be in the same imaginary rack.
From Ceph's perspective this doesn't matter as it's just a bucket after all.
This will give users the ability to further customize their ceph deployment.
Change-Id: Ie25ac1b001db558d6a40fe3eaca014e8f4174241