Alert rules can be attached as a resource and will be transmitted via
the metrics-endpoint relation. Default alert rules taken from upstream
ceph have been added for reference.
Change-Id: I6a3c6f06e9b9d911b35c8ced1968becc6471b362
Add support for the metrics-endpoint relation. This allows relating
ceph-mon to prometheus-k8s which is being used in the COS Lite
observability stack. Upon relation, the ceph prometheus module will be
enabled and a corresponding scrape job configured for prometheus-k8s.
Drive-by test improvement for the utils module
Change-Id: Iaeee57aaa6f3678fdaef35f2582b4b4c974acb2a
This patchset implements the first rewrite of the charm using the
operator framework by simply calling into the hooks.
This change also includes functional validation about charm upgrades
from the previous stable to the locally built charm.
Fix tempest breakage for python < 3.8
Co-authored-by: Chris MacNaughton <chris.macnaughton@canonical.com>
Change-Id: I61308bb2900134ea163d9e92444066a3cb0de43d
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/849
When get_named_key is called on a keyring that
has customised capabilities, it overwrites the
capabilities to the default capabilities.
Depends-On: I777650ae2194609a95e5cfb101e343824b3d0a34
Change-Id: I2930b32943fb75778cf3b56bb7f1d2a9f9c7c454
* 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: I7de7b61d63aef57c3242631b969d5bb54fe76ab1
Changing an existing EC profile can have some nasty side effects
including crashing OSD's (which is why its guarded with a --force).
Update the ceph helper to log a warning and return if an EC profile
already exists, effectively making them immutable and avoiding
any related issues.
Reconfiguration of a pool would be undertaking using actions:
- create new EC profile
- create new pool using new EC profile
- copy data from old pool to new pool
- rename old pool
- rename new pool to original pool name
this obviously requires an outage in the consuming application.
Change-Id: Ifb3825750f0299589f404e06103d79e393d608f3
Closes-Bug: 1897517
When running ceph-mon in containers, best practice is
to have chrony/ntp configured and installed on the bare
metal and then have the container trust the system
clock, as the container should not manage the system
clock.
The chrony package get installed automatically as
part of the dependencies of other packages, which
gets removed in this change.
Also contains related changes for charms.ceph.
Change-Id: If8beb28ea5b5e6317180e52c3e32463e472276f4
Closes-Bug: #1852441
Depends-On: Ie3c9c5899c1d46edd21c32868938d3290db321e7
Sync charms.ceph to pick up EC fix for Ceph-fs. This patch enables
clients on the mds relation to request additional data pools to be
added.
Depends-On: I80b7a5cc87d7d53bb55d4d65999a0f9b3cdcb77d
Change-Id: I48348ab2b6c8952c5e22008a074a60c1f35be952
Sync in updates from charm-helpers and charms.ceph.
Remove unit tests that belong to charms.ceph.
Depends-On: Ibec4e3221387199adbc1a920e130975d7b25343c
Change-Id: I153c22efb952fc38c5e3d36eed5d85c953e695f7
Sync charmhelpers and charms.openstack to pickup changes for
improved Erasure Coded pool support.
Update action code for EC profile creation for extended
option support and other charmhelpers changes.
Depends-On: I2547933964849f7af1c623b2fbc014fb332839ef
Change-Id: Iec4de19f7b39f0b08158d96c5cc1561b40aefa10
From luminous to mimic, the ceph-mgr isn't restarted, leaving it at
luminous, rather than mimic. This change ensures that the ceph-mgr is
restarted when the version is luminous or later.
Related charms.ceph change: I2844736af2de27ce071db859311ac99b9b3057ad
Closes-Bug: #1849874
Change-Id: Id059fbfd46bed4b9f96e85251fa83067696857d5
Enable passing of an integer to the pool-set function. Due to how juju
appears to parse things on the command line, setting type to string
causes it to fail to accept '3', "3" or 3 as a string. Only "'3'"
works. However, if we remove the type from actions.yaml and do the
validation in the charm, any value can be passed.
Depends-On: I6081c23af61fd5e872982ff477b0a5cb27141d11
Change-Id: Idf3468d9ae28dafc09c86f08b7f8c6470a665b7a
Closes-Bug: #1838650
The new python3-ceph-common deb package (introduced in ceph octopus)
adds a new ceph directory (a parent package in python terms) in
/usr/lib/python3/dist-packages/ceph/. This results in a conflict with
charm-ceph-osd/lib/ceph/. For example, with the current import of
ceph.utils in hooks/ceph_hooks.py, Python finds no utils.py in
/usr/lib/python3/dist-packages/ceph/ and then stops searching.
Therefore, rename lib/ceph to lib/charms_ceph to avoid the conflict.
Depends-On: https://review.opendev.org/#/c/709226
Change-Id: Id5bdff991c1e6c196c09ba5a2241ebd5ebe6da91
use btrfs-progs instead of btrfs-tools for eoan and later
update bionic-train zaza test bundle to include placement
Closes-Bug: #1850181
Change-Id: Ic8e46dda154c19edadf0e6810701233c3db88e04
* 7839ca3 put create_keyrings as a public method
Change-Id: Ia090d4c37e19016a8468ce62113b2531c69de0e5
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Also fix for bug where the mgr daemon is not ready. A wait is
introduced if it is not ready before trying to assert pg-autotune.
Closes-Bug: #1848576
Change-Id: Ic3c1e1f7902f7e2052dc4cf432303f874369238d
Resync charms.ceph to pickup changes to support new approach to
admin and bootstrap key generation with in the ceph-mon cluster.
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.
Drop start hook; this has been present in the charm since its
inception as 'ceph' but is really not needed - re-deploying the
charm to units which previous hosted ceph-mon is dangerous
and the ceph-* daemons should still be running anyway.
Depends-On: I2dfab7404b72e314625ea554ee64595c5e26f3c6
Change-Id: I340dbf427551e6f9f8cd4ca89128627e497d6097
General tidy of actions codebase including sorting out
some minor bugs.
Added new copy-pool action.
Added support for CRUSH device classes when creating
erasure coding profiles.
Removed need for use of rados python module by switching
to using the ceph command line tool for all operations.
Add new action for creation of new CRUSH rules using
device classes.
Resync charms.ceph to support switching the crush_rule
key on a pool.
Resync charmhelpers for support for device classing.
Rename all action py files to by standards compliant.
Change-Id: I1f7d95b1637f2064bd11a5d5336764b2946428ac
Depends-On: I2c405f9a4956ff1ccf1edb7372a9bb11e1e591a4
ceph-mon charm only upgrades when the ceph version changes, for the
case of upgrading from Pike to Queens the charm is skipping any
upgrades, because the Cloud Archive has Luminous for those 2 releases.
This patch checks if the requested ceph version is luminous and if the
'source' changed from pike to queens to then upgrade
/etc/apt/sources.list.d/cloud-archive.list via add_source()
Change-Id: I05b7d722e45d3a02a97866903a67bd9b16d4f552
Closes-Bug: 1778823
If ceph-radosgw units present a key_name attribute, then generate
a cephx key using the key name and present back with the key_name
as the prefix for the key.
This switches radosgw units to having per-unit keys, rather than
sharing a global key (required as part of the pre-work to support
RADOS gateway federation).
Change-Id: I289b75a2935184817b424c5eceead16235c3f53b
Depends-On: I7ac4d23a91fa654b62afb62c389a8f9823ef2e05
Closes-Bug: 1808140
Resync the latest charms.ceph to avoid direct installation
of Python 2 modules which are not available in the latest
Ceph packaging which no longer provides Python 2 support.
This commit also updates two action which still used Python
to use Python 3 (inline with the rest of the charm).
Change-Id: I8fc2a1aa17e48ef5dac9b9974c33b9620fcb7c70
Resync ceph helpers, picking up fixes for:
- Upgrades from Luminous to Mimic.
- Correct build of OSD list in more complex CRUSH
configurations, resolving upgrade issues.
Add nova-cloud-controller to amulet tests to achieve a complete
deployment post landing of changes for Nova Cells v2 support.
Closes-Bug: 1788722
Change-Id: I7a5c53c792ab958d94301de62cdd4d804f8a54f7
This is motivated by the fact that:
* the ntp/chrony package is already a dependency of the ceph-mon/osd
package
* NTP will be managed by operators through the NTP charm
It is thus useless to keep that package mentioned here.
Change-Id: If6ecfc6f515bec4f955a5b52df8f0fbfafd29008
Closes-Bug: #1780690
Depends-on: Iddb7ffcc7ab7a74700855b950f619208511c2fab
Ensure that the default permissions for clients include the
'osd blacklist' command; This ensures that in the event of
a client crashing (due to power outage or segfault), the
client and re-connect and write to any devices on reboot.
This is a safe permission for all supported Ceph releases.
Depends-On: I0b43dece4e1c56fb838b0147bfb75fb9906e6657
Change-Id: Ib1f1e8d7ed54528603b8b08051dafeec075a3232
Closes-Bug: 1773449
Sync relevant changes from charms.ceph
Disable `ceph-create-keys` in init system and explicitly
run it in the charms ceph-mon bootstrap process.
Change-Id: I03cd596e6e336b75d7d108ed0acde15d9940913f
Depends-On: I3d3c7298076730c423ca5cc059316619f415b885
Closes-Bug: #1719436