If the multi-site relation is established, the `ceph-radosgw` application
cannot be scaled out.
This is happening because the multi-site functions are part of
`check_optional_config_and_relations`, which is called by `assess_status`
after every successful hook in the main hook entrypoint:
```
if __name__ == '__main__':
try:
hooks.execute(sys.argv)
except UnregisteredHookError as e:
log('Unknown hook {} - skipping.'.format(e))
except ValueError as e:
# Handle any invalid configuration values
status_set(WORKLOAD_STATES.BLOCKED, str(e))
else:
assess_status(CONFIGS)
```
The multi-site functions (for example: `is_multisite_configured` or
`check_cluster_has_buckets`) will fail since the unit is not be ready
for service.
This change ensures that the unit is ready for service before calling
any multi-site functions.
Closes-Bug: #2062405
Change-Id: I63c21a0b545bb456df9b09d8c16cc43cd7eec2f3
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
This patchset implements key rotation in the ceph-radosgw charm,
by replacing the keyring file if it exists and the ceph-mon
relation reports a new key.
Change-Id: I447b5f827e39118e7dbd430b1c63b3ec4ea3e176
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1195
Update tox.ini to support the new TEST_CONSTRAINTS_FILE
Additionally pin netaddr in test-requirements.txt. The latest netaddr
1.2.1 release throws an error when passed None, which it previously
didn't. This causes MonContextTest.test_ctxt_missing_data to error out.
This should probably be fixed in charmhelpers later.
Change-Id: I5bf8900c426395421c73ec3d52ebd691cc5496f8
The Openstack libs don't recognize Ceph releases when specifying
the charm source. Instead, we have to use an Openstack release.
Since it was set to quincy, reset it to bobcat.
Change-Id: I5b82c876184025a790e2b0cab84348c71a8a4a55
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
Patch out charmhelpers.osplatform.get_platform() and
charmhelpers.core.host.lsb_release() globally in the unit tests to
insulate the unit tests from the platform that the unit tests are being
run on.
Also, add mock for `charmhelpers.contrib.openstack.context.is_ipv6_disabled`
in the `HAProxyContextTests.test_ctxt` unit test.
The charmhelpers function `is_ipv6_disabled` calls `sysctl` and this doesn't
exist on Debian container images. This fixes the following unit test failure:
```
FileNotFoundError: [Errno 2] No such file or directory: 'sysctl'
```
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Co-authored-by: Alex Kavanagh <alex.kavanagh@canonical.com>
Change-Id: I60bc9550a83eb342e78d3c1916d98bfaa8035572
Change functional testing to also test upgrades from charmhub version
to the locally built charm. Include a new test for installing a locally built charm from scratch.
Also pin some support charms to specific tracks.
Change-Id: I57937f55526f531cb807a876fd074f5f589b00ed
This is a rebuild/make sync for charms to pickup the fix in charmhelpers to fix
any inadvertant accesses of ['ca'] in the relation data before it is available
from vault in the certificates relation. Fix in charmhelpers is in [1].
[1] https://github.com/juju/charm-helpers/pull/824
Closes-Bug: #2028683
Change-Id: Ie05a9ff536700282dc0c66816b50efee5da62767
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.
Change-Id: I50112480bb3669de08ee85a9bf9a594b379e9ec3
There was a typo in actions.yaml for the resume action that was breaking
builds. This change fixes that typo. The charm will build.
Closes-Bug: 2030677
Change-Id: I4501c3142620dc6bff87f554a9f26b39ac4c927d
* sync charm-helpers to classic charms
* change openstack-origin/source default to quincy
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* add additional unit test https mocks needed since
charm-helpers commit 6064a34627882d1c8acf74644c48d05db67ee3b4
* update charmcraft_channel to 2.x/stable
Change-Id: I2d9c41c294668c3bb7fcba253adb8bc0c939d150
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
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
- 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: I05ce01c13efdd453c06e3c8d615d64bad6e27727
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
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
* 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
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
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
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
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