Commit Graph

85 Commits (main)

Author SHA1 Message Date
Liam Young b7d777d50a
Add 'extra' test dep
python-subunit 1.4.3+ requires 'extras' otherwise an error
occures:
"'run --slowest' is not a stestr command."

Switch to using self-signed-certificates-operator as the
self signed functionality has been removed from
tls-certificates-operator charm *1

*1 2cb418cd2e

Change-Id: I630a26ad4463f2bccc8cfd11a8c8863421e642dc
2023-09-18 12:54:33 +00:00
Liam Young 32fde0afef Re-enable functional tests
Change-Id: I8cd992d9837fcef2afc5279ccd59dafa477ef6d1
2023-08-29 13:15:31 +00:00
Liam Young ea1ef97d26 Permit Juju 3.1
Allow juju 3.1 as CMR fixes should have been backported and 3.1 has a longer
life than 3.2

Change-Id: I7f136c163eb763330c7ff4ef5e914321f7fe2fcf
2023-08-22 08:30:00 +00:00
Zuul 118f19ece5 Merge "logging: send all logs to the console" into main 2023-07-18 02:18:13 +00:00
Liam Young 31cde86404 Switch to usinging consolidated rock
Change-Id: Idac9bef1249596fa5beef0a889be4fdae633a08b
2023-07-11 10:17:48 +00:00
James Page 7aa4ada3d8 logging: send all logs to the console
Forward all logs to the console, ensuring they are consumed by
pebble and propagated up to Kubernetes.

Change-Id: I8f3c7c0abd49c9f71f2b6e4bb85ee486ed64e478
2023-07-11 11:12:37 +01:00
Guillaume Boutry fe0e7c0ecf
Add retry on cluster status
Sometimes status is called too fast for ovndb to be able to create
the communication socket

Change-Id: I4a5419d241979e1456a2cd9037e49bef442743b8
2023-06-15 13:24:41 +02:00
Zuul 19de88ed31 Merge "Enforce min juju version and k8s substrate" into main 2023-06-14 12:50:26 +00:00
Liam Young 2b6b8df57f Enforce min juju version and k8s substrate
Change-Id: I1b08d80592766be9a5899b50d8364789e74aabc8
2023-06-13 16:15:05 +00:00
Zuul 82dc34a3c3 Merge "Remove kubernetes_service_patch in favor of open-port" into main 2023-06-13 11:58:12 +00:00
Guillaume Boutry 9571580461
Remove kubernetes_service_patch in favor of open-port
Defining service port is implemented using open-port hook, remove
kubernetes_service_patch.

Change-Id: Ib037d268c9914b4313a8feabf683ffeecdf033a9
2023-06-13 11:46:05 +02:00
Guillaume Boutry d4c8cfbeaa
Default logging to syslog
Change-Id: I8bbc1bf83ef57d205e87cde2ebc224e5ebda2159
2023-06-12 14:35:30 +02:00
Guillaume Boutry 49fcbcee00
Update metadata.yaml's base and assumes
Change-Id: Ib53340a171c57114508ccbef2a7391226fc7dff2
2023-06-01 09:30:11 +02:00
Liam Young 4e656edd2d Update bundle to use antelope charms
Change-Id: Ibcdf2db02078ca29d1dd3bcb9acfb98c5b78e7f6
2023-05-29 13:54:50 +00:00
Zuul 4c026d8091 Merge "Trivial change to trigger republish" into main 2023-05-26 09:18:19 +00:00
Zuul d0ca4f8856 Merge "Fix publishing channel" into main 2023-05-26 09:18:18 +00:00
Liam Young c81cff895c Trivial change to trigger republish
Change-Id: Iad38c7d8aa0fb672de897fea5cea66d6531bb2e1
2023-05-25 10:21:35 +00:00
Liam Young 583c0c60ac Fix publishing channel
Change-Id: I9a52e36c0bbfa7565199d92f45dfd558c5ea92e5
2023-05-25 10:17:47 +00:00
Liam Young 1dccb20dd7 Switch to 2023.3
Switch charm to 2023.3 rock(s).

Change-Id: Ifd0bdb07c6b35ecafcb0983733e5cae1442b3756
2023-05-24 18:28:44 +00:00
Liam Young 1e37e2b998 Tighten regex when looking for ovn db file
The payload containers sb, nb and northd have a shared db dir. The join
wrapper skips the join command if it detects an existing ovn db. But the regex
used by the join command is not specific enough. So the sb would skip the join
if the nb db was present. This patch tightens the regex so that the join
wrappers look for their own db.

Change-Id: I20b139244664a5218c236ec28756fefd617cc668
2023-05-17 11:33:50 +00:00
Guillaume Boutry c5793b0765
Add dependencies with native components as binary packages
The build time is very long because of PIP having to fetch and build
native components of the libraries. This change show a possible way to
bypass this issue. This has implication regarding the platform it's
running on. In this case, we know the charm is going to be run on a
22.04 container.

