65 Commits

Author SHA1 Message Date
Liam Young
1be0cabea2 Switch to usinging consolidated rock
Change-Id: Idac9bef1249596fa5beef0a889be4fdae633a08b
2023-07-11 10:17:48 +00:00
Guillaume Boutry
5fd3f703ce 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
47ab216582 Merge "Enforce min juju version and k8s substrate" into main 2023-06-14 12:50:26 +00:00
Liam Young
71970a1fef Enforce min juju version and k8s substrate
Change-Id: I1b08d80592766be9a5899b50d8364789e74aabc8
2023-06-13 16:15:05 +00:00
Zuul
255feb0942 Merge "Remove kubernetes_service_patch in favor of open-port" into main 2023-06-13 11:58:12 +00:00
Guillaume Boutry
a483352edc 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
0f5a1cc339 Default logging to syslog
Change-Id: I8bbc1bf83ef57d205e87cde2ebc224e5ebda2159
2023-06-12 14:35:30 +02:00
Guillaume Boutry
2b9e9adeb2 Update metadata.yaml's base and assumes
Change-Id: Ib53340a171c57114508ccbef2a7391226fc7dff2
2023-06-01 09:30:11 +02:00
Liam Young
e2b9e1d494 Update bundle to use antelope charms
Change-Id: Ibcdf2db02078ca29d1dd3bcb9acfb98c5b78e7f6
2023-05-29 13:54:50 +00:00
Zuul
1f30df59b9 Merge "Trivial change to trigger republish" into main 2023-05-26 09:18:19 +00:00
Zuul
34aaa0c455 Merge "Fix publishing channel" into main 2023-05-26 09:18:18 +00:00
Liam Young
1ac1af1bd8 Trivial change to trigger republish
Change-Id: Iad38c7d8aa0fb672de897fea5cea66d6531bb2e1
2023-05-25 10:21:35 +00:00
Liam Young
192652a9ad Fix publishing channel
Change-Id: I9a52e36c0bbfa7565199d92f45dfd558c5ea92e5
2023-05-25 10:17:47 +00:00
Liam Young
8d1f27b672 Switch to 2023.3
Switch charm to 2023.3 rock(s).

Change-Id: Ifd0bdb07c6b35ecafcb0983733e5cae1442b3756
2023-05-24 18:28:44 +00:00
Liam Young
59566b26dd 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
f68638072b 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
5920717657 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
168ae6c216 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
1071c84673 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
3ba24d543e 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
df696d2fce 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
3b7f53c049 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
833636e5f0 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
3a89316b75 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
6db620be43 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
95ea3c5948 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
476e104dd8 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
9838b2e4b3 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
af0009f6c7 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
fcf143bd16 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
0cf34f7d16 Switch to rabbitmq-k8s operator
Renamed from sunbeam-rabbitmq-operator.

Change-Id: Ieac62d1f6fe2c681915b3446731293f71681563c
2022-10-31 08:02:55 +01:00
James Page
fc1fd10ab0 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
f0a937f2d8 Merge "Switch to using hostnames for addressing" into main 2022-10-21 05:05:47 +00:00
James Page
03d1778356 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
a67ee8651f Add functional tests
Change-Id: I60b82f9c09f9d5b3c7b4caf3c0a7184989a206a7
2022-10-20 11:21:15 +00:00
James Page
da8f128c58 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
68808176e7 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
f8c994ad42 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
1abb5415ae 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
103e2ba813 Merge "Add healthcheck to OVN services" into main 2022-09-26 13:20:31 +00:00
Liam Young
a3f95508f2 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
f6a4cd6887 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
d9b89eadc2 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
e6237cab71 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
Zuul
55906e5906 Merge "Remove charmcraft clean from tox build target" into main 2022-08-23 09:57:40 +00:00
Samuel Walladge
54c651c302 Remove charmcraft clean from tox build target
Unnecessary, and slows down rebuilds

Change-Id: I289a36fbf1e8e7fbc0c51244e4c0bf515ee45603
2022-08-15 12:42:43 +09:30
Samuel Walladge
3024e26015 Add source and issues urls to metadata
So we can find the repo from the charmhub page.

Change-Id: I3cb6574a475f931d83f324cb314f5aa716a3e601
2022-08-15 12:42:03 +09:30
Hemanth Nakkina
7676c9b81c specify image digest for OCI images
Update upstream-source in metadata.yaml to OCI image
digest instead of image with tag. This will help in
pinning the image to a specific revision instead of a
moving pointer based on tag.

Change-Id: Ic4324dc8c908fd2d3b613fdb1d631e0fa29df3c1
2022-08-11 20:08:52 +05:30
Hemanth Nakkina
a81db4d06a Remove references to old github
Remove references in documentation to openstack-charmers
repos.
Remove github workflows.
Add .gitreview file
Add .zuul.yaml file
Update packages in requirements file to point to
opendev.org instead of github.com

Change-Id: Ib72255da7fdee624160e230ed828f8deea898b17
2022-08-05 06:46:06 +05:30
Hemanth Nakkina
98d56d0073 Sync global tox, requirement files
Following changes are done as part of this patch:
* Sync global tox, requirements.txt, test-requirements
from release-tools project
* Resolve flake errors
* Fix templates to handle optional ingress relations
* Remove run_tests script
* Restructure unit tests directory
2022-07-27 12:53:24 +05:30