Commit Graph

66 Commits (main)

Author SHA1 Message Date
Liam Young ddd38fa186
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: I47139a8d3203b4dc0953bc64491a9f58533d6a10
2023-09-18 13:28:47 +00:00
Liam Young 4c5651dd97 Re-enable functional tests
Change-Id: Ia6f564934a34338b5dbc7f8295c7ea63ffc14af6
2023-08-29 13:15:31 +00:00
Liam Young 38c25ff245 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: I797d7c8de6e5d4b8ad0b6fa5748645b6e46fd71a
2023-08-22 08:30:00 +00:00
Zuul fc75307db6 Merge "Switch to usinging consolidated rock" into main 2023-07-14 11:38:06 +00:00
Liam Young 7c24cceb9c Switch to usinging consolidated rock
Change-Id: I2eee99943fef63144e42f9dda2d038b921d79ccb
2023-07-11 10:19:24 +00:00
James Page fbdbfbe6ed Use IP's instead of hostnames
When the OVN relay process starts early and the hostnames for the OVN
central units are not fully resolvable, the relay process gets stuck
in a state when it will never actually connect to the underlying OVN
central units.

Use IP addresses instead of hostnames to avoid this situation; this
does mean the relay will restart if the IP addresses change which
can and will happen during normal operation.

Closes-Bug: 2026596
Change-Id: Ib2cfa13f73182a3ab9cc37fc056fb78c972269a6
2023-07-11 10:08:38 +01:00
James Page fbcceb8386 logging: log everything to the console
Ensure that all logging goes to the console rather than syslog so
that its consumed by pebble and propagated up to k8s.

Change-Id: Id77c631e53ee1a063738f942ab74b13140696d18
2023-07-11 09:56:58 +01:00
Zuul 2f06476d20 Merge "Enforce min juju version and k8s substrate" into main 2023-06-14 12:51:46 +00:00
Liam Young 7d8498bd15 Enforce min juju version and k8s substrate
Change-Id: Ifa20fdb32afd0eac2b55c8f99a7a84319d93627e
2023-06-13 16:11:48 +00:00
Guillaume Boutry eb1174932a
Default logging to syslog
Change-Id: Ic58103b5cb6c6548400c1d481ce65bc76299d860
2023-06-12 14:36:02 +02:00
Guillaume Boutry 69f0e5b355
Update metadata.yaml's base and assumes
Change-Id: I17f6bc0f504210520769ff0340ac272b57b11040
2023-06-01 09:30:22 +02:00
Liam Young e8b7fe9234 Update bundle to use antelope charms
Change-Id: Ic084c42afde8982c7102548f3be5b982eece6e3d
2023-05-29 13:57:53 +00:00
Zuul e93f25caa2 Merge "Trivial change to trigger republish" into main 2023-05-26 09:16:09 +00:00
Liam Young 96ecd5e156 Trivial change to trigger republish
Change-Id: I539aed4652dd829771b70b123071d3ee8b2dd6f7
2023-05-25 10:22:06 +00:00
Liam Young 0f02830a00 Fix publishing channel
Change-Id: I10d6befac752d0457a697bb976c7cf0466bd3fc5
2023-05-25 10:19:31 +00:00
Liam Young ed175b33f0 witch to 2023.3
Switch charm to 2023.3 rock(s).

Change-Id: Ie7bf6060a833565f4f46d5f0f6fa13fa1b9b487c
2023-05-24 18:24:49 +00:00
Guillaume Boutry b08b2a6ab1
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: I96e7effad26922e36c00178c8a087b0a2511b7bf
2023-04-21 16:23:02 +02:00
James Page b95f92267e tests: Update mysql to use stable channel
Update mysql-k8s to use 8.0/stable channel.

Change-Id: I99ec0abd3e6b27945514e14e2538b07959b2a238
2023-04-17 15:55:41 +01:00
Guillaume Boutry 069a9daca6
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: I44ee58cb9f5ddee6339bcd207365a2dcb49ac006
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
2023-04-13 19:33:05 +02:00
Liam Young 294e26135c Add relation handler for ovsdb-cms-relay
ovsdb-cms-relay was missing a relation handler so was not
responding to clients.

Change-Id: I7d0319ba1f17acdc3ea0216ce4e381e145dc0f3d
2023-04-03 07:42:09 +00:00
Hemanth Nakkina 6733f74b1d Rebuild ovn-relay-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: Ie011182637289ec76533b2a3425a32d38651dd75
2023-03-10 05:43:48 +05:30
Hemanth Nakkina aaa5fca487 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: I9d11caa4dc2176a72297c6cc1e406372d906d048
2023-03-08 09:22:38 +05:30
Liam Young d73eee3964 Update after ops_sunbeam configure_charm changes
* Stop using deprecated use_juju_for_storage=True

Depends-On: I6b46bae1dc700f5e8b597374c660c0af9c069172
Change-Id: I49dc446f6ee866110c0cdd2c5896bca80d8d9775
2023-02-27 07:39:45 +00:00
James Page e6dc694962 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 full gating for functional test.

Change-Id: I7760e788c8cab86c2a3e1f012e2f20d48fb7ba8c
2023-01-19 09:47:46 +00:00
Hemanth Nakkina e546313fa2 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: I4553fc0625b4965f7a04593b6eb2cd9c4abc1b72
2023-01-18 16:23:02 +05:30
Hemanth Nakkina ea5025cbd9 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: I0f211b43bd9a8fec14cccd3699181e7f9bd34542
2023-01-17 22:04:11 +05:30
Hemanth Nakkina c442199eaa Remove use of stored state for service_ready
Remove saving service_ready in stored state in
OVnRelayPebbleHandler class.

