Skip to content

Commit

Permalink
[stable/2023.2] Build all images (#1361)
Browse files Browse the repository at this point in the history
Depends-On: #1410
  • Loading branch information
mnaser authored Jun 21, 2024
1 parent 315f574 commit 142dc92
Show file tree
Hide file tree
Showing 39 changed files with 333 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

Expand Down
4 changes: 2 additions & 2 deletions images/barbican/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG BARBICAN_GIT_REF=ca57ef5436e20e90cf6cd6853efe3c89a9afd986
ARG BARBICAN_GIT_REF=00274b2f07d050c5b4571bfc0f4e5698acf678f1
ADD --keep-git-dir=true https://opendev.org/openstack/barbican.git#${BARBICAN_GIT_REF} /src/barbican
RUN git -C /src/barbican fetch --unshallow
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
Expand Down
8 changes: 4 additions & 4 deletions images/cinder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG CINDER_GIT_REF=b0f0b9015b9dfa228dff98eeee5116d8eca1c3cc
ARG CINDER_GIT_REF=4e00f1b2c1ebf8c819a90c254f62f2552919da7b
ADD --keep-git-dir=true https://opendev.org/openstack/cinder.git#${CINDER_GIT_REF} /src/cinder
RUN git -C /src/cinder fetch --unshallow
COPY patches/cinder /patches/cinder
Expand All @@ -18,10 +18,10 @@ pip3 install \
storpool.spopenstack
EOF
ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/cinder/openstack/bobcat/storpool.py \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/cinder/openstack/antelope/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/cinder/volume/drivers/storpool.py
ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/bobcat/storpool.py \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/antelope/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/os_brick/initiator/connectors/storpool.py

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
Expand Down
2 changes: 1 addition & 1 deletion images/cluster-api-provider-openstack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

FROM alpine/git:2.43.0 AS src
ARG CAPO_VERSION=v0.9.0
Expand Down
4 changes: 2 additions & 2 deletions images/designate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG DESIGNATE_GIT_REF=097ffc6df181290eba1bcd7c492b1b505bc15434
ARG DESIGNATE_GIT_REF=2c817b3d7f01de44023f195c6e8de8853683a54a
ADD --keep-git-dir=true https://opendev.org/openstack/designate.git#${DESIGNATE_GIT_REF} /src/designate
RUN git -C /src/designate fetch --unshallow
COPY patches/designate /patches/designate
Expand Down
8 changes: 4 additions & 4 deletions images/glance/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG GLANCE_GIT_REF=0bcd6cd71c09917c6734421374fd598d73e8d0cc
ARG GLANCE_GIT_REF=5e2acc91a4fcc834e3faea3ddb2d0ea13e2af606
ADD --keep-git-dir=true https://opendev.org/openstack/glance.git#${GLANCE_GIT_REF} /src/glance
RUN git -C /src/glance fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/glance_store.git#master /src/glance_store
ADD --keep-git-dir=true https://opendev.org/openstack/glance_store.git#stable/2023.2 /src/glance_store
RUN git -C /src/glance_store fetch --unshallow
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
pip3 install \
Expand All @@ -18,7 +18,7 @@ pip3 install \
storpool.spopenstack
EOF
ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/bobcat/storpool.py \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/antelope/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/os_brick/initiator/connectors/storpool.py

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
Expand Down
4 changes: 2 additions & 2 deletions images/heat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG HEAT_GIT_REF=80eea85194825773d1b60ecc4386b2d5ba52a066
ARG HEAT_GIT_REF=39eca5de2e193f652792e4f7be2e5eb96dd3d853
ADD --keep-git-dir=true https://opendev.org/openstack/heat.git#${HEAT_GIT_REF} /src/heat
RUN git -C /src/heat fetch --unshallow
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
Expand Down
20 changes: 11 additions & 9 deletions images/horizon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG HORIZON_GIT_REF=3f1f1d46e6e47a3dbe46fb023fe69ff25d6a601b
ARG HORIZON_GIT_REF=593ef9b56191676d0a85b55bd152c0c757fad2de
ADD --keep-git-dir=true https://opendev.org/openstack/horizon.git#${HORIZON_GIT_REF} /src/horizon
RUN git -C /src/horizon fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/designate-dashboard.git#master /src/designate-dashboard
ADD --keep-git-dir=true https://opendev.org/openstack/designate-dashboard.git#stable/2023.2 /src/designate-dashboard
RUN git -C /src/designate-dashboard fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/heat-dashboard.git#master /src/heat-dashboard
ADD --keep-git-dir=true https://opendev.org/openstack/heat-dashboard.git#stable/2023.2 /src/heat-dashboard
RUN git -C /src/heat-dashboard fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/ironic-ui.git#master /src/ironic-ui
ADD --keep-git-dir=true https://opendev.org/openstack/ironic-ui.git#stable/2023.2 /src/ironic-ui
RUN git -C /src/ironic-ui fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/magnum-ui.git#master /src/magnum-ui
ADD --keep-git-dir=true https://opendev.org/openstack/magnum-ui.git#stable/2023.2 /src/magnum-ui
RUN git -C /src/magnum-ui fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/manila-ui.git#master /src/manila-ui
ADD --keep-git-dir=true https://opendev.org/openstack/manila-ui.git#stable/2023.2 /src/manila-ui
RUN git -C /src/manila-ui fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/neutron-vpnaas-dashboard.git#master /src/neutron-vpnaas-dashboard
ADD --keep-git-dir=true https://opendev.org/openstack/neutron-vpnaas-dashboard.git#stable/2023.2 /src/neutron-vpnaas-dashboard
RUN git -C /src/neutron-vpnaas-dashboard fetch --unshallow
ADD --keep-git-dir=true https://opendev.org/openstack/octavia-dashboard.git#master /src/octavia-dashboard
ADD --keep-git-dir=true https://opendev.org/openstack/octavia-dashboard.git#stable/2023.2 /src/octavia-dashboard
RUN git -C /src/octavia-dashboard fetch --unshallow
COPY patches/horizon /patches/horizon
RUN git -C /src/horizon apply --verbose /patches/horizon/*
COPY patches/magnum-ui /patches/magnum-ui
RUN git -C /src/magnum-ui apply --verbose /patches/magnum-ui/*
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
From aa21f4baa38fc70549b1c7341361519de6362d9b Mon Sep 17 00:00:00 2001
From: okozachenko <[email protected]>
Date: Thu, 2 Nov 2023 01:27:20 +1100
Subject: [PATCH] fix: ignore errors when flavors are deleted

The code used to list flavors when in the admin
or project side was not consistent and raised
alerts if viewing in the admin side but not in the
project side.

This patch moves their behaviour to be consistent
and refactors the code to use the same code-base.

Closes-Bug: #2042362
Change-Id: I37cc02102285b1e83ec1343b710a57fb5ac4ba15
---
.../dashboards/admin/instances/tests.py | 4 ----
.../dashboards/admin/instances/views.py | 17 +++++------------
.../dashboards/project/instances/tests.py | 1 +
.../dashboards/project/instances/views.py | 11 +++--------
4 files changed, 9 insertions(+), 24 deletions(-)

diff --git a/openstack_dashboard/dashboards/admin/instances/tests.py b/openstack_dashboard/dashboards/admin/instances/tests.py
index 3630cb79a..c6cf65e5d 100644
--- a/openstack_dashboard/dashboards/admin/instances/tests.py
+++ b/openstack_dashboard/dashboards/admin/instances/tests.py
@@ -133,10 +133,6 @@ class InstanceViewTest(test.BaseAdminViewTests):
res = self.client.get(INDEX_URL)
instances = res.context['table'].data
self.assertTemplateUsed(res, INDEX_TEMPLATE)
- # Since error messages produced for each instance are identical,
- # there will be only one error message for all instances
- # (messages de-duplication).
- self.assertMessageCount(res, error=1)
self.assertCountEqual(instances, servers)

self.assertEqual(self.mock_image_list_detailed.call_count, 4)
diff --git a/openstack_dashboard/dashboards/admin/instances/views.py b/openstack_dashboard/dashboards/admin/instances/views.py
index c35527fe4..efa28dd76 100644
--- a/openstack_dashboard/dashboards/admin/instances/views.py
+++ b/openstack_dashboard/dashboards/admin/instances/views.py
@@ -33,6 +33,8 @@ from openstack_dashboard.dashboards.admin.instances \
from openstack_dashboard.dashboards.admin.instances \
import tables as project_tables
from openstack_dashboard.dashboards.admin.instances import tabs
+from openstack_dashboard.dashboards.project.instances \
+ import utils as instance_utils
from openstack_dashboard.dashboards.project.instances import views
from openstack_dashboard.dashboards.project.instances.workflows \
import update_instance
@@ -215,18 +217,9 @@ class AdminIndexView(tables.PagedTableMixin, tables.DataTableView):
else:
inst.image['name'] = _("-")

- flavor_id = inst.flavor["id"]
- try:
- if flavor_id in flavor_dict:
- inst.full_flavor = flavor_dict[flavor_id]
- else:
- # If the flavor_id is not in flavor_dict list,
- # gets it via nova api.
- inst.full_flavor = api.nova.flavor_get(
- self.request, flavor_id)
- except Exception:
- msg = _('Unable to retrieve instance size information.')
- exceptions.handle(self.request, msg)
+ inst.full_flavor = instance_utils.resolve_flavor(self.request,
+ inst, flavor_dict)
+
tenant = tenant_dict.get(inst.tenant_id, None)
inst.tenant_name = getattr(tenant, "name", None)
return instances
diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py
index 5ab1b4a48..fe2f58c46 100644
--- a/openstack_dashboard/dashboards/project/instances/tests.py
+++ b/openstack_dashboard/dashboards/project/instances/tests.py
@@ -316,6 +316,7 @@ class InstanceTableTests(InstanceTestBase, InstanceTableTestMixin):
self.mock_is_feature_available.return_value = True
self.mock_server_list_paged.return_value = [servers, False, False]
self.mock_servers_update_addresses.return_value = None
+ self.mock_flavor_get.side_effect = self.exceptions.nova
self.mock_flavor_list.side_effect = self.exceptions.nova
self.mock_image_list_detailed.return_value = (self.images.list(),
False, False)
diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py
index badf540b8..b848f6fff 100644
--- a/openstack_dashboard/dashboards/project/instances/views.py
+++ b/openstack_dashboard/dashboards/project/instances/views.py
@@ -171,14 +171,9 @@ class IndexView(tables.PagedTableMixin, tables.DataTableView):
for instance in instances:
self._populate_image_info(instance, image_dict, volume_dict)

- flavor_id = instance.flavor["id"]
- if flavor_id in flavor_dict:
- instance.full_flavor = flavor_dict[flavor_id]
- else:
- # If the flavor_id is not in flavor_dict,
- # put info in the log file.
- LOG.info('Unable to retrieve flavor "%s" for instance "%s".',
- flavor_id, instance.id)
+ instance.full_flavor = instance_utils.resolve_flavor(self.request,
+ instance,
+ flavor_dict)

return instances

--
2.34.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 4aa347fe196b7b18ff0bf5f4d4f076a6c14cf12e Mon Sep 17 00:00:00 2001
From: jeremy-boyle <[email protected]>
Date: Sat, 24 Jun 2023 16:59:11 +0000
Subject: [PATCH] Fixing Incorrect URL when browsing Swift containers

This patch fixes a bug identified in the code that generates the URL for
the Swift container object. The bug caused the forward slashes (/) in the
folder parameter to be encoded as %2F instead of being included as '/' in the
resulting URL.

To resolve this issue, the code has been updated by adding a replace() method
to replace the %2F sequences with forward slashes. The updated code ensures
that the URL generated for the folder parameter contains the correct forward
slash (/) representation.

Closes-Bug: #2009724
Signed-off-by: jeremy-boyle <[email protected]>

Change-Id: I5837e74ddcc71cda6b4686e586dbb8b1386a9cd3
---
.../static/dashboard/project/containers/objects.controller.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js
index 55262a1fa..c14128cbf 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js
@@ -60,7 +60,8 @@
ctrl.containerURL = containerRoute + encodeURIComponent($routeParams.container) +
ctrl.model.DELIMETER;
if (angular.isDefined($routeParams.folder)) {
- ctrl.currentURL = ctrl.containerURL + encodeURIComponent($routeParams.folder) +
+ ctrl.currentURL = ctrl.containerURL +
+ encodeURIComponent($routeParams.folder).replace(/%2F/g, '/') +
ctrl.model.DELIMETER;
} else {
ctrl.currentURL = ctrl.containerURL;
--
2.34.1
4 changes: 2 additions & 2 deletions images/ironic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG IRONIC_GIT_REF=22aa29b864eecd00bfb7c67cc2075030da1eb1d0
ARG IRONIC_GIT_REF=aa479f4426afe599a4494d57904daea6321ca4c7
ADD --keep-git-dir=true https://opendev.org/openstack/ironic.git#${IRONIC_GIT_REF} /src/ironic
RUN git -C /src/ironic fetch --unshallow
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
Expand Down
2 changes: 1 addition & 1 deletion images/keepalived/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

Expand Down
6 changes: 4 additions & 2 deletions images/keystone/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG KEYSTONE_GIT_REF=8ca73f758bb613a57815fbe4ae78e3d2afa4af49
ARG KEYSTONE_GIT_REF=7697140fc23cee66b17050651813ebe902671256
ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
RUN git -C /src/keystone fetch --unshallow
COPY patches/keystone /patches/keystone
RUN git -C /src/keystone apply --verbose /patches/keystone/*
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
pip3 install \
--constraint /upper-constraints.txt \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 6ee7ea0d63fed272beb3806d722c2dd3585e8212 Mon Sep 17 00:00:00 2001
From: Andrew Bonney <[email protected]>
Date: Tue, 5 Sep 2023 14:56:51 +0100
Subject: [PATCH] Ensure application credentials take account of implied roles

Related-Bug: #2030061
Change-Id: I2aea0b89987b24cf5ddaadeecbd06c32ad81a9bc
---
keystone/models/token_model.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/keystone/models/token_model.py b/keystone/models/token_model.py
index 78146295d..b152d97c2 100644
--- a/keystone/models/token_model.py
+++ b/keystone/models/token_model.py
@@ -429,7 +429,13 @@ class TokenModel(object):

def _get_application_credential_roles(self):
roles = []
+ roles_added = list()
app_cred_roles = self.application_credential['roles']
+ app_cred_roles = [{'role_id': r['id']} for r in app_cred_roles]
+ effective_app_cred_roles = (
+ PROVIDERS.assignment_api.add_implied_roles(app_cred_roles)
+ )
+
assignment_list = PROVIDERS.assignment_api.list_role_assignments(
user_id=self.user_id,
project_id=self.project_id,
@@ -437,9 +443,12 @@ class TokenModel(object):
effective=True)
user_roles = list(set([x['role_id'] for x in assignment_list]))

- for role in app_cred_roles:
- if role['id'] in user_roles:
+ for role in effective_app_cred_roles:
+ if role['role_id'] in user_roles and \
+ role['role_id'] not in roles_added:
+ role = PROVIDERS.role_api.get_role(role['role_id'])
roles.append({'id': role['id'], 'name': role['name']})
+ roles_added.append(role['id'])

return roles

--
2.34.1
2 changes: 1 addition & 1 deletion images/kubernetes-entrypoint/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

FROM golang:1.21 AS build
ARG KUBERNETES_ENTRYPOINT_GIT_REF=4fbcf7ce324dc66e78480f73035e31434cfea1e8
Expand Down
2 changes: 1 addition & 1 deletion images/libvirtd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-05-30T20:29:01Z
# Atmosphere-Rebuild-Time: 2024-06-17T13:34:17Z

ARG RELEASE

Expand Down
Loading

0 comments on commit 142dc92

Please sign in to comment.