Compare commits
No commits in common. "c9-beta" and "c9s" have entirely different histories.
|
@ -1,2 +1,64 @@
|
|||
SOURCES/ignition-2.17.0.tar.gz
|
||||
SOURCES/ignition-edge-35853de.tar.gz
|
||||
/ignition-40c0b57.tar.gz
|
||||
/ignition-7610725.tar.gz
|
||||
/ignition-dracut-d664657.tar.gz
|
||||
/ignition-cc7ebe0.tar.gz
|
||||
/ignition-dracut-56aa514.tar.gz
|
||||
/ignition-f707912.tar.gz
|
||||
/ignition-dracut-d056287.tar.gz
|
||||
/ignition-dracut-8c85eb3.tar.gz
|
||||
/ignition-dracut-c09ce6f.tar.gz
|
||||
/ignition-dracut-4bdfb34.tar.gz
|
||||
/ignition-dracut-7ee64ca.tar.gz
|
||||
/ignition-dracut-decf63f.tar.gz
|
||||
/ignition-dracut-7b83454.tar.gz
|
||||
/ignition-b1ab0b2.tar.gz
|
||||
/ignition-308d7a0.tar.gz
|
||||
/ignition-dracut-fa7131b.tar.gz
|
||||
/ignition-dracut-2c69925.tar.gz
|
||||
/ignition-f59a653.tar.gz
|
||||
/ignition-dracut-0d09097.tar.gz
|
||||
/ignition-dracut-73ec3fc.tar.gz
|
||||
/ignition-dracut-ec9a492.tar.gz
|
||||
/ignition-906cf04.tar.gz
|
||||
/ignition-dracut-85f2e65.tar.gz
|
||||
/ignition-910e6c6.tar.gz
|
||||
/ignition-dracut-df88988.tar.gz
|
||||
/ignition-0c1da80.tar.gz
|
||||
/ignition-e75cf24.tar.gz
|
||||
/ignition-dracut-343b886.tar.gz
|
||||
/ignition-dracut-d63f76f.tar.gz
|
||||
/ignition-641ec6a.tar.gz
|
||||
/ignition-dracut-3d08487.tar.gz
|
||||
/ignition-dracut-8bf2cbd.tar.gz
|
||||
/ignition-a8f91fa.tar.gz
|
||||
/ignition-dracut-736459e.tar.gz
|
||||
/ignition-dracut-14808e2.tar.gz
|
||||
/ignition-2d3ff58.tar.gz
|
||||
/ignition-dracut-f67d587.tar.gz
|
||||
/ignition-dracut-793d0ef.tar.gz
|
||||
/ignition-dracut-6136be3.tar.gz
|
||||
/ignition-dracut-390779d.tar.gz
|
||||
/ignition-ee616d5.tar.gz
|
||||
/ignition-dracut-7ff38d9.tar.gz
|
||||
/ignition-dracut-8f5d1ec.tar.gz
|
||||
/ignition-dracut-bdf0a65.tar.gz
|
||||
/ignition-d18bf90.tar.gz
|
||||
/ignition-dracut-e75fef0.tar.gz
|
||||
/ignition-5260a5b.tar.gz
|
||||
/ignition-dracut-6b1d128.tar.gz
|
||||
/ignition-0d6f3e5.tar.gz
|
||||
/ignition-947598e.tar.gz
|
||||
/ignition-5be43fd.tar.gz
|
||||
/ignition-db4d30d.tar.gz
|
||||
/ignition-c733d23.tar.gz
|
||||
/ignition-1d56dc8.tar.gz
|
||||
/ignition-2.9.0.tar.gz
|
||||
/ignition-2.12.0.tar.gz
|
||||
/ignition-2.13.0.tar.gz
|
||||
/ignition-2.14.0.tar.gz
|
||||
/ignition-edge-a3a8f0a.tar.gz
|
||||
/ignition-2.15.0.tar.gz
|
||||
/ignition-edge-35853de.tar.gz
|
||||
/ignition-2.16.2.tar.gz
|
||||
/ignition-2.17.0.tar.gz
|
||||
/ignition-2.18.0.tar.gz
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
eef0ada17df6ee3ede30dd6cf1b65d051333150f SOURCES/ignition-2.17.0.tar.gz
|
||||
5478ba1847a798e4bff1b237281086a212a2af57 SOURCES/ignition-edge-35853de.tar.gz
|
||||
d65efd9879fa1dce27d8ab2bb9df893c80a2b5aa ignition-2.18.0.tar.gz
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
From 3babc7a5b767fb60ca877213d9201568205e983f Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
||||
Date: Thu, 8 Feb 2024 11:02:27 -0500
|
||||
Subject: [PATCH] azure: retry HTTP requests on codes 404, 410, and 429
|
||||
|
||||
For some reason, the Azure IMDS server expects clients to retry their
|
||||
HTTP requests even on codes that usually would be considered final.
|
||||
The documented one is 410[[1]], but let's just match the set from
|
||||
cloud-init, which also includes 404 and 429[[2]].
|
||||
|
||||
Closes: #1806
|
||||
|
||||
[1]: https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux#errors-and-debugging
|
||||
[2]: https://github.com/canonical/cloud-init/commit/c1a2047cf291
|
||||
|
||||
travier: Edited to cleanly backport on top of 2.17.0
|
||||
---
|
||||
internal/providers/azure/azure.go | 11 ++++++++++-
|
||||
internal/resource/http.go | 17 ++++++++++++++++-
|
||||
internal/resource/url.go | 4 ++++
|
||||
3 files changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/internal/providers/azure/azure.go b/internal/providers/azure/azure.go
|
||||
index d3115f2b..caddcff5 100644
|
||||
--- a/internal/providers/azure/azure.go
|
||||
+++ b/internal/providers/azure/azure.go
|
||||
@@ -112,7 +112,16 @@ func fetchFromIMDS(f *resource.Fetcher) ([]byte, error) {
|
||||
headers := make(http.Header)
|
||||
headers.Set("Metadata", "true")
|
||||
|
||||
- data, err := f.FetchToBuffer(imdsUserdataURL, resource.FetchOptions{Headers: headers})
|
||||
+ // Azure IMDS expects some codes <500 to still be retried...
|
||||
+ // Here, we match the cloud-init set.
|
||||
+ // https://github.com/canonical/cloud-init/commit/c1a2047cf291
|
||||
+ // https://github.com/coreos/ignition/issues/1806
|
||||
+ retryCodes := []int{
|
||||
+ 404, // not found
|
||||
+ 410, // gone
|
||||
+ 429, // rate-limited
|
||||
+ }
|
||||
+ data, err := f.FetchToBuffer(imdsUserdataURL, resource.FetchOptions{Headers: headers, RetryCodes: retryCodes})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("fetching to buffer: %w", err)
|
||||
}
|
||||
diff --git a/internal/resource/http.go b/internal/resource/http.go
|
||||
index 0d8edace..872ce253 100644
|
||||
--- a/internal/resource/http.go
|
||||
+++ b/internal/resource/http.go
|
||||
@@ -263,6 +263,21 @@ func (f *Fetcher) newHttpClient() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
+func shouldRetryHttp(statusCode int, opts FetchOptions) bool {
|
||||
+ // we always retry 500+
|
||||
+ if statusCode >= 500 {
|
||||
+ return true
|
||||
+ }
|
||||
+
|
||||
+ for _, retryCode := range opts.RetryCodes {
|
||||
+ if statusCode == retryCode {
|
||||
+ return true
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return false
|
||||
+}
|
||||
+
|
||||
// httpReaderWithHeader performs an HTTP request on the provided URL with the
|
||||
// provided request header & method and returns the response body Reader, HTTP
|
||||
// status code, a cancel function for the result's context, and error (if any).
|
||||
@@ -298,7 +313,7 @@ func (c HttpClient) httpReaderWithHeader(opts FetchOptions, url string) (io.Read
|
||||
|
||||
if err == nil {
|
||||
c.logger.Info("%s result: %s", opts.HTTPVerb, http.StatusText(resp.StatusCode))
|
||||
- if resp.StatusCode < 500 {
|
||||
+ if !shouldRetryHttp(resp.StatusCode, opts) {
|
||||
return resp.Body, resp.StatusCode, cancelFn, nil
|
||||
}
|
||||
resp.Body.Close()
|
||||
diff --git a/internal/resource/url.go b/internal/resource/url.go
|
||||
index 58e0b9fc..3d16cc59 100644
|
||||
--- a/internal/resource/url.go
|
||||
+++ b/internal/resource/url.go
|
||||
@@ -125,6 +125,10 @@ type FetchOptions struct {
|
||||
// HTTPVerb is an HTTP request method to indicate the desired action to
|
||||
// be performed for a given resource.
|
||||
HTTPVerb string
|
||||
+
|
||||
+ // List of HTTP codes to retry that usually would be considered as complete.
|
||||
+ // Status codes >= 500 are always retried.
|
||||
+ RetryCodes []int
|
||||
}
|
||||
|
||||
// FetchToBuffer will fetch the given url into a temporary file, and then read
|
||||
--
|
||||
2.43.0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} # this is the testcase identifier, which OSCI pipeline uses
|
|
@ -0,0 +1,84 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
'''
|
||||
Tiny dumb script that generates virtual bundled `Provides` from a repo that
|
||||
uses go modules and vendoring.
|
||||
'''
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
def main():
|
||||
repos = get_repos_from_go_mod()
|
||||
print_provides_from_modules_txt(repos)
|
||||
|
||||
|
||||
def get_repos_from_go_mod():
|
||||
repos = {}
|
||||
in_reqs = False
|
||||
for line in open('go.mod'):
|
||||
line = line.strip()
|
||||
if in_reqs and line.startswith(')'):
|
||||
break
|
||||
if not in_reqs:
|
||||
if line.startswith('require ('):
|
||||
in_reqs = True
|
||||
continue
|
||||
req = line.split()
|
||||
|
||||
repo = req[0]
|
||||
tag = req[1]
|
||||
|
||||
repos[repo] = go_mod_tag_to_rpm_provides_version(tag)
|
||||
|
||||
return repos
|
||||
|
||||
|
||||
def go_mod_tag_to_rpm_provides_version(tag):
|
||||
|
||||
# go.mod tags are either exact git tags, or may be "pseudo-versions". We
|
||||
# want to convert these tags to something resembling a version string that
|
||||
# RPM won't fail on. For more information, see
|
||||
# https://golang.org/cmd/go/#hdr-Pseudo_versions and following sections.
|
||||
|
||||
# trim off any +incompatible
|
||||
if tag.endswith('+incompatible'):
|
||||
tag = tag[:-len('+incompatible')]
|
||||
|
||||
# git tags are normally of the form v$VERSION
|
||||
if tag.startswith('v'):
|
||||
tag = tag[1:]
|
||||
|
||||
# is this a pseudo-version? e.g. v0.0.0-20181031085051-9002847aa142
|
||||
m = re.match("(.*)-([0-9.]+)-([a-f0-9]{12})", tag)
|
||||
if m:
|
||||
# rpm doesn't like multiple dashes in the version, so just merge the
|
||||
# timestamp and the commit checksum into the "release" field
|
||||
tag = f"{m.group(1)}-{m.group(2)}.git{m.group(3)}"
|
||||
|
||||
return tag
|
||||
|
||||
|
||||
def print_provides_from_modules_txt(repos):
|
||||
|
||||
for line in open('vendor/modules.txt'):
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
gopkg = line.strip()
|
||||
repo = lookup_repo_for_pkg(repos, gopkg)
|
||||
if not repo:
|
||||
# must be a pkg for tests only; ignore
|
||||
continue
|
||||
tag = repos[repo]
|
||||
print(f"Provides: bundled(golang({gopkg})) = {tag}")
|
||||
|
||||
|
||||
def lookup_repo_for_pkg(repos, gopkg):
|
||||
for repo in repos:
|
||||
if gopkg.startswith(repo):
|
||||
return repo
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -0,0 +1,14 @@
|
|||
# Suppress hardcoded library path warning
|
||||
addFilter("hardcoded-library-path in %{_prefix}/lib/dracut")
|
||||
|
||||
# Ignition sources have duplicate files because of how spec versioning is
|
||||
# implemented
|
||||
addFilter("ignition-debugsource.x86_64: W: files-duplicate")
|
||||
|
||||
# -validate-redistributable is supposed to have binaries in it
|
||||
addFilter("ignition-validate-redistributable.noarch: E: arch-independent-package-contains-binary-or-object")
|
||||
|
||||
# This is documented as optional
|
||||
# https://fedoraproject.org/wiki/Upgrade_paths_%E2%80%94_renaming_or_splitting_packages#Do_I_need_to_Provide_my_old_package_names.3F
|
||||
addFilter("ignition.x86_64: W: obsolete-not-provided ignition-dracut")
|
||||
addFilter("ignition-validate-redistributable.noarch: W: obsolete-not-provided ignition-validate-nonlinux")
|
|
@ -13,7 +13,7 @@
|
|||
# https://github.com/coreos/ignition
|
||||
%global goipath github.com/coreos/ignition
|
||||
%global gomodulesmode GO111MODULE=on
|
||||
Version: 2.17.0
|
||||
Version: 2.18.0
|
||||
|
||||
%gometa
|
||||
|
||||
|
@ -22,7 +22,7 @@ Version: 2.17.0
|
|||
%global dracutlibdir %{_prefix}/lib/dracut
|
||||
|
||||
Name: ignition
|
||||
Release: 2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: First boot installer and configuration tool (RHEL CoreOS only)
|
||||
|
||||
# Upstream license specification: Apache-2.0
|
||||
|
@ -31,8 +31,6 @@ URL: %{gourl}
|
|||
Source0: %{gosource}
|
||||
Source1: https://github.com/fedora-iot/ignition-edge/archive/%{ignedgecommit}/ignition-edge-%{ignedgeshortcommit}.tar.gz
|
||||
|
||||
Patch0: 0001-azure-retry-HTTP-requests-on-codes-404-410-and-429.patch
|
||||
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
|
@ -354,6 +352,9 @@ install -p -m 0755 ./ignition %{buildroot}/%{dracutlibdir}/modules.d/30ignition
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Mar 07 2024 Yasmin Valim <ydesouza@redhat.com> - 2.18.0-1
|
||||
- New release
|
||||
|
||||
* Fri Feb 09 2024 Timothée Ravier <tim@siosm.fr> - 2.17.0-2
|
||||
- Backport fix for unexpected Azure IMDS status codes
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
SHA512 (ignition-2.18.0.tar.gz) = 8017d4d289b0c856805909669d05e54a044fd0fdbab88ad573ae4eee197c7cff6ec99997a356bfa138adc9597f75eba6e21e44e00d3f24b6dbf9878b71a5523c
|
||||
SHA512 (ignition-edge-35853de.tar.gz) = dc2ec47081e7d4ef35b00c5b02d2f4a26e1171fe5433a784060b007601a59e23a15e5621a9518602f131c3016a94c52ff6b28139a7e02afeba4af03f28b7aed2
|
|
@ -0,0 +1,21 @@
|
|||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required-packages:
|
||||
- ignition
|
||||
- ignition-validate
|
||||
tests:
|
||||
- ignition-run-version:
|
||||
dir: ./
|
||||
run: /usr/lib/dracut/modules.d/30ignition/ignition --version
|
||||
- ignition-validate-run-version:
|
||||
dir: ./
|
||||
run: /usr/bin/ignition-validate --version
|
||||
- ignition-rpm-installed:
|
||||
dir: ./
|
||||
run: /usr/bin/rpm -q ignition
|
||||
- ignition-validate-rpm-installed:
|
||||
dir: ./
|
||||
run: /usr/bin/rpm -q ignition-validate
|
Loading…
Reference in New Issue