Ceph has a function to collect health metrics through smartctl or nvme
command out of the box. And it relies on sudo spawned from the ceph-osd
process so it needs to be considered in the apparmor policy.
[/etc/sudoers.d/ceph-smartctl in ceph-base package]
> ## allow ceph daemons (which run as user ceph) to collect device
> ## health metrics
>
> ceph ALL=NOPASSWD: /usr/sbin/smartctl -x --json=o /dev/*
> ceph ALL=NOPASSWD: /usr/sbin/nvme * smart-log-add --json /dev/*
Also sync charmhelpers and mock platform info
Closes-Bug: #2031637
Change-Id: I981a5db0fd49eca83aa8a619f0cbd0d34a533842
Remove support for creating FileStore OSDs. Also prevent upgrade
attempts to Reef if a FileStore OSD is detected
Change-Id: I9609bc0222365cb1f4059312b466a12ef4e0397f
This is useful, because if an invalid value is set,
the value is ignored and not overridden,
and an error logged.
So now we warn about this in the status to be more obvious to the user.
Change-Id: Idc4a7706f30cbcea8aee83a1406fa84139fe510d
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
The charm attempts to bootstrap OSDs on both the mon-relation-changed
and the mon-relation-departed hooks. There is no logical reason that
the OSDs should be bootstrapped in the -departed hook.
Change-Id: I79a790291b0e361d2748d6bed8c989d16ad36daf
Closes-Bug: #1885195
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
As part of the task to improve disk replacement, the 'add-disk' action
needs some changes. This includes:
- Creating 'bcache' devices to accelerate disk access.
- Creating caching partitions of a specified size.
- Recycling previously deactivated OSD ids.
Change-Id: Id5027f30d51c23d2be4c34f82867d65a50b35137
Depends-On: I43d0a0bc11664c37532c0117711affc93c9d1ad1
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/675
The 'get-availability-zone' action will get information about an
availability zone that will contain information about the CRUSH
structure. Specifically 'rack' and 'row'.
Closes-Bug: #1911006
Change-Id: I99ebbef5f23d6efe3c848b089c7f2b0d26ad0077
update-status needs to account for devices that
are used as bluestore devices where the device
is mapped to a luks dev.
Change-Id: I92e67a5d62eb50dbf5da430d03a6b7ff5485ce46
Closes-Bug: #1929417
The 'hirsute' key in c-h/core/host_factory/ubuntu.py:
UBUNTU_RELEASES had been missed out, and is needed for
hirsute support in many of the charms. This sync is to
add just that key. See also [1]
Note that this sync is only for classic charms.
[1] https://github.com/juju/charm-helpers/pull/598
Change-Id: I66384babf597072499799c0b3aaff00fedbe69a0
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure stable/21.04 branch for charms.openstack
- ensure stable/21.04 branch for charm-helpers
Change-Id: I773d5f9f699af1a2ea7be543c4e58e0f7bc4433a
Update get_mon_hosts to avoid specifying the port number for the
MON daemons; we use the default so this is not required, and at
Nautilus the MON daemons run both v1 and v2 messenger ports.
Specifying the port in the ceph.conf file disables the v2
messenger port which is not the desired behaviour on upgrade
or new installation.
Change-Id: I5333cc85f755771733fe09e963d5523fd93c16d2
Closes-Bug: #1917742
The network-get --primary-address juju-info fails on pre-2.8.?
versions of juju. This results in a NoNetworkBinding error.
Fallback to unit_get() if that occurs for local_address().
Change-Id: I3a7d4e5093f15a1fb32310522229d0b4ebd61c59
Includes updates to charmhelpers/charms.openstack for cert_utils
and unit-get for the install hook error on Juju 2.9
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure master branch for charms.openstack
- ensure master branch for charm-helpers
Change-Id: Ie6146da90c4adc38e817e644e1328ad6c41d678f
The `osds` parameter has been copied from function start/stop to preserve
the same functionality. By default, osd-in/osd-out needs list of IDs as
an argument or it will not do anything (previously, it applied the change
to all the osds). It's possible to take in/out *all* with provided `osds`
parameter as `all`.
Closes-Bug: #1910150
Change-Id: I0275f015e2d0bbbb661d2b7dea59c320ba6c021c
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure master branch for charms.openstack
- ensure master branch for charm-helpers
Change-Id: Iffb92ef062f307bc9b2b27e217431b2fc122acfc
The assess-status hook can error out if the vault unit is offline whilst
it is verifying the relation. This patchset ensures that it simply logs
the error and puts up a warning saying it can't verify the relation.
The state will 'fix itself' when vault comes back online.
Change-Id: I9cb50be5d9d317c48ec3e3ae3ea8fed0687832dd
Sync in updates from charm-helpers and charms.ceph.
Depends-On: I153c22efb952fc38c5e3d36eed5d85c953e695f7
Depends-On: Ibec4e3221387199adbc1a920e130975d7b25343c
Change-Id: I028440002cdd36be13aaee4a0f50c6a0bca7abda
Pass the unit name to the secrets provider via relation data. The
unit name is not available in CMRs so needs to be passes this way.
Change-Id: I9fa162bbf45144d0827c669fc9b37d7b336366cd
- Adds groovy to the series in the metadata
- Classic charms: sync charm-helpers.
- Classic ceph based charms: also sync charms.ceph
- Reactive charms: trigger a rebuild
Change-Id: I56a59d0c4e72a35b7c4ac5d989e0d005fae20946
On charm upgrade ensure that the number of bootstrapped OSD's
is presented to the ceph-mon application.
This ensures that the ceph-mon application does not switch
into a 'waiting' state after upgrade from earlier versions
of the ceph-* charms.
Change-Id: If1425ef837a74212f002985f648ac1ecf9257201
Closes-Bug: 1861996
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