Change-Id: Ib222f9df3270728e912faa825a936ed29398252c
2023-01-06 15:58:01 +05:30
James Page cc6315fa89 Bind relay to local address rather than hostname
The use of local hostname seems to confuse later versions of
ovsdb-server; switch to implicit binding to all local addresses.

Change-Id: Ieb84177d239e02346addf0af3cf1ed1e812dbcb7
2022-12-06 12:39:31 +00:00
James Page a6b38d5f73 Upgrade charm to OpenStack Yoga
Update OCI image.

Refresh bundles.

Update OSCI publisher.

Make default test/bundle name release agnostic.

Change-Id: Ia6337fcb4a3343852a1a626fef2163b54f3b0756
2022-11-22 10:03:01 +00:00
James Page b1a2c20cc7 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: Iaf8d9fe7fcc94edf8f21c877ad03dd4e7343c22c
2022-11-05 08:19:59 +01:00
Liam Young 262048c6f1 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: Ied1e6a797645f58a84fe4aad20080ba585f54d19
2022-11-04 09:00:19 +00:00
James Page 7e99d0460c Add functional testing gate
Add functional test and Zuul configuration for execution in the
OpenDev check/gate jobs.

Change-Id: I24ea2c9938082275a5358802cc7619c78f1d1395
2022-11-01 15:26:50 +01:00
James Page 04d6b4a427 Adapt to presentation of IP addresses
Not all clients can use hostnames for OVS DB URL's so changes
in this area have been reverted/adapted.  The OVN relay can so
ensure it uses the new context properties for hostname based
URL's.

Depends-On: Iefe8ad601b305e3fdab7548e1d3357493491d3e9
Change-Id: I5a03590946099b50651570f411f0c6cc3a13f115
2022-10-24 13:24:02 +01:00
James Page 4ee370ca47 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: Ib4629e0d2228ba2b94c7652d75ef861c8324441e
2022-10-21 09:11:13 +01:00
James Page 4f6c7e9241 Update libs for new namespaces
Update from old sunbeam POC name to new ovn-central-k8s name.

Change-Id: I743eab39c419ced17fa34bf43439b110d56c4339
2022-10-17 16:33:29 +01:00
James Page f98f9f6690 Make charm accessible and introspectable
By default, expose this charm as a LoadBalancer service to allow
external access from outside of K8S which is its principle use
case.

Add action to allow introspection of the deployed service for
the URL to connect to the Southbound DB relay.

Change-Id: Ie234ca70d9090be463b5c971a8f01302958c91f5
2022-10-11 14:28:47 +01:00
Zuul 38f9b79ba1 Merge "Start ovn-relay service" into main 2022-10-11 07:58:47 +00:00
James Page 4385f663e7 Ensure relay listens with TLS enabled
ptcp -> pssl should do the job.

Change-Id: I1f13e8d134073c5a72d9fa0cc4c01374767f7815
2022-10-07 15:52:15 +01:00
James Page 99817e4990 Enable use of port 6642 through service.
Use the K8S ServicePatcher to enable access to this service
via port 6642 (SouthboundDB).

Change-Id: Ia6dab89e6800a8a1c3173302721fb860831bbe3c
2022-10-07 15:40:22 +01:00
Hemanth Nakkina ba6e6ea537 Start ovn-relay service
Currently the ovn-relay service is initialized
with the configuration but the service is not
started. Add service start to the initialization
process.

Change-Id: I7dc49ab3fd98d208d0ed20d078efcd02acee62ad
2022-09-26 11:11:51 +05:30
Hemanth Nakkina 01e378a4e2 Add healthcheck to OVN relay service
Add status_command to ovn-relay service
that can be used for healthcheck of
ovn-relay ovsdb-server container.

Change-Id: Id503f74e54f9132242861d1491c0b0d6133f8816
2022-09-23 09:36:57 +00:00
Hemanth Nakkina e98f6012b0 Add mandatory relations
Add mandatory relations to charm

Depends-On: https://review.opendev.org/c/openstack/charm-ops-sunbeam/+/854508
Change-Id: If45becb3c342cfdfa6fc5fd102fa3fc4e00c41dc
2022-09-21 18:59:14 +05:30
Hemanth Nakkina c0edd1efae 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: I737badefa19fd8d65def0ab79cadaa63d7d93b5a
2022-09-09 08:58:35 +05:30
Zuul b29ccf9d0a Merge "Remove charmcraft clean from tox" into main 2022-08-23 09:53:07 +00:00
Samuel Walladge d2f04738d4 Remove charmcraft clean from tox
Unnecessary, and makes rebuilds really slow.

Change-Id: Ieb2fc6082b8d33894fc21a798fba00634a3b17a9
2022-08-18 08:43:59 +09:30
Samuel Walladge 6a5df414ed Add source and issues urls to metadata
So we can find the repo and bugtracker from the charmhub page.

Change-Id: Ia903da0686968fb936d59b244d7e575e4e8c237b
2022-08-18 08:42:37 +09:30
Hemanth Nakkina dee759ea2d 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: I824a85b0997734b31e919ec76231576976379524
2022-08-11 20:09:37 +05:30
Hemanth Nakkina 83ef4feec8 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: Ia8916da44e1ea9cd8123b1d6a2db6e4a36c768b2
2022-08-05 06:41:21 +05:30
Billy Olsen a0904e7a01
Merge pull request #9 from hemanthnakkina/global-sync
Sync global tox, requirement files
2022-07-27 19:21:25 -07:00
Hemanth Nakkina 28f3d1ce17 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
* Restructure unit tests directory
2022-07-27 12:53:49 +05:30