Skip to content

Commit 9dfaeb6

Browse files
authored
Merge pull request #678 from rackerlabs/nova-container
feat(nova): build our own container with patches
2 parents 0b070c0 + 2a62b96 commit 9dfaeb6

File tree

6 files changed

+445
-1
lines changed

6 files changed

+445
-1
lines changed

.github/workflows/containers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
project: [ironic, neutron, keystone, openstack-client]
28+
project: [ironic, neutron, keystone, nova, openstack-client]
2929
openstack: [2024.2]
3030

3131
steps:

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ extend-exclude = [
55
"assets",
66
"schema/argo-workflows.json",
77
"python/understack-workflows/tests/json_samples/",
8+
"containers/*/patches",
89
]
910

1011
[default]

containers/nova/Dockerfile.nova

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# syntax=docker/dockerfile:1
2+
3+
ARG OPENSTACK_VERSION="required_argument"
4+
FROM docker.io/openstackhelm/nova:${OPENSTACK_VERSION}-ubuntu_jammy
5+
6+
RUN apt-get update && \
7+
apt-get install -y --no-install-recommends \
8+
patch \
9+
quilt \
10+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
11+
12+
COPY containers/nova/patches /tmp/patches/
13+
RUN cd /var/lib/openstack/lib/python3.10/site-packages && \
14+
QUILT_PATCHES=/tmp/patches quilt push -a
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 092752cac3f1821b2a72a2d255a4538b78ed543d Mon Sep 17 00:00:00 2001
2+
From: Doug Goldstein <[email protected]>
3+
Date: Mon, 17 Feb 2025 17:19:16 -0600
4+
Subject: [PATCH] ironic: fix logging of validation errors
5+
6+
When validation of the node fails, since switching to the SDK the
7+
address of the ValidationResult object is displayed instead of the
8+
actual message. This has been broken since patch
9+
Ibb5b168ee0944463b996e96f033bd3dfb498e304.
10+
11+
Change-Id: I8fbdaadd125ece6a3050b2fbb772a7bd5d7e5304
12+
Signed-off-by: Doug Goldstein <[email protected]>
13+
---
14+
nova/virt/ironic/driver.py | 12 +++++++++---
15+
1 file changed, 9 insertions(+), 3 deletions(-)
16+
17+
diff --git a/nova/virt/ironic/driver.py b/nova/virt/ironic/driver.py
18+
index 9d6bd32126..7279af09ad 100644
19+
--- a/nova/virt/ironic/driver.py
20+
+++ b/nova/virt/ironic/driver.py
21+
@@ -1213,14 +1213,20 @@ class IronicDriver(virt_driver.ComputeDriver):
22+
):
23+
# something is wrong. undo what we have done
24+
self._cleanup_deploy(node, instance, network_info)
25+
+ deploy_msg = ("No Error" if validate_chk['deploy'].result
26+
+ else validate_chk['deploy'].reason)
27+
+ power_msg = ("No Error" if validate_chk['power'].result
28+
+ else validate_chk['power'].reason)
29+
+ storage_msg = ("No Error" if validate_chk['storage'].result
30+
+ else validate_chk['storage'].reason)
31+
raise exception.ValidationError(_(
32+
"Ironic node: %(id)s failed to validate. "
33+
"(deploy: %(deploy)s, power: %(power)s, "
34+
"storage: %(storage)s)")
35+
% {'id': node.id,
36+
- 'deploy': validate_chk['deploy'],
37+
- 'power': validate_chk['power'],
38+
- 'storage': validate_chk['storage']})
39+
+ 'deploy': deploy_msg,
40+
+ 'power': power_msg,
41+
+ 'storage': storage_msg})
42+
43+
# Config drive
44+
configdrive_value = None
45+
--
46+
2.39.5 (Apple Git-154)

0 commit comments

Comments
 (0)