Switch to Antelope

Switch charm to antelope rock(s) and misc antelope fixes

Due to limited resources in gate and max connections limit
in mysq, this PR reduces the number of deployed apps.

Change-Id: I6fbdd76f863853354fd6e6fb885975ff7d542a7a
This commit is contained in:
Liam Young 2023-05-24 10:29:26 +00:00
parent b63d855bab
commit 5e20fa2bff
9 changed files with 38 additions and 72 deletions

View File

@ -48,7 +48,7 @@ run:
To deploy the local test instance:
juju deploy ./neutron-k8s_ubuntu-20.04-amd64.charm --trust --resource neutron-server-image=kolla/ubuntu-binary-neutron-server:yoga
juju deploy ./neutron-k8s_ubuntu-20.04-amd64.charm --trust --resource neutron-server-image=ghcr.io/openstack-snaps/neutron-server:2023.1
<!-- LINKS -->

View File

@ -50,7 +50,7 @@ neutron-k8s requires the following relations:
## OCI Images
The charm by default uses `docker.io/kolla/ubuntu-binary-neutron-server:yoga` image.
The charm by default uses `ghcr.io/openstack-snaps/neutron-server:2023.1` image.
## Contributing

View File

@ -25,8 +25,8 @@ resources:
neutron-server-image:
type: oci-image
description: OCI image for OpenStack Neutron API
# docker.io/kolla/ubuntu-binary-neutron-server:yoga
upstream-source: docker.io/kolla/ubuntu-binary-neutron-server@sha256:b473d7e2ecf9b3e9ec5be06cd8df3a06db80a50c629773ed388c2a253d7f3ca5
# ghcr.io/openstack-snaps/neutron-server:2023.1
upstream-source: ghcr.io/openstack-snaps/neutron-server:2023.1
provides:
neutron-api:

View File

@ -7,4 +7,4 @@
build_type: charmcraft
publish_charm: true
charmcraft_channel: 2.0/stable
publish_channel: yoga/edge
publish_channel: 2023.1/edge

View File

@ -28,6 +28,8 @@ import ops_sunbeam.charm as sunbeam_charm
import ops_sunbeam.config_contexts as sunbeam_ctxts
import ops_sunbeam.container_handlers as sunbeam_chandlers
import ops_sunbeam.core as sunbeam_core
import ops_sunbeam.guard as sunbeam_guard
import ops_sunbeam.job_ctrl as sunbeam_job_ctrl
import ops_sunbeam.ovn.relation_handlers as ovn_rhandlers
import ops_sunbeam.relation_handlers as sunbeam_rhandlers
from ops.framework import (
@ -276,6 +278,28 @@ class NeutronOVNOperatorCharm(NeutronOperatorCharm):
handlers = super().get_relation_handlers(handlers)
return handlers
@sunbeam_job_ctrl.run_once_per_unit("post-db-sync-restart")
def _post_db_sync_restart(self) -> None:
# If neutron-server is running prior to the db-sync the
# hash ring job can wedge communication with ovn so restart
# neutron-server. Note that the run_once_per_unit decorator
# ensure this is only run once.
handler = self.get_named_pebble_handler("neutron-server")
logger.debug("Restarting neutron-server after db sync")
handler.start_all(restart=True)
@sunbeam_job_ctrl.run_once_per_unit("db-sync")
def run_db_sync(self) -> None:
"""Run db sync and restart neutron-server."""
super().run_db_sync()
self._post_db_sync_restart()
def configure_app_non_leader(self, event):
"""Setup steps for a non-leader after leader has bootstrapped."""
if not self.bootstrapped:
raise sunbeam_guard.WaitingExceptionError("Leader not ready")
self._post_db_sync_restart()
if __name__ == "__main__":
main(NeutronOVNOperatorCharm)

View File

@ -1,4 +1,4 @@
[composite:neutron] [6/10808]
[composite:neutron]
use = egg:Paste#urlmap
/: neutronversions_composite
/healthcheck: healthcheck

View File

@ -2,6 +2,7 @@
core_plugin = ml2
debug = {{ options.debug }}
log_dir = /var/log/neutron
state_path = /var/lib/neutron
router_distributed = False
@ -28,6 +29,9 @@ global_physnet_mtu = 1500
transport_url = {{ amqp.transport_url }}
[oslo_concurrency]
lock_path = $state_path/lock
[agent]
root_helper = "sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf"

View File

@ -33,33 +33,17 @@ applications:
storage:
fernet-keys: 5M
credential-keys: 5M
glance:
charm: ch:glance-k8s
channel: yoga/edge
scale: 1
trust: true
storage:
local-repository: 5G
nova:
charm: ch:nova-k8s
channel: yoga/edge
scale: 1
trust: true
placement:
charm: ch:placement-k8s
channel: yoga/edge
scale: 1
trust: true
neutron:
charm: ch:neutron-k8s
charm: ../../neutron-k8s.charm
scale: 1
trust: true
options:
debug: true
resources:
neutron-server-image: kolla/ubuntu-binary-neutron-server:yoga
neutron-server-image: ghcr.io/openstack-snaps/neutron-server:2023.1
ovn-central:
charm: ch:ovn-central-k8s
channel: 22.03/edge
channel: 23.03/edge
scale: 1
trust: true
tls-operator:
@ -78,41 +62,6 @@ relations:
- - traefik-public:ingress
- keystone:ingress-public
- - mysql:database
- glance:database
- - rabbitmq:amqp
- glance:amqp
- - keystone:identity-service
- glance:identity-service
- - traefik:ingress
- glance:ingress-internal
- - traefik-public:ingress
- glance:ingress-public
- - mysql:database
- nova:database
- - mysql:database
- nova:api-database
- - mysql:database
- nova:cell-database
- - rabbitmq:amqp
- nova:amqp
- - keystone:identity-service
- nova:identity-service
- - traefik:ingress
- nova:ingress-internal
- - traefik-public:ingress
- nova:ingress-public
- - mysql:database
- placement:database
- - keystone:identity-service
- placement:identity-service
- - traefik:ingress
- placement:ingress-internal
- - traefik-public:ingress
- placement:ingress-public
- - mysql:database
- neutron:database
- - rabbitmq:amqp

View File

@ -5,8 +5,6 @@ smoke_bundles:
configure:
- zaza.openstack.charm_tests.keystone.setup.wait_for_all_endpoints
- zaza.openstack.charm_tests.keystone.setup.add_tempest_roles
- zaza.openstack.charm_tests.nova.setup.create_flavors
- zaza.openstack.charm_tests.nova.setup.manage_ssh_key
tests:
- zaza.openstack.charm_tests.neutron.tests.NeutronTempestTestK8S
tests_options:
@ -41,12 +39,6 @@ target_deploy_status:
rabbitmq:
workload-status: active
workload-status-message-regex: '^$'
nova:
workload-status: active
workload-status-message-regex: '^$'
glance:
workload-status: active
workload-status-message-regex: '^$'
neutron:
workload-status: active
workload-status-message-regex: '^$'
@ -59,9 +51,6 @@ target_deploy_status:
mysql:
workload-status: active
workload-status-message-regex: '^.*$'
placement:
workload-status: active
workload-status-message-regex: '^$'
tls-operator:
workload-status: active
workload-status-message-regex: '^$'