Change-Id: Ib0d57b872364b8eba6320bb36269c2fcaf7fedb7
2023-04-21 16:22:22 +02:00
James Page 6146ed8c77 tests: Update mysql to use stable channel
Update mysql-k8s to use 8.0/stable channel.

Change-Id: I1a156f983247c6209449256c3d3fe91adb2b35e6
2023-04-17 15:54:48 +01:00
Guillaume Boutry 9d9fae5a94
Update kubernetes_service_patch to v1
v1 of the kubernetes_service_patch lib will patches the service
definition on `status_update` event. This helps when Juju refreshes the
patched services to their initial state.

Depends-On: https://review.opendev.org/c/openstack/charm-ops-sunbeam/+/880270
Change-Id: I1369a3ca6cabc7c34c958671e1638ca89bb256df
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
2023-04-13 18:20:27 +02:00
Liam Young 6094780648 Update OVNCentralOperatorCharm super class
Update OVNCentralOperatorCharm super class after update in
ops_sunbeam.

Change-Id: I206f6e48a63acd5cdab7bde98beda5eb9b31fa43
2023-03-29 08:11:52 +00:00
Hemanth Nakkina aebdfbc3d8 Rebuild ovn-central-k8s with latest charm-ops-sunbeam
This is a commit with no change to pick the latest
charm-ops-sunbeam changes. Important one being
the fix on juju secret for TLS private key [1]

[1] 4b9def9c96

Change-Id: I9ee9428659d14379dfeb057d83f92f87efee6231
2023-03-10 05:43:04 +05:30
Hemanth Nakkina eaa36d3134 Use juju 3.1 for CI tests
Update the snaps to use in functional tests:
juju snap to 3.1 and microk8s snap to 1.26-strict.

Update zaza requirement to use libjuju-3.1 branch.

Change-Id: I6e251140c6426b9d58c6ca7302f395c275bbf99d
2023-03-08 09:21:13 +05:30
Liam Young 4c5a5bfd19 Update after ops_sunbeam configure_charm changes
* Switch to using new `configure_charm` structure
* Stop using key self._state.bootstrapped and use property self.bootstrapped()
  instead.
* Stop using deprecated use_juju_for_storage=True

Depends-On: I6b46bae1dc700f5e8b597374c660c0af9c069172
Change-Id: I7d759a7f1474a6f37c4cd597bfe733f5c0ec32ae
2023-02-27 07:38:45 +00:00
James Page a196238584 Wildcard unit status message for mysql
All we care about is whether the unit is active or not; the
message is somewhat irrelevant and has been changed in this
operator recently.

Re-enable gating for functional testing.

Change-Id: I9c3abf83421a2933f01fa99f4cc0fe29b2c57164
2023-01-19 09:48:18 +00:00
Hemanth Nakkina 4b6e03e0d4 update allowlist_externals with full path
publish-charm failed to execute rename.sh
as it is not allowed.
Add abosulte path for rename.sh, fetch-libs.sh
in allowlist_externals.

Change-Id: I177adb1d6a5900c5433e795e98ec14f7a94d33d1
2023-01-18 16:19:49 +05:30
Hemanth Nakkina f1700babd8 Use tls-certificates-interface library
Use tls-certificates-interface library from
https://charmhub.io/tls-certificates-interface/libraries/tls_certificates

Fix py3 failures due to cryptography package
clashes from zaza. Move zaza dependcies from
test-requirements to tox

Depends-On: https://review.opendev.org/c/openstack/charm-ops-sunbeam/+/865410
Change-Id: Ia8769bbccfd0d9b97bd2334e1f4c2e40387d2b20
2023-01-17 20:17:30 +05:30
James Page c3c60ddc1f clustering: guard join process for follower units
Ensure that the expected cluster size has been reached prior to
executing the join process for NB and SB ovsdb-server instances.

Ensure that OVN databases are stored on a persistent volume
to support charm upgrades.

Change-Id: I70ded229ff4c1c2f1d70bd052699bdd641489290
2022-12-13 10:50:10 +00:00
James Page e2e8b956bf Upgrade charm to OpenStack Yoga
Update OCI image.

Refresh bundles.

Update OSCI publisher.

Make default test/bundle name release agnostic.

Change-Id: I68246ec54749b238f3a2ca21d914f4ec7c05e0ea
2022-11-22 09:49:21 +00:00
Hemanth Nakkina 5f0342b0ab Update bootstrap status to Active
When the bootstrap is completed, it is
required to update bootstrap status as
well from maintenance to Active. This
patch updates the bootstrap status to active
when bootstrap is marked as True.

Change-Id: I9c547778ed211ab17732c0a9c224a3b306ffb63d
2022-11-08 10:21:36 +05:30
James Page be12466907 Mark charm as bootstrapped
As part of the configuration method ensure that the charm is
marked as bootstrapped when the method completes.

This ensures that the deployed application units don't get
stuck in a maintenance/waiting state.

