-
Notifications
You must be signed in to change notification settings - Fork 7
feat(nova): build our own container with patches #678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
ARG OPENSTACK_VERSION="required_argument" | ||
FROM docker.io/openstackhelm/nova:${OPENSTACK_VERSION}-ubuntu_jammy | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
patch \ | ||
quilt \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY containers/nova/patches /tmp/patches/ | ||
RUN cd /var/lib/openstack/lib/python3.10/site-packages && \ | ||
QUILT_PATCHES=/tmp/patches quilt push -a |
46 changes: 46 additions & 0 deletions
46
containers/nova/patches/0001-ironic-fix-logging-of-validation-errors.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 092752cac3f1821b2a72a2d255a4538b78ed543d Mon Sep 17 00:00:00 2001 | ||
From: Doug Goldstein <cardoe@cardoe.com> | ||
Date: Mon, 17 Feb 2025 17:19:16 -0600 | ||
Subject: [PATCH] ironic: fix logging of validation errors | ||
|
||
When validation of the node fails, since switching to the SDK the | ||
address of the ValidationResult object is displayed instead of the | ||
actual message. This has been broken since patch | ||
Ibb5b168ee0944463b996e96f033bd3dfb498e304. | ||
|
||
Change-Id: I8fbdaadd125ece6a3050b2fbb772a7bd5d7e5304 | ||
Signed-off-by: Doug Goldstein <cardoe@cardoe.com> | ||
--- | ||
nova/virt/ironic/driver.py | 12 +++++++++--- | ||
1 file changed, 9 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/nova/virt/ironic/driver.py b/nova/virt/ironic/driver.py | ||
index 9d6bd32126..7279af09ad 100644 | ||
--- a/nova/virt/ironic/driver.py | ||
+++ b/nova/virt/ironic/driver.py | ||
@@ -1213,14 +1213,20 @@ class IronicDriver(virt_driver.ComputeDriver): | ||
): | ||
# something is wrong. undo what we have done | ||
self._cleanup_deploy(node, instance, network_info) | ||
+ deploy_msg = ("No Error" if validate_chk['deploy'].result | ||
+ else validate_chk['deploy'].reason) | ||
+ power_msg = ("No Error" if validate_chk['power'].result | ||
+ else validate_chk['power'].reason) | ||
+ storage_msg = ("No Error" if validate_chk['storage'].result | ||
+ else validate_chk['storage'].reason) | ||
raise exception.ValidationError(_( | ||
"Ironic node: %(id)s failed to validate. " | ||
"(deploy: %(deploy)s, power: %(power)s, " | ||
"storage: %(storage)s)") | ||
% {'id': node.id, | ||
- 'deploy': validate_chk['deploy'], | ||
- 'power': validate_chk['power'], | ||
- 'storage': validate_chk['storage']}) | ||
+ 'deploy': deploy_msg, | ||
+ 'power': power_msg, | ||
+ 'storage': storage_msg}) | ||
|
||
# Config drive | ||
configdrive_value = None | ||
-- | ||
2.39.5 (Apple Git-154) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These patches are likely quite specific to that version of the code, should we hardcode the base image here? Or just leave it and fix it when it breaks? Dunno.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I'd like to get to switching to building our own container from a branch we point to.