-
Notifications
You must be signed in to change notification settings - Fork 76
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
Fix test for ceph-fs key rotation #1208
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The ceph-fs charm sometimes creates an entity called 'mds.None'. This is probably a bug, but in the meantime, we filter it out in the key rotation test class.
openstack-mirroring
pushed a commit
to openstack/charm-ceph-mon
that referenced
this pull request
May 15, 2024
This supports grafana dashboards and metrics scraping from the ceph mgr prometheus module. Have to build with charmcraft 2.6 for dependency handling Also remove zed tests as it's EOL Change-Id: I8b2f132a4997d205119f7afe2a1ab6b2ae4c0134 cherry-picked from e35d908 Change-Id: Idd479cef04a24ea64af643bd6e142ac40906e86c func-test-pr: openstack-charmers/zaza-openstack-tests#1208
lgtm as a tactical fix |
UtkarshBhatthere
pushed a commit
to UtkarshBhatthere/ceph-charms
that referenced
this pull request
Jan 30, 2025
This supports grafana dashboards and metrics scraping from the ceph mgr prometheus module. Have to build with charmcraft 2.6 for dependency handling Also remove zed tests as it's EOL Change-Id: I8b2f132a4997d205119f7afe2a1ab6b2ae4c0134 cherry-picked from 868adde Change-Id: Idd479cef04a24ea64af643bd6e142ac40906e86c func-test-pr: openstack-charmers/zaza-openstack-tests#1208
UtkarshBhatthere
added a commit
to canonical/ceph-charms
that referenced
this pull request
Mar 10, 2025
* Migrate to haproxy interface for VIPs * ensure that we can delete shares in cephfs * Add support for resizine a CephFS share This also protects against resizing the share to smaller than the in-use value of the share. * Remove functionality for auth-supported Closes-Bug: #1841445 Change-Id: I394d025ff5c0b4a73c6683d67b0949484a5924a1 * Update readme with ACL and VIP updates * Migrate to charmhub handling * Improve consistency This change does a couple of things to improve the consistency of the code: - Replace all uses of Nfs with NFS - Remove repeated instantiation of the GaneshaNFS object - Make name a peroperty fo the Export * Update for lint and unit test errors * Add list-crush-rules action This action provides a list of crush rules defined in CEPH clusters. Closes-bug: #1957458 Change-Id: I2a5fdae776e00d869a624e1107ab42cf69bb2f50 * Resolve issue with mod_proxy decoding The Ceph RADOS Gateway uses some unusual URI's for multisite replication; ensure that mod_proxy passes the 'raw' URI down to the radosgw http endpoint so that client and server side signatures continue to match. This seems quite Ceph specific so the template is specialised into the charm rather than updated in charm-helpers. Change-Id: Iede49ba8904500076d53388345e154a3ed18e761 Closes-Bug: 1966669 * Updates to enable jammy and finalise charmcraft builds - Add 22.04 to charmcraft.yaml - Update metadata to include jammy - Remove impish from metadata - ensure that the source is yoga Change-Id: Ibb93704c6d66f522cf112ad115b3a294d7a1eb03 * Implement the 'remove-disk' action 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 * Resolve type change in Ceph Quincy for enabled_manager_modules Change-Id: I4f81391e51312ec5795e3a3b840b2461e48cb3c4 * Updates for jammy enablement - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Drop impish bundles and OSCI testing - Add jammy metadata - Default source is yoga Change-Id: Ic3a9837af9cb2ad4851c8dfb00de589f43618975 * Updates for jammy enablement - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Drop impish bundles and OSCI testing - Add jammy metadata - Default source is yoga - Charmhelpers and charms.ceph sync Change-Id: I1e963b2d18aaa8ec61fb5d255f23508879f08e83 * Updates for jammy enablement - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Drop impish bundles and OSCI testing - Add jammy metadata - Default source is yoga - Resync charmhelpers and charms.ceph Change-Id: Ib62d7f882f22146419dfe920045b73452f9af2cb * Add SAML support to ceph-dashboard This patchset adds support to setup authentication via the SAML protocol for the ceph-dashboard. Change-Id: I96c0d856d173a76739a6d2a9d4ad4811d3d196c3 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/741 * Updates for jammy quincy and finalise charmcraft builds - Update charmcraft.yaml for arch builds - Remove impish-xena tests - Update osci.yaml to include py3.10 default job - Resync charmhelpers and charms.ceph Change-Id: I41abace773d8926eaa00076dd83f52849c96150d * Updates for jammy enablement - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Drop impish bundles and OSCI testing - Add jammy metadata - Default source is yoga - Charmhelpers and charms.ceph sync Change-Id: I39f091db8ef8f18c0a40d4e46d54dfc964c03d70 * Updates for jammy enablement - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Drop impish bundles and OSCI testing - Add jammy metadata Change-Id: Ic16efea3f834c2e085c51caa302aa379e3133a7e * Update to build using charmcraft Due to a build problem with the reactive plugin, this change falls back on overriding the steps and doing a manual build, but it also ensures the CI system builds the charm using charmcraft. Changes: - add a build-requirements.txt - modify charmcraft.yaml - modify osci.yaml -> indicate build with charmcraft - modify tox.ini -> tox -e build does charmcraft build/rename -> tox -e build-reactive does the reactive build - modify bundles to use the <charm>.charm artifact in tests. and fix deprecation warning re: prefix - tox inception to enable tox -e func-test in the CI This change also switches away from directory backed OSD devices in the test bundles, as they are not supported anymore. Change-Id: I57d1b47afbbeef211bb777fdbd0b4a091a021c19 Co-authored-by: Aurelien Lourot <[email protected]> * Update the charm to use the latest changes in charms.ceph Change-Id: I7aee1d27021e259367d6fe88002f996ab62a61c3 Closes-Bug: #1968369 * Updates for jammy enablement - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Drop impish bundles and OSCI testing - Add jammy metadata - Default source is yoga Change-Id: I2aaa39d6f780c415db54b28eaf445732247d7d47 * Multisite replication should use public, rather than internal, networks Closes-Bug: #1960520 Change-Id: Ie2954a9a59acbc384c18c901e2d324ee003d7108 * Add *.charm to gitignore This patch adds *.charm to the .gitignore to ensure that any built artifacts are ignored. Change-Id: I4c79baf0802b2daa6aa9e9435ac9c99b605fc844 * Add *.charm to gitignore This patch adds *.charm to the .gitignore to ensure that any built artifacts are ignored. Change-Id: I8a3ee884ad82d935165c725b38c01cdd25656f49 * Resync charms.ceph Pickup changes for cephx key permissions for rbd-mirror charm. Change-Id: I01a878f7bbf244d1db79991382a18dc23176d9b6 Closes-Bug: 1879749 * Updates for opendev & jammy enablement - Add .zuul.yaml to run gate testing - charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs] - Refresh tox targets - Add jammy metadata - Default source is yoga - fix typo in ganesha-client property Change-Id: Iddf3e97078bc397ace4995f53417837445579fa3 * Fix ceph-dashboard SAML tests This patchset fixes a couple of issues with ceph-dashboard's SAML support, mostly with outdated bundle configuration. Change-Id: I6c3f8ffdf10d42f9a5280d7e429a7ae64612a139 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/762 * Don't bootstrap osds on mon-relation-departed hook 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 * Replace cs with ch links on prometheus Change-Id: I60d9fe2068b562d05e421fd1ab2914c9d5f00a25 * Add a config option for relaxed s3 bucket names. Closes-Bug: #1926498 Change-Id: I4b329f3327a0e91ccd9f65841cc5d62736918a85 * Add the 'zonegroup' and 'realm' keys to ceph.conf file This patchset adds these 2 additional keys to the ceph.conf file, which are used in multisite configurations when present. Change-Id: I51ca46bbb3479cb73ec4d9966208ed794f0ed774 Closes-Bug: #1975857 * Enable charm to configure mds cache options. Closes-Bug: #1891409 Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/774 Change-Id: If2bdd5c0f2afa1843e686cf69570a50901c85875 * Improve OSD device details dashboard Add osd's status and utilization to the dashboard. Closes-Bug: 1977501 Change-Id: Ic18ff5dc76a4ed4f4343a38f57c046a209e0bc96 * Improve Ceph cluster dashboard Add IOPS and Objects in the cluster to the dashboard. Closes-Bug: 1977504 Change-Id: Idfa6c4066b6852b3beb95e2c83823372eea2d9ae * Add get-or-create-user and delete-user actions for ceph auth The get-or-create-user action allows to create and get user, with its mon and osd capabilities, and retrieve the related keyring. The delete-user action allows to delete users. Closes-Bug: 1899215 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/765 Change-Id: I2bd148e442990b6ff978624023bd85a741c6259a * Fixed typo in a function comment. --check_osds_down --> --check_num_osds Change-Id: Ic5938cc5f12606ff0cc67df988b95ecf673b6c5f * Added safe-pg-repair action This action automatically repairs inconsistent placement groups which are caused by read errors. PGs are repaired using `ceph pg repair <pgid>`. Action is only taken if on of a PG's shards has a "read_error", and no action will be taken if any additional errors are found. No action will be taken if multiple "read_errors" are found. This action is intended to be safe to run in all contexts. Closes-Bug: #1923218 Change-Id: I903dfe02aa3b7c67414e3d0d9b57f4042d301830 * Docfix objecs -> objects Change-Id: I48d0ff007dfd6c23c7005e8d6afee8bf6b9a7d8c * Create NRPE check to verify ceph daemons versions This NRPE check confirms if the versions of cluster daemons are divergent. WARN - any minor version diverged WARN – any versions are 1 release behind the mon CRIT – any versions are 2 releases behind the mon CRIT – any versions releases are head the mon A juju action is also provided 'get-versions-report' which provide to users, a quick way to see daemons versions running on cluster hosts. Closes-Bug: #1943628 Change-Id: I41b5c8576dc9cf885fa813a93e6d51e8804eb9d8 * Update deployment commands Update the README deployment commands by removing the cs: prefix and the Charm Store openstack-charmers namespace. Change-Id: I6204397161c2770acc759dd310a7ba3e3eb4d685 * Adds support for migration to multi-site system. 1.) Currently multi-site can only be configured when system is being deployed from scratch, migration works by renaming the existing Zone/Zonegroups (Z/ZG) to Juju config values on primary site before secondary site pulls the realm data and then rename and configure secondary Zone accordingly. During migration: 2.) If multiple Z/ZG not matching the config values are present at primary site, the leader unit will block and prompt use of 'force-enable-multisite' which renames and configures selected Z/ZG according to multisite config values. 3.) If the site being added as a secondary already contain Buckets, the unit will block and prompt the operator to purge all such Buckets before proceeding. Closes-Bug: #1959837 Change-Id: I01a4c1c4551c797f0a32951dfbde8a1a4126c2d6 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/840 * Fixes currently present PEP8 issues Change-Id: Idff27970dc0d41288444fc3ed18585e3f3a1a0ad * update readme with mentioned relations and bug link Change-Id: Ic2cbe864a4998762fcabcd36d4be026690c707ea * Test upgrade path This patchset rearranges the tests so that the upgrade path is properly tested, with the tests that aren't in main moved into a different class. func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/849 Change-Id: I5ca38134115f82ac6dff5f559757df68a6c0cd24 * Remove force-deploy for Jammy Additionally, Move jammy-yoga out of dev-bundles Change-Id: I8cc90044fde5b9da4013a805aaa62b6ccf8a5250 * Remove force-deploy for Jammy Additionally, Move jammy-yoga out of dev-bundles Change-Id: I759ed6b716c91f28bed2b9a1010e01e39c138114 * Remove force-deploy for Jammy Additionally, Move jammy-yoga out of dev-bundles Change-Id: Ibcfee61d595e8966ce0d17cc09983da870cec278 * Remove force-deploy for Jammy Additionally, Move jammy-yoga out of dev-bundles and remove Impish test. Change-Id: Ie82b0f3d3d19a3cd07be133f64a70445e974ad2b * Make jammy voting This change also enabled jammy-proposed to ensure we can get an updated python3-cheroot until it's released into -updates. Change-Id: I2325f7ddf2c0015a054b8d2d1c97f1054b619149 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/857 * Disable insecure global-id reclamation Closes-Bug: #1929262 Change-Id: Id9f4cfdd70bab0090b66cbc8aeb258936cbf909e * First rewrite of ceph-mon with operator framework 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 <[email protected]> Change-Id: I61308bb2900134ea163d9e92444066a3cb0de43d func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/849 * Adds existence verification for config values Multisite config values (realm, zonegroup, zone) are written to ceph.conf as the defaults without verifying their existence, this causes failure for commands which use the default values. Closes-Bug: #1987127 Change-Id: I0ab4df34f0000339227e5d5b80352355ea7bd36e * Add Kinetic and Zed support * sync charm-helpers to classic charms * change openstack-origin/source default to zed * align testing with zed * add new zed bundles * add zed bundles to tests.yaml * add zed tests to osci.yaml and .zuul.yaml * update build-on and run-on bases * add bindep.txt for py310 * sync tox.ini and requirements.txt for ruamel * use charmcraft_channel 2.0/stable * drop reactive plugin overrides * move interface/layer env vars to charmcraft.yaml Change-Id: I9dda207bbd35f8641a6aac03e99503bc26071407 Depends-On: https://review.opendev.org/c/openstack/charm-ops-openstack/+/853306 * Add Kinetic and Zed support * sync charm-helpers to classic charms * change openstack-origin/source default to zed * align testing with zed * add new zed bundles * add zed bundles to tests.yaml * add zed tests to osci.yaml and .zuul.yaml * update build-on and run-on bases * add bindep.txt for py310 * sync tox.ini and requirements.txt for ruamel * use charmcraft_channel 2.0/stable * drop reactive plugin overrides * move interface/layer env vars to charmcraft.yaml Change-Id: I78b0720e75891a41364ba0ddb82add89c3b77ca1 * Add Kinetic and Zed support * sync charm-helpers to classic charms * change openstack-origin/source default to zed * align testing with zed * add new zed bundles * add zed bundles to tests.yaml * add zed tests to osci.yaml and .zuul.yaml * update build-on and run-on bases * add bindep.txt for py310 * sync tox.ini and requirements.txt for ruamel * use charmcraft_channel 2.0/stable * drop reactive plugin overrides * move interface/layer env vars to charmcraft.yaml Change-Id: Ieb1ef7b7ab76775f5769621a6a7cbcfb18c40b7f * Add functional test support for Jammy Change-Id: I712f289d4c1cfec84fdc64aab920ba1aba0b3192 * Fix ceph-osd disk removal on Jammy Closes-Bug: #1987695 Change-Id: I7523e8fa0f6b62329eefcce6daf250881812943c * Remove small OpenStack deployment from functional tests func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/864 Change-Id: Ic143b99503a396d7ae1484a1a3e68bdd6e7ce525 * Migrate install handling to operator native Change-Id: I0d06db0c8ac15b3a1fd3e9c4b4f0d2243fb1875e * Add support for prometheus-k8s 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 * Adds support for scaling down multisite rgw system Adds implementation for relation-departed hooks to cleanly remove participant sites from the multisite system. The replication between zones is stopped and both zones split up to continue as separate master zones. Change-Id: I420f7933db55f3004f752949b5c09b1b79774f64 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/863 * Rewrite the 'change-osd-weight' to use the op framework This patchset changes a single action, 'change-osd-weight' so that it's implemented with the operator framework. Change-Id: Ia11885a2096b6e4b1ecda5caea38939e17098e1d * Rewrite actions/copy_pool into the oeprator framework In addition to trivial changes (passing `event` into the `copy_pool` function), this change introduces an update to the actions/__init__.py that allows succinct import and use from the main charm.py. An apparently unrelated change is the removal of charm-proof from the lint job, as it fails with the removal of actions/copy-pool. Change-Id: I66a5590ddf0f0bb5ca073a91b451f8c78598609a func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/866 * Deprecate legacy prometheus2 Support for relating to the prometheus2 machine charm is deprecated and will be removed at some point in the future. Change-Id: Ib0d55ffa03aaacf0d5b6108a6641929a4442eaf1 * Remove -proposed from jammy functional test bundle Change-Id: I0e93840e8dd8d84078caf7591a081abf8942c33c * Fix: disable prometheus module on relation depart Disable the ceph prometheus module on relation departure Change-Id: I44f906aa17407c19fa2bbb9b4fbaa86964837b9a * Fix nrpe relation handling Fix nrpe relation handling, also re-add the nrpe check plugin and script Change-Id: Id81f04f2e2702d8489c0ed1daa85d9f29c7fcc36 * Ensure add-disk and hooks handle disks the same way Depends-On: I2ea119f5a1b2a36ccd36df4db094f208a1db100e Depends-On: Ie19e5318ea35c38e5d02963260b85fec0f233df6 Change-Id: Idebe45504233fb5559a3e9ddd9b2d6534cba7bb2 Closes-Bug: #1820271 * Fix: run main procedures in ops charm Previously, before converting to the operator framework, the charm used to run default processes on every hook run, due to the __main__ block in the ceph_hooks module. This patch aims to resurrect these default processes for the operator charm. Change-Id: Iffaec5287f248f61b737d79a1ea945e3125255d9 * Implement prometheus alert rules 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 * Adds primary/secondary multisite relation A new relation with primary/secondary nomenclature is added and the old master/slave relation is marked as *Deprecated*. In future, master/slave relation would be completely removed. Change-Id: I9cda48b74a20aaa9a41baedc79332bfaf13951d3 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/926 * Sync charm-helpers for zed support Change-Id: I266226c771282194f809120be0271012705cb4bd * Fixes openssl dependency issue for tests Change-Id: I2cfaf1de8d2096522cb435751be874df0d985578 * Update tox.ini for charmcraft 2 Also, this fixes an issue with pyopenssl Change-Id: I8cb2d6ffeb27f58d97a2d4f8b32ced3c527a5f5e * Fix: make ceph_metrics test more robust Instead of messing with the harness' construction patch the missing network-get in place Change-Id: I162a0b73d76a3ed18689c2baf258372efe5f2ec4 * bump testing to yoga alignment Change-Id: I2d0d3d799f0d48f2785dd9a6cf8b27d518665395 * Make check_ceph_status.py a bit more "noisy" by default. Closes-Bug: #1989154 Change-Id: Ie0d73f14698e4f3ba4e7231920a622f587b4330f * Fix: ceph metrics alert rule symlinking Really remove existing symlinks, also improve type hinting Change-Id: I28f3ac85f22971bac63f58825842d0f5d712fad9 * Add nagios check for expected number of OSDs This check does not require manually setting the number of expected OSDs. Initially, the charm sets the count (per-host) to that of what's present in the OSD tree. The count will be updated (on a per-host basis) when the number of OSDs grows, but not when it shrinks. There is a charm action to reset the expected count using information from the OSD tree. Closes-Bug: #1952985 Change-Id: Ia6a060bf151908c1d4159e6bdffa7bfe1f0a7988 * Rewrite the create-crush-rule action with the ops framework Change-Id: Ifaccd20ba4a0f148a38d14edf0c26bd4a4d5d655 * rewrite create-erasure-profile with ops famework Change-Id: I27b0e926865ecb39ad4f5ad25de8266e9db75695 * Rewrite get_health action with the Operator framework Change-Id: I68645a3d00c0622c7701c8177bcd510c3092afe4 * Rewrite update status machinery with the ops framework Add a new module ceph_status for checking ceph-mon status. Provide the ceph_shared helpers for querying current status of ceph-mon units. Also add some initial testing for the charm module. Change-Id: I5079023ca692f0a2b7bfda96bb1834b8e9b1f0cc * Add operator-native ceph-client library Change-Id: Id9caf3b385094b9bc4010893034185d0a47c45d4 * Add ceph-fs to test bundles to ensure relation works Change-Id: Ifc5e382e44f3dfcddfda3c526e07e9bb5892fbc3 * python 3.8 should still be tested Change-Id: I60fae36a08cd717c7db1d622af45cb9cd53d6a4c * fix .gitreview repo reference Change-Id: I235eeef8ffc7f102e319eeeb4c12181e34f5a069 * fix .gitreview repo reference Change-Id: I825e3838b6ea488b2af848c58726e0c3580d767a * fix .gitreview repo reference Change-Id: Ie8b504a779eef131f72ac8ecb559f35ddd5e70e3 * Partial revert[1] to re-enable Focal support 1: a95e54ea94a068f4ed4b436a467f973317905500 Change-Id: I565e36b94d249d2cf0beccf1480189a19da008d9 * Work around config initialisation behaviour change The previous (classic) version of the charm initialised a Config object in the install hook and let it go out of scope. Initialise a config object explicitly in the install and upgrade charm hooks. Change-Id: Ic389c840cc4253adaddcaa50d184db6ca66cb397 (cherry picked from commit 87e524ebf30551264890ccf8765fe11271622198) * Pin tox to < 4.0.0 Tox 4.0.0 was recently released and it has several breaking changes. We pin to < 4.0.0 here. We are planning to move forward only on the master charm branches. Tox is also pinned to < 4.0.0 for stable branches in upstream openstack-zuul-jobs as well as in zosci-config. However, the requires= section in the charm's tox.ini file ends up installing tox>4, wiping out the zuul-pinned tox<4 that was already installed installed. This patch fixes that. Related-Bug: #2002788 Change-Id: Ie56b7d8506868db45d116a1fd31db3a24361f149 * Pin tox to < 4.0.0 Tox 4.0.0 was recently released and it has several breaking changes. We pin to < 4.0.0 here. We are planning to move forward only on the master charm branches. Tox is also pinned to < 4.0.0 for stable branches in upstream openstack-zuul-jobs as well as in zosci-config. However, the requires= section in the charm's tox.ini file ends up installing tox>4, wiping out the zuul-pinned tox<4 that was already installed installed. This patch fixes that. Additionally, accommodate the following changes by hand from origin/master: - add libffi-dev in bindep.txt Related-Bug: #2002788 Change-Id: Ib216b3b5bab7488d36f774c2b602a393ee0ce630 * Ensure crushtool --test called correctly Later Ceph releases require that the --test function of crushtool is called with replica information for validation. Pass in "--num-rep 3" as a basic check plus "--show-statistics" to silence a non-fatal warning message. This can be clean cherry-picked back at least as far as Ceph 12.2.x. Change-Id: I76d21ddd9da79535f68490b4231ae13705e27edb Closes-Bug: 2003690 (cherry picked from commit 7b0969af61b169cd9809ceb8077c3da2b9e3aab2) * Make sure lockfile-progs package is installed Also, drop python-dbus for simplicity since "check_upstart_job" in nrpe is not enabled any longer. And the python-dbus package is no longer available on jammy either. [on focal with systemd] $ ls -1 /etc/nagios/nrpe.d/ check_ceph.cfg check_conntrack.cfg check_reboot.cfg check_systemd_scopes.cfg Closes-Bug: #1998163 Change-Id: I30bc22ae8509367207004b90eb2c38ad0fae9ffe (cherry picked from commit 968bb32bcd66caed2aee47b1447be44303bcfe49) * Pin tox to < 4.0.0 Tox 4.0.0 was recently released and it has several breaking changes. We pin to < 4.0.0 here. We are planning to move forward only on the master charm branches. Tox is also pinned to < 4.0.0 for stable branches in upstream openstack-zuul-jobs as well as in zosci-config. However, the requires= section in the charm's tox.ini file ends up installing tox>4, wiping out the zuul-pinned tox<4 that was already installed installed. This patch fixes that. Related-Bug: #2002788 Change-Id: I12d1707d9135ae0e03974521c3f79fa28fec1251 * Fix typo in requesting loadbalancer ceph-dashboard requires the `http-check expect status 200` configured in haproxy. openstack-loadbalancer only sets this up if the check_type is set to 'http'. Closes-Bug: #1998871 Change-Id: Iea74aff1205813749cee71436af14ee3579db41a (cherry picked from commit 03b85fc56ba177264b0cc60a0f3ec1287c098480) * Revert "Create NRPE check to verify ceph daemons versions" This reverts commit c32f4675c0ff825f170b50b99eb59454c0a208a3. Reason for revert: The Ceph version check seems to be missing a consideration of users to execute the nrpe check. It actually fails to get keyrings to execute the command as it's run by a non-root user. $ juju run-action --wait nrpe/0 run-nrpe-check name=check-ceph-daemons-versions unit-nrpe-0: UnitId: nrpe/0 id: "20" results: Stderr: | 2023-02-01T03:03:09.556+0000 7f4677361700 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory 2023-02-01T03:03:09.556+0000 7f4677361700 -1 AuthRegistry(0x7f467005f540) no keyring found at /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin, disabling cephx 2023-02-01T03:03:09.556+0000 7f4677361700 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory 2023-02-01T03:03:09.556+0000 7f4677361700 -1 AuthRegistry(0x7f4670064d88) no keyring found at /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin, disabling cephx 2023-02-01T03:03:09.560+0000 7f4677361700 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory 2023-02-01T03:03:09.560+0000 7f4677361700 -1 AuthRegistry(0x7f4677360000) no keyring found at /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin, disabling cephx [errno 2] RADOS object not found (error connecting to the cluster) check-output: 'UNKNOWN: could not determine OSDs versions, error: Command ''[''ceph'', ''versions'']'' returned non-zero exit status 1.' status: completed timing: completed: 2023-02-01 03:03:10 +0000 UTC enqueued: 2023-02-01 03:03:09 +0000 UTC started: 2023-02-01 03:03:09 +0000 UTC Related-Bug: #1943628 Change-Id: I84b306e84661e6664e8a69fa93dfdb02fa4f1e7e * Remove note about tech-preview state Change-Id: I975bbe00d27d10900503deb3e031b9b906ee8c70 (cherry picked from commit f5cba486f71274a0f0a0e38c7fb5d853073f3aeb) * Create a key for ceph-osd for crash module auth This will be set on the osd relation, so the ceph-osd charm can use this key for auth by the crash reporting module. ref. https://docs.ceph.com/en/latest/mgr/crash/ See https://review.opendev.org/c/openstack/charm-ceph-osd/+/869139 for how this key is used by ceph-osd. Closes-Bug: #2000630 Change-Id: Ic95aae6b5981a6df1e0b3c310bcef8018c494a24 (cherry picked from commit 32e9751f6ce92d4e140951eb6e2636d8936ece02) * Pin tox to < 4 for stable branch ref. https://review.opendev.org/c/openstack/charm-mysql-innodb-cluster/+/871369 and similar patches Change-Id: I45507022f3382c4132a250a0484b12e4dbe363c7 * 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 dbcb211ed520dabfb50e2ce3c856d4339993d6ff) * Pin tox to < 4.0.0 Tox 4.0.0 was recently released and it has several breaking changes. We pin to < 4.0.0 here. We are planning to move forward only on the master charm branches. Tox is also pinned to < 4.0.0 for stable branches in upstream openstack-zuul-jobs as well as in zosci-config. However, the requires= section in the charm's tox.ini file ends up installing tox>4, wiping out the zuul-pinned tox<4 that was already installed installed. This patch fixes that. Related-Bug: #2002788 Change-Id: I5d94f213ae4d734c75ef9c653d12cf25d5e0b977 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1020 * Fix issue with ceph-client relation handling A bug was introduced when changing ceph-client to an operator framework library that caused the fallback application_name handling to present a class name rather than a remote applicaiton name. This change updates the handling to get at an `app.name` rather than an `app`. Closes-Bug: #1995086 Change-Id: I57b685cb78ba5c4930eb0fa73d7ef09d39d73743 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1022 * Use a different name for the local key/value store The operator framework and charmhelpers use the same path for the local K/V store, which causes problems when running certain hooks like 'pre-series-upgrade'. In order to work around this issue, this patchset makes the charmhelpers lib use a different path, while migrating the DB file before doing so. Closes-Bug: #2005137 Change-Id: Ic2e024371ff431888731753d29fff8538232009a (cherry picked from commit 232df2b90f91dcb52930ecbfb7e5676e61a7ff8a) * Fix pristine status Only check configured devices instead of all system devices and don't check already processed devices when computing pristine status Closes-Bug: #1988088 Change-Id: Ia6bf7a5b7abddb72c3ec61fd9e02daf42e94c2da func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1032 (cherry picked from commit 67f3739a7e0141d07eefe37c588eacf526f2a64a) * Tweak apparmor profile to access OSD volumes. Plus add aa-profile-mode enforce option to the test bundles. Closes-Bug: #1860801 Change-Id: I8264ad760d92da3faa384c8edca5566fc622c57d (cherry picked from commit 7a4a575c2afcb85800e4feb8c2856814f4db07ad) * Remove relation test The CephRelationTest class wasn't of much used and the test was rather flaky, since it compared public IP addresses. Change-Id: I9a77f4a86412f9bf4d27c0d7e0a7fe34d5a403ff func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1034 (cherry picked from commit de5c76611fbf638dc5fc3ba2b9f8e7986450e8bf) * Remove relation test The CephRelationTest class wasn't of much used and the test was rather flaky, since it compared public IP addresses. Change-Id: Iba5aad1d895ba8b28ce364899a1e41275dc3003b func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1034 (cherry picked from commit 51484dd91f7dac1dba603268f1828badebaa773b) * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include kinetic and lunar - update snapcraft to allow run-on for kinetic and lunar Change-Id: I6b229b502dd4ee9f1d219240b86f7826abf0c25d (Cherry-pick from 6b76235c68a86dc0f551d690b5627d1d10fe7fbd) * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include lunar - update snapcraft to allow run-on for lunar - sync charm-helpers Change-Id: I16b9d724930eacca42b9410c73931caceca8cca8 * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include kinetic and lunar - update snapcraft to allow run-on for kinetic and lunar Change-Id: Icce5e77bb1a7d13455ead8b5215cbccb311fede3 * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include lunar - update snapcraft to allow run-on for lunar Change-Id: I0235671d9aa301c86ecf16052baff7e29ede1aac * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include kinetic and lunar - update snapcraft to allow run-on for kinetic and lunar - sync charm-helpers Change-Id: Id8bbaf1402935b88f14ecd6f736697694449e417 * Enable rgw trust forwarded https when https proxy This option is required for server-side encryption to be allowed if radosgw is behind a reverse proxy, such as here when certificates are configured and apache2 is running. ref. https://docs.ceph.com/en/latest/radosgw/encryption/ It is safe to always enable when https is configured in the charm, because it will be securely behind the reverse proxy in the unit. This option must not be enabled when https is not configured in the charm, because this would allow clients to spoof headers. Closes-Bug: #2021560 Change-Id: I940f9b2f424a3d98936b5f185bf8f87b71091317 (cherry picked from commit e4e780395b2c03b6bc9847146a00e373ae9e72fa) * Bypass charm going into blocked due to a bug After Octopus, the reporting about image states fails because of a permission issue in Ceph. This change disables that status reporting to allow a deployment to be healthy even when some tools cannot query status. Also modernize build and func testing: remove python 3.9 and xena from tests Related-Bug: #1879749 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1063 cherry picked from Id86fc043495b89609cf6873ec58aee1e2e388578 Change-Id: I6bd784b41995e78175869bf2d8cf6789e8f9dd58 * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include kinetic and lunar - update snapcraft to allow run-on for kinetic and lunar cherry-pick from I72ab8b2ec96cf78df8a84e0686a33229a6270fb3 Change-Id: I7b623d210ddc2fac1ea889c778fc5cc744c0e354 * Fix persistent config file not update bug When ceph doing the version upgrade, it will check the previous ceph from the `source` config variable which store in persistent file. But the persistent file update is broken. It is because we use hookenv.Config from ops framework, but the hookenv._run_atexit, which save the change to file, is not been called. Partial-Bug: #2007976 Change-Id: Ibf12a2b87736cb1d32788672fb390e027f15b936 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1047 (cherry picked from commit c05f78bc88065234bfb9e06de21bf8324fc32213) * rbd mirror relation: be persistent in getting pool info Auth for getting pool details can fail initially if we set up a rbd mirror relation at cloud bootstrap. Add some retry to give it another chance Change-Id: I2f5ac561120b1abe52ea0621bb472bc78495fa97 Partial-Bug: #2021967 (cherry picked from commit 72b9eb1205b39176ea8e7bbcb1dedcec1ed845f4) * Testing: use mysql and rabbitmq from LTS For better stability use LTS series for rabbitmq and mysql when testing instead of interim releases. Also remove xena (non-lts) from tests and yoga as a source default cherry-pick from: Ie443c55dc4cc1b7f63eacfee79b28f210f1277e4 Change-Id: Ia964a8c2049282df9655268272fbcf8117d160e4 * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include kinetic and lunar - update snapcraft to allow run-on for kinetic and lunar func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1074 cherry-picked from Ie39cef6965c30f2adb78b4be568ced17a140115b Ia2ad44152cf620e9812bfbd58276735a7491949c Change-Id: I752d3d62a2191c6996786a75f68f46c9e2db69cd * Rebuild merge request Rebuild for changes in the ops-openstack dependency Change-Id: I773bb2a94198d4cda4dc713054d1642308d36645 * Add support for interim Ubuntu releases - update bundles to include UCA pocket tests - update test configuration - update metadata to include kinetic and lunar - update snapcraft to allow run-on for kinetic and lunar Change-Id: Ic4c19ccfc0ff42280634f5ba705c49ffb946799e * Adds source for application in test bundles Also set channels cherry pick from I21d7865c41898551f3f1b1859388139b4cff2bd1 Change-Id: I8edfa2d41d5fea048f14b7b50558a40dc555799e * Adds skip logic to non-leader units Non leader units will skip the event handling if Ceph dashboard is not enabled by the leader yet. Some test bundle fixes. Partial-Bug: #1952282 cherry-pick from I743e50663ee85c91af4962d7d100e2fd48efa48c Change-Id: Iec2f200963c3ed1e4d9bff86d62b49ddc91d0578 * Fix ceph-mon upgrade path This PR makes some small changes in the upgrade path logic by providing a fallback method of fetching the current ceph-mon version and adding additional checks to see if the upgrade can be done in a sane way. Closes-Bug: #2024253 Change-Id: I1ca4316aaf4f0b855a12aa582a8188c88e926fa6 (cherry picked from commit 5bc76a462f56be6975a185725595d3975c3c71f3) * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: I173cadb5a8208283883e1119dbfc5d661809cc5f (cherry picked from commit da0d3c9a1d1fd33cfdbba8b6e521587ad1e4d5b2) * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: I0fb5e14bd2e58d4abdcce6e230d5c4c1a1d00af7 (cherry picked from commit 0c3227beea135ca5537b1f3e62c024208b4e8709) * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: I4b117272f68a27732809d0dddc31ac9cf69c60d9 (cherry picked from commit da6f655e7857fef11effcf6ad28ef3cdeb0b246c) * Return previous result of processed broker requests (quincy.2) Instead of returning an empty dict for already processed broker requests, store the result and return it. This works around issues in charms like ceph-fs that spin indefinitely waiting for the response to a request that never arrives. Closes-Bug: #2031414 (cherry picked from commit 537468cfa6f3a3f2bc6e3387f2cce0ab1a7c5133) Change-Id: I35b116de20331cdffcf79c49ad2708620714faa7 * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: I4c9f607213138adff0af434a417048c9d40af2a4 (cherry picked from commit 66ca6be4ba7caf1ab7ec6a5c5a6dbe9b785819ad) * Add build-on/run-on to support Ubuntu 20.04 To fix the build jsonschema is pinned to the latest version that doesn't depend (indirectly) on Rust. Closes-Bug: #2033673 Change-Id: Id6777eb23b3b4cc6b0fb239a61d64502a5d74451 * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: Ia414ab7d30db9443cf0d9d26071ca48b772f8d1e (cherry picked from commit 41e3db8134c944fef0c83e5c26880157bcb8f453) * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: Id759ee81cea83fe9b18671ce5bc19a31db319a77 * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: Ic11a02b94cb9708a8b830942264e5ee80b748a5e (cherry picked from commit adcf333598a3680725d7172942ecf5d14eeb437e) * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1108 Change-Id: I782890f44628a634c7adcf9cdace753c62d6c262 (cherry picked from commit 9abe25f182cbb307aeb3d828e59fb26afb499334) * Add docs key and point at Discourse Add the 'docs' key and point it at a Discourse topic previously populated with the charm's README contents. When the new charm revision is released to the Charmhub, this Discourse-based content will be displayed there. In the absense of the this new key, the Charmhub's default behaviour is to display the value of the charm's 'description' key. Change-Id: Ia36919df21c55bfc40497f7c174ba5919f44a394 (cherry picked from commit 3ac03519788ee52797d06e2cc0ad7d773615dc91) * Fix pool names in RadosGW charm The latest Ceph versions forbid pool names that start with a dot. Since the RadosGW charm uses pools named so extensively, this patchset fixes that issue. In addition, the Ceph libraries are synced as well, since they were outdated. (cherry-picked from commit 69f213ed4569f26ae822f845373bb787c67dabae) Change-Id: I9cdf891f503b749f36225ea07a7a571af1b58e9c * Fixes SSL conflicts between relation and config data. The fix adds event based handling of SSL configuration using charm config and cleanup of SSL for relation and config based key/certs. It also adds logical abstractions to analyse SSL setup and emit relevant events. Closes-Bug: 1952282 Cherry-pick from: Ic486434526f639f5985cfe355e303c1d6ff5fa0d Change-Id: I2ad140b23a5d3e2e078d923afd039c4c904e0652 * Adds dashboard enablement/deferral logic improvements Closes-Bug: 2033886 cherry-picked from: I2f4d4dfa890fc79f7f5d5b1273a11907b60e8255 Change-Id: I63fbe0776c92419d8b047bab151e01c4f1f3f45e * Fix shell quoting (quincy) This patchset fixes shell quoting in generated NRPE commands. This is a backport for Quincy, since the fix is present on edge. Change-Id: I8cfae089fac048f17dfb98240a5f98f60d7e210b Closes-Bug: #2037620 * Configure ceph with osd-memory-target from ceph-osd charm Change-Id: Id3f21f8ab68fb88529b6cbd78217e27772c2739c (cherry picked from commit 7fd6025e1408d9688649ee0ced496b3ee7e71302) * Add config option for tuning osd memory target Closes-Bug: #1934143 Depends-On: https://review.opendev.org/c/openstack/charm-ceph-mon/+/897724 Change-Id: I22dfc25c4ac2737f5d872ca2bdab3c533533dbff (cherry picked from commit b5422ef2e3366a06f51115863879f11a43b1af2a) * Don't clear osd_memory_target unconditionally The charm can now set osd_memory_target, but it's not per device class or type by the nature of how the charm works. Resetting osd_memory_target always when osd_memory_target is not passed over the relation is a bit risky behavior since operators may have set osd_memory_target by hand with `ceph config` command out side of the charm. Let's be less disruptive on the charm upgrade. Closes-Bug: #1934143 Change-Id: I34dd33e54193a9ebdbc9571d153aa6206c85a067 (cherry picked from commit 90044e7fb15b28af369a4d8c8a63ec09e4cd4cd3) * Fix status handling for non-leaders Closes-bug: 2039763 Change-Id: Ic24b5885c1289c2653f4280f7fe2815b1c2afb15 (cherry picked from commit 4ee08c02972ba174ba379728e9ab1f045bacd1a4) * Set iscsi pools' application This patchset sets the default application name for the charm-created pools to 'rbd'. Closes-bug: #2040274 Change-Id: I781a2e33b3de9f55b97fddd661214f601fc6134e (cherry picked from commit ab6d598ddce6b1d0b758d5fa7888d8dc56e15de0) * Don't set the default pool as "iscsi" "iscsi" is the name of the metadata pool by default in the charm and not to be used for tenant data. The charm can fill out the data pool name automatically with `def data_pool_name` or can accept a user specified value. After fixing the issue, the "iscsi" pool will be used only for hosting gateway.conf as a rados object so reflect the purpose into the application name for the pool too. Also, update the command syntax not to print the deprecation warning: "rbd: --user is deprecated, use --id" Closes-Bug: #2042419 Related-Bug: #2040274 Change-Id: Iec275190854edcc85915d93db233f444c92fbb17 (cherry picked from commit 82779e5ff9a579610f2e1b4af557ee4ef2ede202) * Fix key errors for rbd-pool-name and ec-rbd-metadata-pool The existing code assumes event.params['rbd-pool-name'] and event.params['ec-rbd-metadata-pool'] have a key. Set an empty string by default to be filled by other part of the code. Follow-up of Iec275190854edcc85915d93db233f444c92fbb17 Closes-Bug: #2042419 Change-Id: I819f0d4456530ace8162456dec1f2fcb7fa95e7f * Allow ceph device scrape-health-metrics 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 * Add config option for rbd_stats_pools This allows configuration RBD IO statistics collection for RBD pools. Co-authored-by: Yoshi Kadokawa <[email protected]> Closes-Bug: #2042405 Related-Bug: #1989648 Change-Id: I2252163533a312f0f53165f946711ab20bb0e3c9 (cherry picked from commit 1f4dc7b32dcc5ae3951d4b0cce452562fd52af52) * Fix: init alert rules on rel change Check for alert rules early, on first metrics-endpoint rel change Closes-Bug: #2043758 Change-Id: Iea39c33c614d204ee39ad39da68c31d213ed19e6 (cherry picked from commit 081f3eaccae27845230ad0c3c0a8b4a111b30e2b) * Reject invalid username and password This patchset checks that the username and password parameters comply with ceph-iscsi requirements. Change-Id: Ida720e5381d0ff3446cf88405452f8a3778c7efc Fixes-bug: #2040328 (cherry picked from commit eec2d0d5eab1b1dd27673b5ca338f369f204c1ae) * Add kinetic support Change-Id: I42acfcd1ec49e1a9181f92a46d522ce3a6e92514 (cherry picked from commit abc70f71bf93f1ebca0af96610a8e79a1564c437) * Fix: enable GW services once we have config Closes-Bug: #2045828 Change-Id: Ia473b2793a60172645713b722cbab80dcdbf93b6 * Revert default source to 'yoga' for the quincy track Also update rabbitmq chan in jammy-zed test bundle Change-Id: I066d94f444c271a39a52e75dfbde72e1bccbe27c * Refactor cache validation for the ceph-osd NRPE check Also update test env, remove zed testing Closes-Bug: #2019251 Closes-Bug: #2021507 Change-Id: Ib50414756165f2587f0127e572675c7ca8e31ef9 (cherry picked from commit 3bfe28dba2fe07b9742c27d2f4fbb38d70d589c3) * Use single credential for configuring object storage gw in dashboard (quincy) The radosgw relation provides the same credential mapped to the hostnames of all the related radosgw application units. This extra information is not needed. Even when multiple radosgw applications are present in the same Juju model, a single instance of credentials is sufficient for dashbaord to present Object GW UI. (cherry picked from commit fa621d1062b90c3af809dd82641fd26e14e6324d) Change-Id: I52563fff70d957c82a1d3713e9e1cdf8e44b7386 * Fix version retrieval During cluster deployment a situation can arise where there are already osd relations but osds are not yet fully added to the cluster. This can make version retrieval fail for osds. Retry version retrieval to give the cluster a chance to settle. Conflicts: src/utils.py tests/bundles/jammy-zed.yaml Closes-Bug: #2058636 Change-Id: I12a1bcd32be2ed8a8e5ee0e304f716f5a190bd57 (cherry picked from commit bc26ab5ff268ad39ca9170193858e8f9e179f99c) * Don't expect a static job name A job name passed via the prometheus_scrape library doesn't end up as a static job name in the prometheus configuration file in the COS world even though COS expects a fixed string. Practically we cannot have a static job name like job=ceph in any of the alert rules in COS since the charms will convert the string "ceph" into: > juju_MODELNAME_ID_APPNAME_prometheus_scrape_JOBNAME(ceph)-N Let's give up the possibility of the static job name and use "up{}" so it will be annotated with the model name/ID, etc. without any specific job related condition. It will break the alert rules when one unit have more than one scraping endpoint because there will be no way to distinguish multiple scraping jobs. Ceph MON only has one prometheus endpoint for the time being so this change shouldn't cause an immediate issue. Overall, it's not ideal but at least better than the current status, which is an alert error out of the box. The following alert rule: > up{} == 0 will be converted and annotated as: > up{juju_application="ceph-mon",juju_model="ceph",juju_model_uuid="UUID"} == 0 Closes-Bug: #2044062 Change-Id: I0df8bc0238349b5f03179dfb8f4da95da48140c7 (cherry picked from commit 1ad57f6a3b167a0e2145accec7fa08c4ba2168cf) * Fix: defer cos-prometheus for bootstrap If a COS prometheus changed event is processed but bootstrap hasn't completed yet, we need to retry the event at a later time. Closes-bug: #2042891 (cherry-picked from commit 669c9056c3fe2538a6dac05e76206ec2c67fcb34) Change-Id: I5790e56f7879904504bee69924c2454c97c30474 * Retry setting rbd_stats_pools prometheus config Setting the 'mgr/prometheus/rbd_stats_pools' option can fail if we arrive too early, even if the cluster is bootstrapped. This is particularly seen in ceph-radosgw test runs. This patchset thus adds a retry decorator to work around this issue. Related-Bug: #2042405 Related-Bug: #2058636 Change-Id: Id9b7b903e67154e7d2bb6fecbeef7fac126804a8 (cherry picked from commit fc8741087eec9224ffb1bb2240b6cb43aacf911f) * Don't error out on missing OSDs Ceph reef has a behaviour change where it doesn't always return version keys for all components. In I12a1bcd32be2ed8a8e5ee0e304f716f5a190bd57 an attempt was made to fix this by retrying, however this code path can also be hit when a component such as OSDs are absent. While a cluster without OSDs wouldn't be functional it still should not cause the charm to error. As a fix, just make the OSD component optional when querying for a version instead of retrying. Closes-Bug: #2058636 Resolved Conflicts: src/utils.py Change-Id: I5524896c7ad944f6f22fb1498ab0069397b52418 (cherry picked from commit a62a3bbb6f219f0ed3d5a8bb3b49836b61844ecc) * Implement key rotation for Quincy This patchset implements the rotate-key and list-entities actions for Quincy. Change-Id: I431e6e0a3c7dcf2af2211528d30dac0745951ac3 * Add ipv6 bind flags Following https://tracker.ceph.com/issues/52867 we need to tell ceph which address family to use via the ms_bind_ipv4/6 config flags. I added them to the ceph.conf template and updated the config hook. Closes-Bug: #2056337 Change-Id: Ib735bd4876b6909762288b97857bccaa597c2b80 (cherry picked from commit 3510058b19338ef30e9f70d7d96d2490165677cb) * Implement key rotation on Quincy This patchset implements key rotation for Quincy. This needs to be done before merging to master as this action requires coordination between ceph-mon and ceph-osd, and these use quincy/edge to run the test bundles. Change-Id: I2a49b89c7438626f55347b4201803496557b28ec func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1201 * Implement key rotation for ceph-fs (Quincy) This patchset implements key rotation for the ceph-fs charm by receiving the new pending key from the ceph-mon charm and manually rotating it via Ceph's authtool. It makes use of the 'ceph-mds-relation-changed' hook for this. Change-Id: Ie0a431235fa6d2c74709f9b6c52ce16557990067 * Add support for the cos_agent relation This supports grafana dashboards and metrics scraping from the ceph mgr prometheus module. Have to build with charmcraft 2.6 for dependency handling Also remove zed tests as it's EOL Change-Id: I8b2f132a4997d205119f7afe2a1ab6b2ae4c0134 cherry-picked from 868adde Change-Id: Idd479cef04a24ea64af643bd6e142ac40906e86c func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1208 * Allow URLs which contain encoded path separators This is to resolve the issue with objects containing slash in the name not correctly synced in multisite environments. Closes-Bug: #1974138 Change-Id: I71ac000bb4754c9cb987d703f145dc2a5ff032ad (cherry picked from commit 68c139c65e658e9dff8777f8a42e21c16d20f3e6) * Defer restart of services on AppArmor change AppArmor changes cause restarts of all OSD services in all units at the same time, which can cause ceph-cluster outage. Defer actual update and set a status message prompting to run an action for each unit separately. Related-bug: #2068020 Change-Id: I32398a0525b7098503de36d72e593c14207102a1 (cherry picked from commit b4a870af2c74638f139d73a09dc61cd43865c4f5) (cherry picked from commit 4b7098ca96e88039fbe08b93be5ec80b64318f62) (cherry picked from commit d0910705e480c0e20b183fd8537910acd104c3cc) * Don't make any changes during update-status hooks Previously the config_changed function was invoked during the update-status hooks. And it made unnecessary changes to the system. Guard reactive functions properly. > INFO unit.ceph-fs/0.juju-log Invoking reactive handler: > reactive/ceph_fs.py:42:config_changed Also, pin `path` to workaround the charm-tools issue temporarily. Resolved Conflicts: src/reactive/ceph_fs.py unit_tests/test_reactive_ceph_fs.py Closes-Bug: #2074349 Related-Bug: #2071780 Change-Id: If6cd061fef4c3625d6d498942949e31f243622df (cherry picked from commit 032949448fc6d1a472ff5d3040b0862b893c85d8) (cherry picked from commit 8092b516ea53915e246f4be8ccc45bb0aa28d76c) (cherry picked from commit f1e6a1a3f021b474e9ffeb81669a0053e924ef45) * Fix finding local osds Previously, this function could crash upon encountering some non-osd files such as `ceph.client.crash.keyring`. Copy the logic from `find_filestore_osds()` to be more correct for finding the ceph osd directories. Closes-Bug: #2072920 Change-Id: I632008b10cfb7f667163c9381ae48432cbd65547 (cherry picked from commit 46dbc89d57dd8e0f9e1072ac90d95084f3b099c9) * Allow the user to skip Bluestore features (Quincy) This patchset allows users to skip either the WAL, DB or both bluestore devices when adding an OSD. It does so by modifying the 'add-disk' action to take an additional parameter, called 'bluestore-skip' which specifies which features to avoid using. Change-Id: Ief8eef7050d6887950e6f3cbdec078adf180ff69 * Add group policy configuration Allow configuration of a zone group default sync policy. This is useful in scenarios where we want to have selective buckets sync. Valuable especially with the new `cloud-sync` relation. This is based on Ceph multisite sync policy: https://docs.ceph.com/en/latest/radosgw/multisite-sync-policy/ Additionally, three more Juju actions are added to selectively enable, disable, or reset buckets sync: * `enable-buckets-sync` * `disable-buckets-sync` * `reset-buckets-sync` These new actions are meant to be used in conjunction with a default zone group sync policy that allows syncing, but it's disabled by default. Change-Id: I4a8076192269aaeaca50668ebcebc0a52c6d2c84 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1193 Signed-off-by: Ionut Balutoiu <[email protected]> (cherry picked from commit 0dddd11d80129cf69acde38dc4734183827e8e49) Signed-off-by: Utkarsh Bhatt <[email protected]> * Defer cos-prometheus for bootstrap When the cluster is not yet bootstrapped, we need to defer the event of enabling the prometheus module. This is the same logic as I3d274c09522f9d7ef56bc66f68d8488150c125d8. Closes-bug: #2074337 Related-bug: #2042891 Change-Id: Id9fd3c8bad504bfe7610de856798114f2b8c0fd3 (cherry picked from commit 8f59007236bae09cfaf1df38c650c4144ca84ee7) * Build fix: charm-helper spelling Newer charmcraft is more strict about spelling dependencies, accomodate that. This has been done on master as part of e74b95f6d753dbb64c4ba9a36055e319376f669c which we do not want to backport in full Change-Id: I978379c639e6bf7f3b729b1e361ece754f692d7f * Add antelope to the UCA codename map According to https://docs.openstack.org/charm-guide/latest/project/charm-delivery.html#tracks-for-the-openstack-charms-project quincy is the supported release for OpenStack 2023.1 (antelope), so antelope must be included in the UCA codename map. Otherwise the charm cannot determine correctly what action should be taken after upgrading the `source` to antelope. This can result in the charm potentially attempting to upgrade to version `None` and crashing. Change-Id: Ic9f6c5260e1396980b7a5316484ca5e970172de9 * Fix: add scrape configs on non-leaders as well Closes-bug: #2084663 Change-Id: If1b0595446d78fe451ce331d968b5d653f027291 Signed-off-by: Peter Sabaini <[email protected]> * Fix a bug cephfs subvolume size calculation The charm is documented to take the 'size' in gigabytes. But when passing it down to 'ceph fs subvolume', it's incorrectly calculating the bytes. Closes-Bug: #2078019 Change-Id: I94ebe1bf506ef7741dbf9d2975a7ba82405a41ff Signed-off-by: Ponnuvel Palaniyappan <[email protected]> (cherry picked from commit 28a1bb3f3c184991da255e0780e784f14b2f3b3f) * Add a config option for virtual hosted bucket func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1187 Closes-Bug: #1871745 Change-Id: I295baab496d1eb95daaa8073d4119d01b90d0b38 (cherry picked from commit aef9cd274e375542b8cf9f99321aa56dbc2530a9) * Update workflow file * Onboard ceph-dashboard * Onboard ceph-fs * Onboard ceph-mon * Onboard ceph-nfs * Onboard ceph-osd * Onboard ceph-proxy * Onboard ceph-radosgw * Onboad ceph-rbd-mirror * Fix unit tests in ceph-rbd-mirror * Fix tests * PEP8 fixes for ceph-proxy * More test fixes * Fix tests for ceph-fs and ceph-proxy * PEP8 fix for ceph-proxy * More test fixes * Fix source in ceph-rbd-mirror * More test fixes * Dashboard fixes * More fixes for dashboard tests * Use the correct source * Fix source usage * Don't colocate ceph-nfs and ceph-mon * Remove logging notice * Onboard the iscsi charm --------- Signed-off-by: Ionut Balutoiu <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]> Signed-off-by: Peter Sabaini <[email protected]> Co-authored-by: Zuul <[email protected]> Co-authored-by: Chris MacNaughton <[email protected]> Co-authored-by: Robert Gildein <[email protected]> Co-authored-by: James Page <[email protected]> Co-authored-by: Billy Olsen <[email protected]> Co-authored-by: Alex Kavanagh <[email protected]> Co-authored-by: Aurelien Lourot <[email protected]> Co-authored-by: Ethan Myers <[email protected]> Co-authored-by: peppepetra86 <[email protected]> Co-authored-by: Juan Pablo Norena <[email protected]> Co-authored-by: Chi Wai, Chan <[email protected]> Co-authored-by: Connor Chamberlain <[email protected]> Co-authored-by: Gokhan Cetinkaya <[email protected]> Co-authored-by: Hicham El Gharbi <[email protected]> Co-authored-by: Peter Matulis <[email protected]> Co-authored-by: utkarshbhatthere <[email protected]> Co-authored-by: Chris MacNaughton <[email protected]> Co-authored-by: Corey Bryant <[email protected]> Co-authored-by: Peter Sabaini <[email protected]> Co-authored-by: Edin Sarajlic <[email protected]> Co-authored-by: James Page <[email protected]> Co-authored-by: Nobuto Murata <[email protected]> Co-authored-by: Samuel Walladge <[email protected]> Co-authored-by: alitvinov <[email protected]> Co-authored-by: jneo8 <[email protected]> Co-authored-by: Jadon Naas <[email protected]> Co-authored-by: Felipe Reyes <[email protected]> Co-authored-by: Pedro Castillo <[email protected]> Co-authored-by: Federico Bosi <[email protected]> Co-authored-by: Rodrigo Barbieri <[email protected]> Co-authored-by: Samuel Allan <[email protected]> Co-authored-by: Ionut Balutoiu <[email protected]> Co-authored-by: Ponnuvel Palaniyappan <[email protected]> Co-authored-by: Shunde Zhang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ceph-fs charm sometimes creates an entity called 'mds.None'. This is probably a bug, but in the meantime, we filter it out in the key rotation test class.