-
Notifications
You must be signed in to change notification settings - Fork 230
USHIFT-1098: add minor-version upgrade scenario #1989
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
openshift-merge-robot
merged 11 commits into
openshift:main
from
dhellmann:USHIFT-1098-4.13-4.14-upgrade-scenario
Jul 16, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
82e434c
pin openvswitch3.1 to 3.1.0-14
dhellmann b1a56d9
USHIFT-1098: make image definition for previous y-stream dynamic
dhellmann 2bf57db
better error handling in manage_vm_connection.sh
dhellmann 0c5f6ce
add functions to scenario.sh for manipulating version strings
dhellmann 0a8596b
USHIFT-1098: add minor-version upgrade scenario
dhellmann 06a1871
USHIFT-1089: use the same source for current version information
dhellmann f033e49
make it possible to build rpms to different destinations
dhellmann 7532433
build fake next minor rpm to different directory than the real rpm
dhellmann 61c8193
set up separate rpm repository for fake next minor version
dhellmann 698847c
standardize on shell functions for determining versions
dhellmann 1796ec3
make sure we reset any package source on rebuild
dhellmann 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,13 @@ | ||
| REPO := $(shell git rev-parse --show-toplevel) | ||
| include $(REPO)/Makefile | ||
|
|
||
| NEXT_MINOR = $(shell expr $(MINOR) + 1) | ||
| RPMBUILD_DIR := $(REPO)/_output/rpmbuild-fake-next-minor/ | ||
|
|
||
| .PHONY: fake-next-minor fake-next-minor-rpm | ||
| fake-next-minor: | ||
| @echo $(MAJOR).$(NEXT_MINOR).$(PATCH)_fake_next_minor | ||
| NEXT_MINOR = $(shell expr $(MINOR) + 1) | ||
|
|
||
| .PHONY: fake-next-minor-rpm | ||
| fake-next-minor-rpm: | ||
| rm -rf $(RPMBUILD_DIR) | ||
| MICROSHIFT_VERSION="$(MAJOR).$(NEXT_MINOR).$(PATCH)_fake_next_minor" \ | ||
| RPMBUILD_DIR=$(RPMBUILD_DIR) \ | ||
| $(MAKE) -C $(REPO) rpm |
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
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,16 @@ | ||
| #!/bin/bash | ||
| # | ||
| # This script reports the version of the latest RPM in the local | ||
| # repository. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
| source "${SCRIPTDIR}/common.sh" | ||
|
|
||
| release_info_rpm=$(find "${LOCAL_REPO}" -name 'microshift-release-info-*.rpm' | sort | tail -n 1) | ||
| if [ -z "${release_info_rpm}" ]; then | ||
| error "Failed to find microshift-release-info RPM in ${LOCAL_REPO}" | ||
| exit 1 | ||
| fi | ||
| rpm -q --queryformat '%{version}' "${release_info_rpm}" 2>/dev/null |
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
30 changes: 30 additions & 0 deletions
30
test/image-blueprints/rhel92-microshift-previous-minor.toml
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,30 @@ | ||
| name = "rhel-9.2-microshift-4.${PREVIOUS_MINOR_VERSION}" | ||
| description = "" | ||
| version = "0.0.1" | ||
| modules = [] | ||
| groups = [] | ||
| distro = "rhel-92" | ||
|
|
||
| # FIXME: Temporarily pin the openvswitch version. | ||
| [[packages]] | ||
| name = "openvswitch3.1" | ||
| version = "3.1.0-14.el9fdp" | ||
|
|
||
| [[packages]] | ||
| name = "microshift" | ||
| version = "4.${PREVIOUS_MINOR_VERSION}*" | ||
|
|
||
| [[packages]] | ||
| name = "microshift-greenboot" | ||
| version = "4.${PREVIOUS_MINOR_VERSION}*" | ||
|
|
||
| [[packages]] | ||
| name = "microshift-networking" | ||
| version = "4.${PREVIOUS_MINOR_VERSION}*" | ||
|
|
||
| [[packages]] | ||
| name = "microshift-selinux" | ||
| version = "4.${PREVIOUS_MINOR_VERSION}*" | ||
|
|
||
| [customizations.services] | ||
| enabled = ["microshift"] | ||
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
| id = "microshift-fake-next-minor" | ||
| name = "MicroShift Fake Next Minor Version Repo" | ||
| type = "yum-baseurl" | ||
| url = "file://${NEXT_REPO}/" | ||
| check_gpg = false | ||
| check_ssl = false | ||
| system = false |
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,23 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Sourced from cleanup_scenario.sh and uses functions defined there. | ||
|
|
||
| scenario_create_vms() { | ||
| # Determine the starting image based on the source tree current | ||
| # version, minus one. | ||
| local start_image | ||
| start_image="rhel-9.2-microshift-4.$(previous_minor_version)" | ||
|
|
||
| prepare_kickstart host1 kickstart.ks.template "${start_image}" | ||
| launch_vm host1 | ||
| } | ||
|
|
||
| scenario_remove_vms() { | ||
| remove_vm host1 | ||
| } | ||
|
|
||
| scenario_run_tests() { | ||
| run_tests host1 \ | ||
| --variable "TARGET_REF:rhel-9.2-microshift-source" \ | ||
| suites-ostree/healthy-upgrade.robot | ||
| } |
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.
This is no longer necessary due to an explicit dependency inside microshift RPM
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.
Do we have a published 4.13 build with that dependency in place, yet?
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.
It's merged, but I do not know if it's published.
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.
OK, I'd rather keep this in place for now then to ensure that the upgrade job has a chance of passing. When we have a real fix, we can remove this. I'll open a ticket to make sure we do it when we branch for 4.15.