Skip to content

Commit

Permalink
Add build for 2023.2 Bobcat (#371)
Browse files Browse the repository at this point in the history
Use the same repos for erlang and rabbitmq that upstream has switched
to.

Update OVN to v23.09.1.

Signed-off-by: Dr. Jens Harbott <[email protected]>
  • Loading branch information
osfrickler authored Dec 4, 2023
1 parent e6eb3ac commit 9ab0ae4
Show file tree
Hide file tree
Showing 15 changed files with 649 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
name: semaphore-container-images-kolla-push-antelope
max: 1

- semaphore:
name: semaphore-container-images-kolla-push-bobcat
max: 1

- job:
name: container-images-kolla-build
nodeset: ubuntu-jammy-large
Expand All @@ -118,6 +122,13 @@
version_openstack: "2023.1"
push_images: false

- job:
name: container-images-kolla-build-bobcat
parent: container-images-kolla-build
vars:
version_openstack: "2023.2"
push_images: false

- job:
name: container-images-kolla-push-zed
parent: container-images-kolla-build
Expand All @@ -144,6 +155,19 @@
secret: SECRET_CONTAINER_IMAGES_KOLLA
pass-to-parent: true

- job:
name: container-images-kolla-push-bobcat
parent: container-images-kolla-build
semaphores:
- name: semaphore-container-images-kolla-push-bobcat
vars:
version_openstack: "2023.2"
push_images: true
secrets:
- name: secret
secret: SECRET_CONTAINER_IMAGES_KOLLA
pass-to-parent: true

- job:
name: container-images-kolla-release
parent: container-images-kolla-build
Expand All @@ -165,6 +189,7 @@
jobs:
- container-images-kolla-build-zed
- container-images-kolla-build-antelope
- container-images-kolla-build-bobcat
gate:
jobs:
- flake8
Expand All @@ -175,12 +200,15 @@
- yamllint
- container-images-kolla-push-zed
- container-images-kolla-push-antelope
- container-images-kolla-push-bobcat
post:
jobs:
- container-images-kolla-push-zed:
branches: main
- container-images-kolla-push-antelope:
branches: main
- container-images-kolla-push-bobcat:
branches: main
tag:
jobs:
- container-images-kolla-release
3 changes: 3 additions & 0 deletions defaults/2023.2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export BUILD_ID=$(date +%Y%m%d)
export KOLLA_TYPE=
export BASE_VERSION=22.04
Binary file added overlays/2023.2/base/erlang.gpg
Binary file not shown.
Binary file added overlays/2023.2/base/osism.gpg
Binary file not shown.
Binary file added overlays/2023.2/base/rabbitmq.gpg
Binary file not shown.
11 changes: 11 additions & 0 deletions overlays/2023.2/base/sources.list.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Default repos
deb http://archive.ubuntu.com/ubuntu/ jammy main universe
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe
deb http://archive.ubuntu.com/ubuntu/ jammy-security main universe

# Backports have a lower priority and must be explicitly installed to be used
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main universe

# We need to add the repo for the updated packages they provide. The main ones
# are qemu, libvirt, and openvswitch.
deb http://ubuntu-cloud.archive.canonical.com/ubuntu jammy-updates/bobcat main
54 changes: 54 additions & 0 deletions patches/2023.2/cinder/driver_filter_domain_id.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
--- a/cinder/scheduler/filters/driver_filter.py
+++ b/cinder/scheduler/filters/driver_filter.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.

+from keystoneauth1 import loading as ks_loading
+from oslo_config import cfg
from oslo_log import log as logging

from cinder.scheduler.evaluator import evaluator
@@ -20,6 +22,7 @@ from cinder.scheduler import filters


LOG = logging.getLogger(__name__)
+CONF = cfg.CONF


class DriverFilter(filters.BaseBackendFilter):
@@ -139,6 +142,34 @@ class DriverFilter(filters.BaseBackendFilter):
request_spec = filter_properties.get('request_spec', {})
volume_stats = request_spec.get('volume_properties', {})

+ # NOTE: This is a special filter. It allows to map a single domain to a specific
+ # storage backend. This filter cannot be used in combination with other
+ # filters at the moment. The code path is only activated if volume.domain_id
+ # is set as a filter function in a storage backend.
+ if "volume.domain_id" in filter_function:
+ if "volume" in request_spec:
+ request_spec_type = "volume"
+ elif "volume_properties" in request_spec:
+ request_spec_type = "volume_properties"
+ else:
+ request_spec_type = None
+ if request_spec_type and "project_id" in request_spec[request_spec_type]:
+ LOG.debug('Creating Keystone auth plugin from conf')
+ n_auth = ks_loading.load_auth_from_conf_options(CONF, 'nova')
+ session = ks_loading.load_session_from_conf_options(
+ CONF, 'nova', auth=n_auth)
+ project_id = request_spec[request_spec_type]["project_id"]
+ resp = session.get('/projects/%s' % project_id,
+ endpoint_filter={'service_type': 'identity',
+ 'interface': 'internal',
+ 'min_version': '3',
+ 'max_version': 'latest'})
+ data = resp.json()
+ volume_stats["domain_id"] = data["project"]["domain_id"]
+ else:
+ filter_function = None
+ uses_protocol = False
+
stats = {
'backend_stats': backend_stats,
'backend_caps': backend_caps,
175 changes: 175 additions & 0 deletions patches/2023.2/kolla/build-ovn-from-sources.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
diff --git a/docker/ovn/ovn-base/Dockerfile.j2 b/docker/ovn/ovn-base/Dockerfile.j2
index 247eab83a..2f2e4c7a7 100644
--- a/docker/ovn/ovn-base/Dockerfile.j2
+++ b/docker/ovn/ovn-base/Dockerfile.j2
@@ -5,20 +5,52 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% block ovn_base_header %}{% endblock %}

-{% import "macros.j2" as macros with context %}
-
-{% if base_package_type == 'rpm' %}
- {% set ovn_base_packages = [
- 'openvswitch-ovn-common',
- ] %}
-
-{% elif base_package_type == 'deb' %}
- {% set ovn_base_packages = [
- 'ovn-common',
- ] %}
-
-{% endif %}
-{{ macros.install_packages(ovn_base_packages | customizable("packages")) }}
+# based on https://gitlab.com/yaook/images/ovn/-/blob/devel/Dockerfile
+# and https://ovn-org.readthedocs.io/en/latest/intro/install/general.html
+
+RUN apt-get update \
+ && apt-get install -y \
+ git \
+ build-essential \
+ autoconf \
+ automake \
+ libtool \
+ libssl-dev \
+ libcap-ng-dev \
+ libunbound-dev \
+ libjemalloc-dev \
+ libunbound8 \
+ iproute2 \
+ jq \
+ libjemalloc2 \
+ procps \
+ && git clone -b v23.09.1 --depth 1 https://github.com/ovn-org/ovn.git /ovn \
+ && cd /ovn \
+ && ./boot.sh \
+ && git submodule update --init --depth 1 \
+ && cd /ovn/ovs \
+ && ./boot.sh \
+ && ./configure --localstatedir=/var --sysconfdir=/etc --prefix=/usr CFLAGS="-g -O2 -march=broadwell" LIBS=-ljemalloc \
+ && gmake -j 4 \
+ && make -j 4 install \
+ && cd /ovn \
+ && ./configure --localstatedir=/var --sysconfdir=/etc --prefix=/usr CFLAGS="-g -O2 -march=broadwell" LIBS=-ljemalloc \
+ && gmake -j 4 \
+ && make -j 4 install \
+ && apt-get remove -y \
+ git \
+ build-essential \
+ autoconf \
+ automake \
+ libtool \
+ libssl-dev \
+ libcap-ng-dev \
+ libunbound-dev \
+ libjemalloc-dev \
+ && rm -rf \
+ /var/lib/apt/lists/* \
+ /var/tmp/* \
+ && rm -rf /ovn

COPY extend_start.sh /usr/local/bin/kolla_extend_start

diff --git a/docker/ovn/ovn-controller/Dockerfile.j2 b/docker/ovn/ovn-controller/Dockerfile.j2
index ef4d05ddc..78e05ebb0 100644
--- a/docker/ovn/ovn-controller/Dockerfile.j2
+++ b/docker/ovn/ovn-controller/Dockerfile.j2
@@ -4,21 +4,5 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% endblock %}

{% block ovn_controller_header %}{% endblock %}
-
-{% import "macros.j2" as macros with context %}
-
-{% if base_package_type == 'rpm' %}
- {% set ovn_controller_packages = [
- 'openvswitch-ovn-host'
- ] %}
-
-{% elif base_package_type == 'deb' %}
- {% set ovn_controller_packages = [
- 'ovn-host'
- ] %}
-
-{% endif %}
-{{ macros.install_packages(ovn_controller_packages | customizable("packages")) }}
-
{% block ovn_controller_footer %}{% endblock %}
{% block footer %}{% endblock %}
diff --git a/docker/ovn/ovn-nb-db-server/Dockerfile.j2 b/docker/ovn/ovn-nb-db-server/Dockerfile.j2
index ecc94651b..24838f6e7 100644
--- a/docker/ovn/ovn-nb-db-server/Dockerfile.j2
+++ b/docker/ovn/ovn-nb-db-server/Dockerfile.j2
@@ -5,21 +5,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% block ovn_nb_db_server_header %}{% endblock %}

-{% import "macros.j2" as macros with context %}
-
-{% if base_package_type == 'rpm' %}
- {% set ovn_nb_db_server_packages = [
- 'openvswitch-ovn-central',
- ] %}
-
-{% elif base_package_type == 'deb' %}
- {% set ovn_nb_db_server_packages = [
- 'ovn-central',
- ] %}
-
-{% endif %}
-{{ macros.install_packages(ovn_nb_db_server_packages | customizable("packages")) }}
-
COPY start_nb_db_server.sh /usr/local/bin/start-nb-db-server
RUN chmod 755 /usr/local/bin/start-nb-db-server

diff --git a/docker/ovn/ovn-northd/Dockerfile.j2 b/docker/ovn/ovn-northd/Dockerfile.j2
index 2c94f2f20..f0f94d380 100644
--- a/docker/ovn/ovn-northd/Dockerfile.j2
+++ b/docker/ovn/ovn-northd/Dockerfile.j2
@@ -4,21 +4,5 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% endblock %}

{% block ovn_northd_header %}{% endblock %}
-
-{% import "macros.j2" as macros with context %}
-
-{% if base_package_type == 'rpm' %}
- {% set ovn_northd_packages = [
- 'openvswitch-ovn-central',
- ] %}
-
-{% elif base_package_type == 'deb' %}
- {% set ovn_northd_packages = [
- 'ovn-central',
- ] %}
-
-{% endif %}
-{{ macros.install_packages(ovn_northd_packages | customizable("packages")) }}
-
{% block ovn_northd_footer %}{% endblock %}
{% block footer %}{% endblock %}
diff --git a/docker/ovn/ovn-sb-db-server/Dockerfile.j2 b/docker/ovn/ovn-sb-db-server/Dockerfile.j2
index 9acd01fa3..c1f40c0ee 100644
--- a/docker/ovn/ovn-sb-db-server/Dockerfile.j2
+++ b/docker/ovn/ovn-sb-db-server/Dockerfile.j2
@@ -5,21 +5,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% block ovn_sb_db_server_header %}{% endblock %}

-{% import "macros.j2" as macros with context %}
-
-{% if base_package_type == 'rpm' %}
- {% set ovn_sb_db_server_packages = [
- 'openvswitch-ovn-central',
- ] %}
-
-{% elif base_package_type == 'deb' %}
- {% set ovn_sb_db_server_packages = [
- 'ovn-central',
- ] %}
-
-{% endif %}
-{{ macros.install_packages(ovn_sb_db_server_packages | customizable("packages")) }}
-
COPY start_sb_db_server.sh /usr/local/bin/start-sb-db-server
RUN chmod 755 /usr/local/bin/start-sb-db-server

26 changes: 26 additions & 0 deletions patches/2023.2/neutron-dynamic-routing/bug-2023632.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
commit 8f5539abc054bd39d8f28fdcc52dcd5b220e3f1d
Author: Dr. Jens Harbott <[email protected]>
Date: Tue Jun 13 14:24:23 2023 +0200

DNM: Fix tenant subnet filtering

In _tenant_prefixes_by_router() a check for the matching ip_version was
missing, leading to neutron trying to announce additional cidrs.

TODO: Add testing and reno

Closes-Bug: 2023632
Change-Id: I843999d56b9b90af5bd8f4e102e64d261fd483fe

diff --git a/neutron_dynamic_routing/db/bgp_db.py b/neutron_dynamic_routing/db/bgp_db.py
index 0b9a7db..081c628 100644
--- a/neutron_dynamic_routing/db/bgp_db.py
+++ b/neutron_dynamic_routing/db/bgp_db.py
@@ -1018,6 +1018,7 @@ class BgpDbMixin(object):
l3_db.Router.gw_port_id == models_v2.Port.id,
models_v2.Port.network_id == binding.network_id,
binding.bgp_speaker_id == BgpSpeaker.id,
+ models_v2.Subnet.ip_version == binding.ip_version,
l3_db.RouterPort.port_type == DEVICE_OWNER_ROUTER_INTF,
models_v2.IPAllocation.port_id == l3_db.RouterPort.port_id]

13 changes: 13 additions & 0 deletions patches/2023.2/neutron/hotfix-gh688.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- a/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py
+++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py
@@ -825,8 +825,8 @@ class OVNMechanismDriver(api.MechanismDriver):
self._validate_ignored_port(port, original_port)
ovn_utils.validate_and_get_data_from_binding_profile(port)
self._validate_port_extra_dhcp_opts(port)
- ovn_utils.validate_port_binding_and_virtual_port(
- context, self.nb_ovn, self._plugin, port, original_port)
+ # ovn_utils.validate_port_binding_and_virtual_port(
+ # context, self.nb_ovn, self._plugin, port, original_port)
if self._is_port_provisioning_required(port, context.host,
context.original_host):
self._insert_port_provisioning_block(context.plugin_context,
Loading

0 comments on commit 9ab0ae4

Please sign in to comment.