Change-Id: Iddcabbd398c5a715d74b5168d1b16594dad662a5
2022-11-07 14:00:50 +00:00
James Page a565b0734b Rebase to Ubuntu 22.04
Rebase charm to ubuntu 22.04 to resolve build issues on 20.04
and reduce complexity of requirements management.

Change-Id: I03448dde3a8d4e9a67d4087e68863cec5a870a90
2022-11-05 08:18:44 +01:00
Liam Young da77fe4fa7 General tidy for module ready for release.
Refresh charm to drop release usage in ops-sunbeam.

Drop surplus template fragments.

Refresh unit tests.

Tidy requirements.txt.

Switch to black + other linters.

Tidy docstrings across operator.

Change-Id: I75df01d000d74878e7313fa556b16eef2ca4c9ff
2022-11-04 07:33:26 +00:00
James Page 1831ea6a8d Switch to rabbitmq-k8s operator
Renamed from sunbeam-rabbitmq-operator.

Change-Id: Ieac62d1f6fe2c681915b3446731293f71681563c
2022-10-31 08:02:55 +01:00
James Page 6d380aaf5a Restore use of addresses on ovsdb-cms interface
Not all clients can use hostnames so present IP address information
as well so clients can pick and choose depending on capability.

Depends-On: Iefe8ad601b305e3fdab7548e1d3357493491d3e9
Change-Id: Ia2cf78b16694328ed2de236a54e5193b36d9aad5
2022-10-24 13:11:57 +01:00
Zuul 79fbfb8302 Merge "Switch to using hostnames for addressing" into main 2022-10-21 05:05:47 +00:00
James Page 41541a3863 Switch to using hostnames for addressing
K8S pods can change IP during charm upgrades; switch to using
the fully qualified hostname for participating units for
connectivity between units.  Hostnames won't change and are
dynamically managed by K8S.

Depends-On: Ief5c816ab5fbeb55aadf2b83697858f2ecb28807
Change-Id: I2410c19226484d802d95c198d4c1df8763181e09
2022-10-20 14:55:02 +01:00
Liam Young df7e8ddbae Add functional tests
Change-Id: I60b82f9c09f9d5b3c7b4caf3c0a7184989a206a7
2022-10-20 11:21:15 +00:00
James Page 24b3f22a36 Rename ovsdb library
Place under the ovn_central_k8s namespace rather than the old
sunbeam POC name.

Change-Id: I682d19466d0589221a5ba173d9693f6c102cc94b
2022-10-17 16:23:23 +01:00
James Page 58a6b095b8 Disable RBAC for OVN SB DB port
RBAC + OVN relay is not currently supported so disable RBAC on
the OVN SB DB port until this is supported by OVN.

Drive-by fix to link config.yaml into tests directory.

Change-Id: If3de99d678d4e81ccd3db53eb8f2e4b31494e8d0
2022-10-14 08:00:53 +01:00
James Page 2a04799acb Correct ports for K8S service patching
Ensure that the NB and SB ports are configured for the service
rather than the clustering ports.

Change-Id: I7c23902195046005ec9d137c2dbf3774331a3f18
2022-09-30 12:18:27 +01:00
Hemanth Nakkina 7868889ff6 Start ovn-northd service
Start ovn-northd service as part of
configure_charm.
Remove get_named_pebble_handlers as
it is moved to ops_sunbeam library.

Change-Id: I01792aa0a7b7fc00e692b0074afcaab84abc6008
2022-09-29 07:43:48 +05:30
Zuul f9156bb4c1 Merge "Add healthcheck to OVN services" into main 2022-09-26 13:20:31 +00:00
Liam Young 8ef85a728f Fix race when certificates relation is ready first
If the certificates relation is ready the charm can attempt to
start the pebbles handlers before they are ready. This change
causes the configure_charm to bail if any of the pebble handlers
are not ready. configure_charm calls will be called by subsequent
pebble_redy events.

Change-Id: I16dc6b2e25ef31f3619303c4424f80de4d65e626
2022-09-26 10:53:00 +00:00
Hemanth Nakkina 0f136d0d0a Add healthcheck to OVN services
Add healthcehck to the OVN service.
ovn-northd can be checked using ovn-ctl command
but for the ovsdb servers the ovn-ctl always
returns 0. So tcp check is added for ovn nb db
and ovn sb db.

Change-Id: I722aa0b00bed9802d85ecebd6cd45b3fc6b95903
2022-09-26 11:04:16 +05:30
Hemanth Nakkina 38ef365c9d Add mandatory relations
Add mandatory relations to charm

Depends-On: https://review.opendev.org/c/openstack/charm-ops-sunbeam/+/854508
Change-Id: Ieef86d96b6e491b92d82c3c5c261fe2acec772f3
2022-09-21 18:46:25 +05:30
Hemanth Nakkina 72d5b7bb59 Add osci yaml
Add project templates and variables to osci.yaml
Add rename script to change built charm name to
charm_build_name defined in osci.yaml

Change-Id: I746b8a5964bd5f8ab43616b1820981567729278c
2022-09-09 08:55:24 +05:30