From 47408b0be26939feb8038d8fa92eab8cbd915c78 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 11:04:03 -0500 Subject: [PATCH 001/274] Initial commit --- go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000000..afe2d6694d --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/openshift-agent-team/fleeting + +go 1.16 From 95aaf795192f6eb7bdacd7f0a83455052e0a9e6d Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 14:02:25 -0500 Subject: [PATCH 002/274] Download a CoreOS ISO --- pkg/agent/build_image.go | 12 ++++++ pkg/agent/isosource/download.go | 72 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 pkg/agent/build_image.go create mode 100644 pkg/agent/isosource/download.go diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go new file mode 100644 index 0000000000..9d7e5cd6f4 --- /dev/null +++ b/pkg/agent/build_image.go @@ -0,0 +1,12 @@ +package agent + +import "github.com/openshift-agent-team/fleeting/pkg/agent/isosource" + +func BuildImage() error { + _, err := isosource.EnsureIso() + if err != nil { + return err + } + + return nil +} diff --git a/pkg/agent/isosource/download.go b/pkg/agent/isosource/download.go new file mode 100644 index 0000000000..d3ac8c9712 --- /dev/null +++ b/pkg/agent/isosource/download.go @@ -0,0 +1,72 @@ +package isosource + +import ( + "bytes" + "crypto/sha256" + "encoding/hex" + "fmt" + "io" + "net/http" + "os" + "path" +) + +const ( + outputFile = "output/coreos.iso" + + isoUrl = "https://rhcos-redirector.apps.art.xq1c.p1.openshiftapps.com/art/storage/releases/rhcos-4.10/410.84.202201251210-0/x86_64/rhcos-410.84.202201251210-0-live.x86_64.iso" + isoSha256 = "2905c1f0d85739e8600e8816c0d32711fb4002be4f845e0b20eeab35314e5b58" +) + +func downloadIso(dest string) error { + resp, err := http.Get(isoUrl) + if err != nil { + return err + } + + dir, _ := path.Split(dest) + if err = os.MkdirAll(dir, 0775); err != nil { + return err + } + + output, err := os.Create(dest) + if err != nil { + return err + } + defer output.Close() + + _, err = io.Copy(output, resp.Body) + return err +} + +func haveValidIso(location string) bool { + iso, err := os.OpenFile(location, os.O_RDONLY, 0) + if err != nil { + return false + } + defer iso.Close() + + hash := sha256.New() + if _, err = io.Copy(hash, iso); err != nil { + return false + } + + expectedChecksum, err := hex.DecodeString(isoSha256) + if err != nil { + panic(err) + } + + return bytes.Equal(hash.Sum(nil), expectedChecksum) +} + +func EnsureIso() (string, error) { + if !haveValidIso(outputFile) { + if err := downloadIso(outputFile); err != nil { + return "", err + } + if !haveValidIso(outputFile) { + return "", fmt.Errorf("Downloaded ISO is not valid") + } + } + return outputFile, nil +} From efbe778ecbba75d28a7a154e3a7ff601c8ad9c55 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 15:49:33 -0500 Subject: [PATCH 003/274] Build an ISO with a custom ignition --- data/test_ignition.ign | 11 ++++++ go.mod | 2 + pkg/agent/build_image.go | 12 +++++- pkg/agent/imagebuilder/embed_ignition.go | 49 ++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 data/test_ignition.ign create mode 100644 pkg/agent/imagebuilder/embed_ignition.go diff --git a/data/test_ignition.ign b/data/test_ignition.ign new file mode 100644 index 0000000000..34a6885490 --- /dev/null +++ b/data/test_ignition.ign @@ -0,0 +1,11 @@ +{ + "ignition": { "version": "3.0.0" }, + "storage": { + "files": [{ + "path": "/etc/issue", + "mode": 420, + "overwrite": true, + "contents": { "source": "data:,%5CS%0AHello%2C%20world%21%0A" } + }] + } +} diff --git a/go.mod b/go.mod index afe2d6694d..df45b63d77 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/openshift-agent-team/fleeting go 1.16 + +require github.com/openshift/assisted-image-service v0.0.0-20220207151621-a9f6dc6bd2cf diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go index 9d7e5cd6f4..b396d2293c 100644 --- a/pkg/agent/build_image.go +++ b/pkg/agent/build_image.go @@ -1,9 +1,17 @@ package agent -import "github.com/openshift-agent-team/fleeting/pkg/agent/isosource" +import ( + "github.com/openshift-agent-team/fleeting/pkg/agent/imagebuilder" + "github.com/openshift-agent-team/fleeting/pkg/agent/isosource" +) func BuildImage() error { - _, err := isosource.EnsureIso() + baseImage, err := isosource.EnsureIso() + if err != nil { + return err + } + + err = imagebuilder.BuildImage(baseImage) if err != nil { return err } diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go new file mode 100644 index 0000000000..6adcf5c798 --- /dev/null +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -0,0 +1,49 @@ +package imagebuilder + +import ( + "io" + "os" + + "github.com/openshift/assisted-image-service/pkg/isoeditor" +) + +const ( + outputImage = "output/fleeting.iso" +) + +func getIgnition() ([]byte, error) { + ignition, err := os.Open("data/test_ignition.ign") + if err != nil { + return nil, err + } + defer ignition.Close() + + return io.ReadAll(ignition) + + return nil +} + +func BuildImage(baseImage string) error { + ignition, err := getIgnition() + if err != nil { + return err + } + ignitionContent := &isoeditor.IgnitionContent{Config: ignition} + + custom, err := isoeditor.NewRHCOSStreamReader(baseImage, ignitionContent, nil) + if err != nil { + return err + } + defer custom.Close() + + output, err := os.Create(outputImage) + if err != nil { + return err + } + defer output.Close() + + _, err = io.Copy(output, custom) + return err + + return nil +} From 4fb700deb2fdb229f8c4b686ac94fe668c4ffec4 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 17:03:06 -0500 Subject: [PATCH 004/274] Embed ignition file into golang binary --- data/data/agent/embed.go | 6 ++++++ data/{ => data/agent}/test_ignition.ign | 0 pkg/agent/imagebuilder/embed_ignition.go | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 data/data/agent/embed.go rename data/{ => data/agent}/test_ignition.ign (100%) diff --git a/data/data/agent/embed.go b/data/data/agent/embed.go new file mode 100644 index 0000000000..2e224bb74b --- /dev/null +++ b/data/data/agent/embed.go @@ -0,0 +1,6 @@ +package agent + +import "embed" + +//go:embed * +var IgnitionData embed.FS diff --git a/data/test_ignition.ign b/data/data/agent/test_ignition.ign similarity index 100% rename from data/test_ignition.ign rename to data/data/agent/test_ignition.ign diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index 6adcf5c798..045de6a09c 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -5,6 +5,8 @@ import ( "os" "github.com/openshift/assisted-image-service/pkg/isoeditor" + + data "github.com/openshift-agent-team/fleeting/data/data/agent" ) const ( @@ -12,7 +14,7 @@ const ( ) func getIgnition() ([]byte, error) { - ignition, err := os.Open("data/test_ignition.ign") + ignition, err := data.IgnitionData.Open("ignition/test_ignition.ign") if err != nil { return nil, err } From ddc0c93ac19b7743defb5e50d3a410bab0096afe Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 21:22:56 -0500 Subject: [PATCH 005/274] Separate ignition file contents into separate files --- data/data/agent/files/etc/issue | 2 + data/data/agent/test_ignition.ign | 11 ---- go.mod | 8 ++- pkg/agent/imagebuilder/content.go | 81 ++++++++++++++++++++++++ pkg/agent/imagebuilder/embed_ignition.go | 16 +---- 5 files changed, 91 insertions(+), 27 deletions(-) create mode 100644 data/data/agent/files/etc/issue delete mode 100644 data/data/agent/test_ignition.ign create mode 100644 pkg/agent/imagebuilder/content.go diff --git a/data/data/agent/files/etc/issue b/data/data/agent/files/etc/issue new file mode 100644 index 0000000000..4e102d13ab --- /dev/null +++ b/data/data/agent/files/etc/issue @@ -0,0 +1,2 @@ +\S +Hello, world! This image built by fleeting. diff --git a/data/data/agent/test_ignition.ign b/data/data/agent/test_ignition.ign deleted file mode 100644 index 34a6885490..0000000000 --- a/data/data/agent/test_ignition.ign +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ignition": { "version": "3.0.0" }, - "storage": { - "files": [{ - "path": "/etc/issue", - "mode": 420, - "overwrite": true, - "contents": { "source": "data:,%5CS%0AHello%2C%20world%21%0A" } - }] - } -} diff --git a/go.mod b/go.mod index df45b63d77..013f2568e8 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,10 @@ module github.com/openshift-agent-team/fleeting go 1.16 -require github.com/openshift/assisted-image-service v0.0.0-20220207151621-a9f6dc6bd2cf +require ( + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/coreos/ignition/v2 v2.9.0 + github.com/openshift/assisted-image-service v0.0.0-20220207151621-a9f6dc6bd2cf + github.com/vincent-petithory/dataurl v1.0.0 + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go new file mode 100644 index 0000000000..e65323ff4d --- /dev/null +++ b/pkg/agent/imagebuilder/content.go @@ -0,0 +1,81 @@ +package imagebuilder + +import ( + "encoding/json" + "fmt" + "path" + "strings" + + ignutil "github.com/coreos/ignition/v2/config/util" + igntypes "github.com/coreos/ignition/v2/config/v3_2/types" + "github.com/vincent-petithory/dataurl" + + data "github.com/openshift-agent-team/fleeting/data/data/agent" +) + +type ConfigBuilder struct { +} + +func (c ConfigBuilder) Ignition() ([]byte, error) { + var err error + + config := igntypes.Config{ + Ignition: igntypes.Ignition{ + Version: igntypes.MaxVersion.String(), + }, + } + + config.Storage.Files, err = c.getFiles() + if err != nil { + return nil, err + } + + return json.Marshal(config) +} + +func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { + var readDir func(dirPath string, files []igntypes.File) ([]igntypes.File, error) + files := make([]igntypes.File, 0) + + readDir = func(dirPath string, files []igntypes.File) ([]igntypes.File, error) { + entries, err := data.IgnitionData.ReadDir(path.Join("files", dirPath)) + if err != nil { + return files, fmt.Errorf("Failed to open file dir \"%s\": %w", dirPath, err) + } + for _, e := range entries { + fullPath := path.Join(dirPath, e.Name()) + if e.IsDir() { + files, err = readDir(fullPath, files) + if err != nil { + return files, err + } + } else { + contents, err := data.IgnitionData.ReadFile(path.Join("files", fullPath)) + if err != nil { + return files, fmt.Errorf("Failed to read file %s: %w", fullPath, err) + } + info, err := e.Info() + if err != nil { + return files, fmt.Errorf("Failed to get file %s info: %w", fullPath, err) + } + mode := int(info.Mode()) + file := igntypes.File{ + Node: igntypes.Node{ + Path: fullPath, + Overwrite: ignutil.BoolToPtr(true), + }, + FileEmbedded1: igntypes.FileEmbedded1{ + Mode: &mode, + Contents: igntypes.Resource{ + Source: ignutil.StrToPtr(dataurl.EncodeBytes(contents)), + }, + }, + } + files = append(files, file) + } + } + return files, nil + } + + return readDir("/", files) +} diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index 045de6a09c..bec20bbfd2 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -5,28 +5,14 @@ import ( "os" "github.com/openshift/assisted-image-service/pkg/isoeditor" - - data "github.com/openshift-agent-team/fleeting/data/data/agent" ) const ( outputImage = "output/fleeting.iso" ) -func getIgnition() ([]byte, error) { - ignition, err := data.IgnitionData.Open("ignition/test_ignition.ign") - if err != nil { - return nil, err - } - defer ignition.Close() - - return io.ReadAll(ignition) - - return nil -} - func BuildImage(baseImage string) error { - ignition, err := getIgnition() + ignition, err := ConfigBuilder{}.Ignition() if err != nil { return err } From f975a2e1cb840569bb56efd04c29fc2ca9cd3357 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 21:59:43 -0500 Subject: [PATCH 006/274] Include systemd units from files --- data/data/agent/files/etc/issue | 2 +- .../agent/systemd/units/hello-world.service | 9 ++++++ pkg/agent/imagebuilder/content.go | 31 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 data/data/agent/systemd/units/hello-world.service diff --git a/data/data/agent/files/etc/issue b/data/data/agent/files/etc/issue index 4e102d13ab..b87af7f9ca 100644 --- a/data/data/agent/files/etc/issue +++ b/data/data/agent/files/etc/issue @@ -1,2 +1,2 @@ \S -Hello, world! This image built by fleeting. +This image built by fleeting. diff --git a/data/data/agent/systemd/units/hello-world.service b/data/data/agent/systemd/units/hello-world.service new file mode 100644 index 0000000000..5575a3bac1 --- /dev/null +++ b/data/data/agent/systemd/units/hello-world.service @@ -0,0 +1,9 @@ +[Unit] +Description=fleeting hello world + +[Service] +ExecStart=/bin/bash -c "echo 'Hello, world!' >>/etc/issue" +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index e65323ff4d..5fad9bff8c 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -30,6 +30,11 @@ func (c ConfigBuilder) Ignition() ([]byte, error) { return nil, err } + config.Systemd.Units, err = c.getUnits() + if err != nil { + return nil, err + } + return json.Marshal(config) } @@ -79,3 +84,29 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { return readDir("/", files) } + +func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { + units := make([]igntypes.Unit, 0) + basePath := "systemd/units" + + entries, err := data.IgnitionData.ReadDir(basePath) + if err != nil { + return units, fmt.Errorf("Failed to read systemd units: %w", err) + } + + for _, e := range entries { + contents, err := data.IgnitionData.ReadFile(path.Join(basePath, e.Name())) + if err != nil { + return units, fmt.Errorf("Failed to read unit %s: %w", e.Name(), err) + } + + unit := igntypes.Unit{ + Name: strings.TrimSuffix(e.Name(), ".template"), + Enabled: ignutil.BoolToPtr(true), + Contents: ignutil.StrToPtr(string(contents)), + } + units = append(units, unit) + } + + return units, nil +} From 3c88d69bf70614bd0d43650c8c8e3cceed8e2369 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 9 Feb 2022 22:34:09 -0500 Subject: [PATCH 007/274] Add ssh key to allow login --- pkg/agent/imagebuilder/content.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 5fad9bff8c..0875e032c8 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -3,6 +3,7 @@ package imagebuilder import ( "encoding/json" "fmt" + "os" "path" "strings" @@ -23,6 +24,14 @@ func (c ConfigBuilder) Ignition() ([]byte, error) { Ignition: igntypes.Ignition{ Version: igntypes.MaxVersion.String(), }, + Passwd: igntypes.Passwd{ + Users: []igntypes.PasswdUser{ + { + Name: "core", + SSHAuthorizedKeys: c.getSSHPubKey(), + }, + }, + }, } config.Storage.Files, err = c.getFiles() @@ -38,6 +47,18 @@ func (c ConfigBuilder) Ignition() ([]byte, error) { return json.Marshal(config) } +func (c ConfigBuilder) getSSHPubKey() (keys []igntypes.SSHAuthorizedKey) { + home, err := os.UserHomeDir() + if err != nil { + return + } + pubkey, err := os.ReadFile(path.Join(home, ".ssh", "id_rsa.pub")) + if err != nil { + return + } + return append(keys, igntypes.SSHAuthorizedKey(pubkey)) +} + func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { var readDir func(dirPath string, files []igntypes.File) ([]igntypes.File, error) files := make([]igntypes.File, 0) From a2d7431c8e6b863aa263223ed579ff683766c6f7 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 10 Feb 2022 20:41:18 -0500 Subject: [PATCH 008/274] Set correct mode for executables The embed module does not remember the file mode, so we have to set it ourselves. --- pkg/agent/imagebuilder/content.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 0875e032c8..87f963a651 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -80,11 +80,10 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { if err != nil { return files, fmt.Errorf("Failed to read file %s: %w", fullPath, err) } - info, err := e.Info() - if err != nil { - return files, fmt.Errorf("Failed to get file %s info: %w", fullPath, err) + mode := 0600 + if _, dirName := path.Split(dirPath); dirName == "bin" || dirName == "dispatcher.d" { + mode = 0555 } - mode := int(info.Mode()) file := igntypes.File{ Node: igntypes.Node{ Path: fullPath, From bfff97b6c7ec3c2833c59f5c0681e84ec586f166 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 10 Feb 2022 20:55:43 -0500 Subject: [PATCH 009/274] Start assisted-service Start assisted-service on the host using the definitions from https://github.com/openshift/assisted-service/tree/master/deploy/podman --- .../usr/local/bin/start-assisted-service.sh | 6 +++ .../assisted-service/configmap.yml.template | 30 +++++++++++++++ .../usr/local/share/assisted-service/pod.yml | 37 +++++++++++++++++++ .../systemd/units/assisted-service.service | 17 +++++++++ 4 files changed, 90 insertions(+) create mode 100755 data/data/agent/files/usr/local/bin/start-assisted-service.sh create mode 100644 data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template create mode 100644 data/data/agent/files/usr/local/share/assisted-service/pod.yml create mode 100644 data/data/agent/systemd/units/assisted-service.service diff --git a/data/data/agent/files/usr/local/bin/start-assisted-service.sh b/data/data/agent/files/usr/local/bin/start-assisted-service.sh new file mode 100755 index 0000000000..5e403480fa --- /dev/null +++ b/data/data/agent/files/usr/local/bin/start-assisted-service.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +HOST=$(ip -4 -j address | jq -r '[.[].addr_info]|flatten(1)|map(select(.scope=="global"))|.[0].local') +echo Using hostname ${HOST} 1>&2 + +podman play kube --configmap <(sed -e "/SERVICE_BASE_URL/ s/127\.0\.0\.1/${HOST}/" /usr/local/share/assisted-service/configmap.yml) /usr/local/share/assisted-service/pod.yml diff --git a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template new file mode 100644 index 0000000000..45fb15baef --- /dev/null +++ b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: config +data: + ASSISTED_SERVICE_HOST: 127.0.0.1:8090 + ASSISTED_SERVICE_SCHEME: http + AUTH_TYPE: none + DB_HOST: 127.0.0.1 + DB_NAME: installer + DB_PASS: admin + DB_PORT: "5432" + DB_USER: admin + DEPLOY_TARGET: onprem + DISK_ENCRYPTION_SUPPORT: "true" + DUMMY_IGNITION: "false" + ENABLE_SINGLE_NODE_DNSMASQ: "true" + HW_VALIDATOR_REQUIREMENTS: '[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10}}]' + IMAGE_SERVICE_BASE_URL: http://127.0.0.1:8888 + IPV6_SUPPORT: "true" + LISTEN_PORT: "8888" + NTP_DEFAULT_SERVER: "" + OS_IMAGES: '[{"openshift_version":"4.6","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-live-rootfs.x86_64.img","version":"46.82.202012051820-0"},{"openshift_version":"4.7","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.33/rhcos-4.7.33-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.33/rhcos-live-rootfs.x86_64.img","version":"47.84.202109241831-0"},{"openshift_version":"4.8","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/4.8.14/rhcos-4.8.14-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/4.8.14/rhcos-live-rootfs.x86_64.img","version":"48.84.202109241901-0"},{"openshift_version":"4.9","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/4.9.0/rhcos-4.9.0-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/4.9.0/rhcos-live-rootfs.x86_64.img","version":"49.84.202110081407-0"},{"openshift_version":"4.9","cpu_architecture":"arm64","url":"https://mirror.openshift.com/pub/openshift-v4/aarch64/dependencies/rhcos/4.9/4.9.0/rhcos-4.9.0-aarch64-live.aarch64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/aarch64/dependencies/rhcos/4.9/4.9.0/rhcos-4.9.0-aarch64-live-rootfs.aarch64.img","version":"49.84.202110080947-0"},{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}]' + POSTGRESQL_DATABASE: installer + POSTGRESQL_PASSWORD: admin + POSTGRESQL_USER: admin + PUBLIC_CONTAINER_REGISTRIES: 'quay.io' + RELEASE_IMAGES: '[{"openshift_version":"4.6","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.6.16-x86_64","version":"4.6.16"},{"openshift_version":"4.7","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.7.42-x86_64","version":"4.7.42"},{"openshift_version":"4.8","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.8.29-x86_64","version":"4.8.29"},{"openshift_version":"4.9","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.9.18-x86_64","version":"4.9.18","default":true},{"openshift_version":"4.9","cpu_architecture":"arm64","url":"quay.io/openshift-release-dev/ocp-release:4.9.18-aarch64","version":"4.9.18"},{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}]' + SERVICE_BASE_URL: http://127.0.0.1:8090 + STORAGE: filesystem diff --git a/data/data/agent/files/usr/local/share/assisted-service/pod.yml b/data/data/agent/files/usr/local/share/assisted-service/pod.yml new file mode 100644 index 0000000000..ea6ae03b43 --- /dev/null +++ b/data/data/agent/files/usr/local/share/assisted-service/pod.yml @@ -0,0 +1,37 @@ +apiVersion: v1 +kind: Pod +metadata: + labels: + app: assisted-installer + name: assisted-installer +spec: + containers: + - args: + - run-postgresql + image: quay.io/centos7/postgresql-12-centos7:latest + name: db + envFrom: + - configMapRef: + name: config + - image: quay.io/edge-infrastructure/assisted-installer-ui:latest + name: ui + ports: + - hostPort: 8080 + envFrom: + - configMapRef: + name: config + - image: quay.io/edge-infrastructure/assisted-image-service:latest + name: image-service + ports: + - hostPort: 8888 + envFrom: + - configMapRef: + name: config + - image: quay.io/edge-infrastructure/assisted-service:latest + name: service + ports: + - hostPort: 8090 + envFrom: + - configMapRef: + name: config + restartPolicy: Never diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service new file mode 100644 index 0000000000..a4828ccfe5 --- /dev/null +++ b/data/data/agent/systemd/units/assisted-service.service @@ -0,0 +1,17 @@ +[Unit] +Description=OpenShift Assisted Installation Service +Wants=network-online.target +After=network-online.target + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +ExecStart=/usr/local/bin/start-assisted-service.sh +ExecStop=/bin/podman pod stop --ignore assisted-installer -t 10 +ExecStopPost=/bin/podman pod rm --ignore assisted-installer + +Restart=on-failure +KillMode=none +Type=forking + +[Install] +WantedBy=multi-user.target From 7b0a9b195dcc93c8a4f4e8b40b10a4b63d00f7c1 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Tue, 15 Feb 2022 10:01:37 -0500 Subject: [PATCH 010/274] Reduce number of images for assisted-service to download --- .../usr/local/share/assisted-service/configmap.yml.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template index 45fb15baef..4b53d072c0 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template +++ b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template @@ -20,11 +20,11 @@ data: IPV6_SUPPORT: "true" LISTEN_PORT: "8888" NTP_DEFAULT_SERVER: "" - OS_IMAGES: '[{"openshift_version":"4.6","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-live-rootfs.x86_64.img","version":"46.82.202012051820-0"},{"openshift_version":"4.7","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.33/rhcos-4.7.33-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.33/rhcos-live-rootfs.x86_64.img","version":"47.84.202109241831-0"},{"openshift_version":"4.8","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/4.8.14/rhcos-4.8.14-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/4.8.14/rhcos-live-rootfs.x86_64.img","version":"48.84.202109241901-0"},{"openshift_version":"4.9","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/4.9.0/rhcos-4.9.0-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/4.9.0/rhcos-live-rootfs.x86_64.img","version":"49.84.202110081407-0"},{"openshift_version":"4.9","cpu_architecture":"arm64","url":"https://mirror.openshift.com/pub/openshift-v4/aarch64/dependencies/rhcos/4.9/4.9.0/rhcos-4.9.0-aarch64-live.aarch64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/aarch64/dependencies/rhcos/4.9/4.9.0/rhcos-4.9.0-aarch64-live-rootfs.aarch64.img","version":"49.84.202110080947-0"},{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}]' + OS_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}]' POSTGRESQL_DATABASE: installer POSTGRESQL_PASSWORD: admin POSTGRESQL_USER: admin PUBLIC_CONTAINER_REGISTRIES: 'quay.io' - RELEASE_IMAGES: '[{"openshift_version":"4.6","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.6.16-x86_64","version":"4.6.16"},{"openshift_version":"4.7","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.7.42-x86_64","version":"4.7.42"},{"openshift_version":"4.8","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.8.29-x86_64","version":"4.8.29"},{"openshift_version":"4.9","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.9.18-x86_64","version":"4.9.18","default":true},{"openshift_version":"4.9","cpu_architecture":"arm64","url":"quay.io/openshift-release-dev/ocp-release:4.9.18-aarch64","version":"4.9.18"},{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}]' + RELEASE_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}]' SERVICE_BASE_URL: http://127.0.0.1:8090 STORAGE: filesystem From 8164dc9ba6760a56ee03f2659f84fc1d20bb2d4a Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 16 Feb 2022 12:41:56 -0500 Subject: [PATCH 011/274] Remove example service --- data/data/agent/systemd/units/hello-world.service | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 data/data/agent/systemd/units/hello-world.service diff --git a/data/data/agent/systemd/units/hello-world.service b/data/data/agent/systemd/units/hello-world.service deleted file mode 100644 index 5575a3bac1..0000000000 --- a/data/data/agent/systemd/units/hello-world.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=fleeting hello world - -[Service] -ExecStart=/bin/bash -c "echo 'Hello, world!' >>/etc/issue" -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target From 701444d177f63f97185e834ccdc9c7be8f893897 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 16 Feb 2022 15:43:23 -0500 Subject: [PATCH 012/274] Handle multiple interfaces Always bind assisted service to the IP of the interface of the default route. --- .../usr/local/bin/start-assisted-service.sh | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-assisted-service.sh b/data/data/agent/files/usr/local/bin/start-assisted-service.sh index 5e403480fa..3dae7cd1e2 100755 --- a/data/data/agent/files/usr/local/bin/start-assisted-service.sh +++ b/data/data/agent/files/usr/local/bin/start-assisted-service.sh @@ -1,6 +1,23 @@ #!/bin/bash -HOST=$(ip -4 -j address | jq -r '[.[].addr_info]|flatten(1)|map(select(.scope=="global"))|.[0].local') -echo Using hostname ${HOST} 1>&2 +get_host() { + local default_gateway + local host_ip + + default_gateway=$(ip -j route show default | jq -r '.[0].gateway') + host_ip=$(ip -j route get "${default_gateway}" | jq -r '.[0].prefsrc') + + local host_fmt="%s" + if [[ ${host_ip} =~ : ]]; then + host_fmt="[%s]" + fi + + # shellcheck disable=SC2059 + printf "${host_fmt}" "${host_ip}" +} + + +HOST=$(get_host) +echo Using hostname "${HOST}" 1>&2 podman play kube --configmap <(sed -e "/SERVICE_BASE_URL/ s/127\.0\.0\.1/${HOST}/" /usr/local/share/assisted-service/configmap.yml) /usr/local/share/assisted-service/pod.yml From bb7a6913145f1fae2cc5e906dc55b182279e2237 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 16 Feb 2022 16:20:55 -0500 Subject: [PATCH 013/274] Fix golint complaints --- data/data/agent/embed.go | 1 + pkg/agent/imagebuilder/content.go | 2 ++ pkg/agent/imagebuilder/embed_ignition.go | 2 ++ pkg/agent/isosource/download.go | 5 +++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/data/data/agent/embed.go b/data/data/agent/embed.go index 2e224bb74b..099269c0b5 100644 --- a/data/data/agent/embed.go +++ b/data/data/agent/embed.go @@ -2,5 +2,6 @@ package agent import "embed" +// IgnitionData contains the source data for building the ignition file //go:embed * var IgnitionData embed.FS diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 87f963a651..0ef744d761 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -14,9 +14,11 @@ import ( data "github.com/openshift-agent-team/fleeting/data/data/agent" ) +// ConfigBuilder builds an Ignition config type ConfigBuilder struct { } +// Ignition builds an ignition file and returns the bytes func (c ConfigBuilder) Ignition() ([]byte, error) { var err error diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index bec20bbfd2..bc8d454a6b 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -11,6 +11,8 @@ const ( outputImage = "output/fleeting.iso" ) +// BuildImage builds an ISO with ignition content from a base image, and writes +// the result to disk. func BuildImage(baseImage string) error { ignition, err := ConfigBuilder{}.Ignition() if err != nil { diff --git a/pkg/agent/isosource/download.go b/pkg/agent/isosource/download.go index d3ac8c9712..c035dbd62c 100644 --- a/pkg/agent/isosource/download.go +++ b/pkg/agent/isosource/download.go @@ -14,12 +14,12 @@ import ( const ( outputFile = "output/coreos.iso" - isoUrl = "https://rhcos-redirector.apps.art.xq1c.p1.openshiftapps.com/art/storage/releases/rhcos-4.10/410.84.202201251210-0/x86_64/rhcos-410.84.202201251210-0-live.x86_64.iso" + isoURL = "https://rhcos-redirector.apps.art.xq1c.p1.openshiftapps.com/art/storage/releases/rhcos-4.10/410.84.202201251210-0/x86_64/rhcos-410.84.202201251210-0-live.x86_64.iso" isoSha256 = "2905c1f0d85739e8600e8816c0d32711fb4002be4f845e0b20eeab35314e5b58" ) func downloadIso(dest string) error { - resp, err := http.Get(isoUrl) + resp, err := http.Get(isoURL) if err != nil { return err } @@ -59,6 +59,7 @@ func haveValidIso(location string) bool { return bytes.Equal(hash.Sum(nil), expectedChecksum) } +// EnsureIso downloads the ISO if it is not already present func EnsureIso() (string, error) { if !haveValidIso(outputFile) { if err := downloadIso(outputFile); err != nil { From ecca360f1c917c2952a8de76f2680696d5f3e7ad Mon Sep 17 00:00:00 2001 From: Richard Su Date: Wed, 16 Feb 2022 21:31:58 -0800 Subject: [PATCH 014/274] Add agent service Some environment variables are used as placeholders for values that can be determined elsewhere when assisted-service, agent, and the CRDs required to install the cluster are integrated. --- data/data/agent/files/etc/motd | 10 ++++ data/data/agent/files/root/assisted.te | 13 +++++ .../systemd/units/agent.service.template | 24 +++++++++ data/data/agent/systemd/units/selinux.service | 8 +++ pkg/agent/imagebuilder/content.go | 54 ++++++++++++++++++- 5 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 data/data/agent/files/etc/motd create mode 100644 data/data/agent/files/root/assisted.te create mode 100644 data/data/agent/systemd/units/agent.service.template create mode 100644 data/data/agent/systemd/units/selinux.service diff --git a/data/data/agent/files/etc/motd b/data/data/agent/files/etc/motd new file mode 100644 index 0000000000..b71f6c2d19 --- /dev/null +++ b/data/data/agent/files/etc/motd @@ -0,0 +1,10 @@ +** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** +This is a host being installed by the OpenShift Assisted Installer. +It will be installed from scratch during the installation. + +The primary service is agent.service. To watch its status, run: +sudo journalctl -u agent.service + +To view the agent log, run: +sudo journalctl TAG=agent +** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** \ No newline at end of file diff --git a/data/data/agent/files/root/assisted.te b/data/data/agent/files/root/assisted.te new file mode 100644 index 0000000000..648927d5d8 --- /dev/null +++ b/data/data/agent/files/root/assisted.te @@ -0,0 +1,13 @@ +module assisted 1.0; +require { + type chronyd_t; + type container_file_t; + type spc_t; + class unix_dgram_socket sendto; + class dir search; + class sock_file write; +} +#============= chronyd_t ============== +allow chronyd_t container_file_t:dir search; +allow chronyd_t container_file_t:sock_file write; +allow chronyd_t spc_t:unix_dgram_socket sendto; \ No newline at end of file diff --git a/data/data/agent/systemd/units/agent.service.template b/data/data/agent/systemd/units/agent.service.template new file mode 100644 index 0000000000..7a95b63064 --- /dev/null +++ b/data/data/agent/systemd/units/agent.service.template @@ -0,0 +1,24 @@ +[Service] +Type=simple +Restart=always +RestartSec=3 +StartLimitInterval=0 +Environment=HTTP_PROXY= +Environment=http_proxy= +Environment=HTTPS_PROXY= +Environment=https_proxy= +Environment=NO_PROXY= +Environment=no_proxy= +# TODO: If AUTH_TYPE != none, then PULL_SECRET_TOKEN needs to be updated +# https://github.com/openshift/assisted-service/blob/master/internal/ignition/ignition.go#L1381 +Environment=PULL_SECRET_TOKEN={{.PullSecretToken}} +TimeoutStartSec=180 +ExecStartPre=podman run --privileged --rm -v /usr/local/bin:/hostbin quay.io/edge-infrastructure/assisted-installer-agent:latest cp /usr/bin/agent /hostbin +ExecStart=/usr/local/bin/agent --url {{.ServiceBaseURL}} --infra-env-id {{.infraEnvId}} --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true + +[Unit] +Wants=network-online.target +After=network-online.target + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/data/data/agent/systemd/units/selinux.service b/data/data/agent/systemd/units/selinux.service new file mode 100644 index 0000000000..ab45cbd71f --- /dev/null +++ b/data/data/agent/systemd/units/selinux.service @@ -0,0 +1,8 @@ +[Service] +Type=oneshot +ExecStartPre=checkmodule -M -m -o /root/assisted.mod /root/assisted.te +ExecStartPre=semodule_package -o /root/assisted.pp -m /root/assisted.mod +ExecStart=semodule -i /root/assisted.pp + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 87f963a651..f109a247b4 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -1,11 +1,13 @@ package imagebuilder import ( + "bytes" "encoding/json" "fmt" "os" "path" "strings" + template "text/template" ignutil "github.com/coreos/ignition/v2/config/util" igntypes "github.com/coreos/ignition/v2/config/v3_2/types" @@ -34,10 +36,29 @@ func (c ConfigBuilder) Ignition() ([]byte, error) { }, } - config.Storage.Files, err = c.getFiles() + files, err := c.getFiles() if err != nil { return nil, err } + // pull secret not included in data/data/agent/files because embed.FS + // does not list directories with name starting with '.' + mode := 0420 + pullSecretText := os.Getenv("PULL_SECRET") + + pullSecret := igntypes.File{ + Node: igntypes.Node{ + Path: "/root/.docker/config.json", + Overwrite: ignutil.BoolToPtr(true), + }, + FileEmbedded1: igntypes.FileEmbedded1{ + Mode: &mode, + Contents: igntypes.Resource{ + Source: ignutil.StrToPtr(dataurl.EncodeBytes([]byte(pullSecretText))), + }, + }, + } + files = append(files, pullSecret) + config.Storage.Files = files config.Systemd.Units, err = c.getUnits() if err != nil { @@ -120,13 +141,42 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { return units, fmt.Errorf("Failed to read unit %s: %w", e.Name(), err) } + templated, err := templateString(e.Name(), string(contents)) + if err != nil { + return units, err + } + unit := igntypes.Unit{ Name: strings.TrimSuffix(e.Name(), ".template"), Enabled: ignutil.BoolToPtr(true), - Contents: ignutil.StrToPtr(string(contents)), + Contents: ignutil.StrToPtr(string(templated)), } units = append(units, unit) } return units, nil } + +func templateString(name string, text string) (string, error) { + params := map[string]interface{}{ + // TODO: try setting SERVICE_BASE_URL within agent.service + "ServiceBaseURL": os.Getenv("SERVICE_BASE_URL"), + // TODO: get id either from InfraEnv CR that is included + // with tool, or query the id from the REST_API + // curl http://SERVICE_BASE_URL/api/assisted-install/v2/infra-envs + "infraEnvId": os.Getenv("INFRA_ENV_ID"), + // TODO: needs appropriate value if AUTH_TYPE != none + "PullSecretToken": os.Getenv("PULL_SECRET_TOKEN"), + } + + tmpl, err := template.New(name).Parse(string(text)) + if err != nil { + return "", err + } + buf := &bytes.Buffer{} + if err = tmpl.Execute(buf, params); err != nil { + return "", err + } + + return buf.String(), nil +} From ec3f12a26f0b3f00d9302506f22a290540933fd5 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Tue, 22 Feb 2022 18:13:27 -0800 Subject: [PATCH 015/274] Move template params to ConfigBuilder struct --- pkg/agent/imagebuilder/content.go | 75 ++++++++++++++++-------- pkg/agent/imagebuilder/embed_ignition.go | 3 +- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index f109a247b4..73e8958ae0 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -17,6 +17,36 @@ import ( ) type ConfigBuilder struct { + pullSecret string + serviceBaseURL string + infraEnvID string + pullSecretToken string +} + +func New() *ConfigBuilder { + pullSecret := getEnv("PULL_SECRET", "") + // TODO: try setting SERVICE_BASE_URL within agent.service + serviceBaseURL := getEnv("SERVICE_BASE_URL", "http://127.0.0.1") + // TODO: get id either from InfraEnv CR that is included + // with tool, or query the id from the REST_API + // curl http://SERVICE_BASE_URL/api/assisted-install/v2/infra-envs + infraEnvID := getEnv("INFRA_ENV_ID", "infra-env-id-missing") + // TODO: needs appropriate value if AUTH_TYPE != none + pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") + + return &ConfigBuilder{ + pullSecret: pullSecret, + serviceBaseURL: serviceBaseURL, + infraEnvID: infraEnvID, + pullSecretToken: pullSecretToken, + } +} + +func getEnv(key, fallback string) string { + if value, ok := os.LookupEnv(key); ok { + return value + } + return fallback } func (c ConfigBuilder) Ignition() ([]byte, error) { @@ -40,24 +70,26 @@ func (c ConfigBuilder) Ignition() ([]byte, error) { if err != nil { return nil, err } + // pull secret not included in data/data/agent/files because embed.FS // does not list directories with name starting with '.' - mode := 0420 - pullSecretText := os.Getenv("PULL_SECRET") - - pullSecret := igntypes.File{ - Node: igntypes.Node{ - Path: "/root/.docker/config.json", - Overwrite: ignutil.BoolToPtr(true), - }, - FileEmbedded1: igntypes.FileEmbedded1{ - Mode: &mode, - Contents: igntypes.Resource{ - Source: ignutil.StrToPtr(dataurl.EncodeBytes([]byte(pullSecretText))), + if c.pullSecret != "" { + mode := 0420 + pullSecret := igntypes.File{ + Node: igntypes.Node{ + Path: "/root/.docker/config.json", + Overwrite: ignutil.BoolToPtr(true), }, - }, + FileEmbedded1: igntypes.FileEmbedded1{ + Mode: &mode, + Contents: igntypes.Resource{ + Source: ignutil.StrToPtr(dataurl.EncodeBytes([]byte(c.pullSecret))), + }, + }, + } + files = append(files, pullSecret) } - files = append(files, pullSecret) + config.Storage.Files = files config.Systemd.Units, err = c.getUnits() @@ -141,7 +173,7 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { return units, fmt.Errorf("Failed to read unit %s: %w", e.Name(), err) } - templated, err := templateString(e.Name(), string(contents)) + templated, err := c.templateString(e.Name(), string(contents)) if err != nil { return units, err } @@ -157,16 +189,11 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { return units, nil } -func templateString(name string, text string) (string, error) { +func (c ConfigBuilder) templateString(name string, text string) (string, error) { params := map[string]interface{}{ - // TODO: try setting SERVICE_BASE_URL within agent.service - "ServiceBaseURL": os.Getenv("SERVICE_BASE_URL"), - // TODO: get id either from InfraEnv CR that is included - // with tool, or query the id from the REST_API - // curl http://SERVICE_BASE_URL/api/assisted-install/v2/infra-envs - "infraEnvId": os.Getenv("INFRA_ENV_ID"), - // TODO: needs appropriate value if AUTH_TYPE != none - "PullSecretToken": os.Getenv("PULL_SECRET_TOKEN"), + "ServiceBaseURL": c.serviceBaseURL, + "infraEnvId": c.infraEnvID, + "PullSecretToken": c.pullSecretToken, } tmpl, err := template.New(name).Parse(string(text)) diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index bec20bbfd2..d591465f61 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -12,7 +12,8 @@ const ( ) func BuildImage(baseImage string) error { - ignition, err := ConfigBuilder{}.Ignition() + configBuilder := New() + ignition, err := configBuilder.Ignition() if err != nil { return err } From be163db1044acd1dedd68332e2cfd9b6e2ffc732 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 28 Feb 2022 12:18:20 -0500 Subject: [PATCH 016/274] Set postgres user explicitly Work around containers/podman#9609 (which causes the USER set in the Dockerfile to be ignored) in Podman 3.2.3. (The issue is fixed in Podman 3.3.) Co-authored-by: Richard Su --- data/data/agent/files/usr/local/share/assisted-service/pod.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/data/agent/files/usr/local/share/assisted-service/pod.yml b/data/data/agent/files/usr/local/share/assisted-service/pod.yml index ea6ae03b43..bbe5c8a833 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/pod.yml +++ b/data/data/agent/files/usr/local/share/assisted-service/pod.yml @@ -7,7 +7,10 @@ metadata: spec: containers: - args: + - su + - -c - run-postgresql + - postgres image: quay.io/centos7/postgresql-12-centos7:latest name: db envFrom: From 866bee76a275a0394b0ad921682dcaaa3391de92 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Thu, 17 Feb 2022 20:12:10 -0500 Subject: [PATCH 017/274] Run assisted-service only on pre-identified node0 Run the assisted service only on node0. Run `make iso` which creates an ISO with a default node zero ip `192.168.122.2`. To set a different IP for node zero, `go run cmd/main.go -node-zero-ip 192.168.122.4` A systemd service `node-zero.service` looks for the node zero IP and if the current node's IP matches with it then only the `assisted-service.service` systemd service is startred. The `assisted-service.service` is responsible for running the assisted service. --- .../files/usr/local/bin/common.sh.template | 17 ++++++++++++++ .../usr/local/bin/set-node-zero.sh.template | 12 ++++++++++ .../assisted-service/configmap.yml.template | 6 ++--- .../systemd/units/assisted-service.service | 5 +++-- .../agent/systemd/units/node-zero.service | 12 ++++++++++ pkg/agent/build_image.go | 13 ++++++++++- pkg/agent/imagebuilder/content.go | 22 +++++++++++++------ pkg/agent/imagebuilder/embed_ignition.go | 4 ++-- 8 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 data/data/agent/files/usr/local/bin/common.sh.template create mode 100644 data/data/agent/files/usr/local/bin/set-node-zero.sh.template create mode 100644 data/data/agent/systemd/units/node-zero.service diff --git a/data/data/agent/files/usr/local/bin/common.sh.template b/data/data/agent/files/usr/local/bin/common.sh.template new file mode 100644 index 0000000000..e588fc1186 --- /dev/null +++ b/data/data/agent/files/usr/local/bin/common.sh.template @@ -0,0 +1,17 @@ +#!/bin/bash + +get_host() { + local default_gateway + local host_ip + + default_gateway=$(ip -j route show default | jq -r '.[0].gateway') + host_ip=$(ip -j route get "${default_gateway}" | jq -r '.[0].prefsrc') + + local host_fmt="%s" + if [[ ${host_ip} =~ : ]]; then + host_fmt="[%s]" + fi + + # shellcheck disable=SC2059 + printf "${host_fmt}" "${host_ip}" +} diff --git a/data/data/agent/files/usr/local/bin/set-node-zero.sh.template b/data/data/agent/files/usr/local/bin/set-node-zero.sh.template new file mode 100644 index 0000000000..a21e5d40c9 --- /dev/null +++ b/data/data/agent/files/usr/local/bin/set-node-zero.sh.template @@ -0,0 +1,12 @@ +#!/bin/bash + +source common.sh + +HOST=$(get_host) +echo Using hostname ${HOST} 1>&2 + +if [[ ${HOST} == {{.NodeZeroIP}} ]] ;then + mkdir -p /etc/assisted-service && cd /etc/assisted-service && touch node0 + echo "This host is identified and set as node zero to run OpenShift Assisted Installer Service." > /etc/assisted-service/node0 + echo "Created file /etc/assisted-service/node0" +fi diff --git a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template index 4b53d072c0..37bfeef85b 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template +++ b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template @@ -3,7 +3,7 @@ kind: ConfigMap metadata: name: config data: - ASSISTED_SERVICE_HOST: 127.0.0.1:8090 + ASSISTED_SERVICE_HOST: {{.NodeZeroIP}}:8090 ASSISTED_SERVICE_SCHEME: http AUTH_TYPE: none DB_HOST: 127.0.0.1 @@ -16,7 +16,7 @@ data: DUMMY_IGNITION: "false" ENABLE_SINGLE_NODE_DNSMASQ: "true" HW_VALIDATOR_REQUIREMENTS: '[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10}}]' - IMAGE_SERVICE_BASE_URL: http://127.0.0.1:8888 + IMAGE_SERVICE_BASE_URL: http://{{.NodeZeroIP}}:8888 IPV6_SUPPORT: "true" LISTEN_PORT: "8888" NTP_DEFAULT_SERVER: "" @@ -26,5 +26,5 @@ data: POSTGRESQL_USER: admin PUBLIC_CONTAINER_REGISTRIES: 'quay.io' RELEASE_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}]' - SERVICE_BASE_URL: http://127.0.0.1:8090 + SERVICE_BASE_URL: http://{{.NodeZeroIP}}:8090 STORAGE: filesystem diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index a4828ccfe5..ea13a2d2c3 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -1,7 +1,8 @@ [Unit] Description=OpenShift Assisted Installation Service -Wants=network-online.target -After=network-online.target +Wants=network-online.target node-zero.service +After=network-online.target node-zero.service +ConditionPathExists=/etc/assisted-service/node0 [Service] Environment=PODMAN_SYSTEMD_UNIT=%n diff --git a/data/data/agent/systemd/units/node-zero.service b/data/data/agent/systemd/units/node-zero.service new file mode 100644 index 0000000000..2ad0ef6725 --- /dev/null +++ b/data/data/agent/systemd/units/node-zero.service @@ -0,0 +1,12 @@ +[Unit] +Description=Identify node zero to run OpenShift Assisted Installation Service on +Wants=network-online.target +After=network-online.target + +[Service] +ExecStart=/usr/local/bin/set-node-zero.sh +ExecStartPost=/bin/sleep 5 +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go index b396d2293c..4365463dd3 100644 --- a/pkg/agent/build_image.go +++ b/pkg/agent/build_image.go @@ -1,17 +1,28 @@ package agent import ( + "flag" + "os" + "github.com/openshift-agent-team/fleeting/pkg/agent/imagebuilder" "github.com/openshift-agent-team/fleeting/pkg/agent/isosource" ) func BuildImage() error { + nodeZeroIP := flag.String("node-zero-ip", "", "IP of the node to run OpenShift Assisted Installation Service on. (Required)") + flag.Parse() + + if *nodeZeroIP == "" { + flag.PrintDefaults() + os.Exit(1) + } + baseImage, err := isosource.EnsureIso() if err != nil { return err } - err = imagebuilder.BuildImage(baseImage) + err = imagebuilder.BuildImage(baseImage, *nodeZeroIP) if err != nil { return err } diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 821f2645fe..d75b9cfa47 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -22,12 +22,13 @@ type ConfigBuilder struct { serviceBaseURL string infraEnvID string pullSecretToken string + nodeZeroIP string } -func New() *ConfigBuilder { +func New(nodeZeroIP string) *ConfigBuilder { pullSecret := getEnv("PULL_SECRET", "") // TODO: try setting SERVICE_BASE_URL within agent.service - serviceBaseURL := getEnv("SERVICE_BASE_URL", "http://127.0.0.1") + serviceBaseURL := getEnv("SERVICE_BASE_URL", "http://"+nodeZeroIP+":8090") // TODO: get id either from InfraEnv CR that is included // with tool, or query the id from the REST_API // curl http://SERVICE_BASE_URL/api/assisted-install/v2/infra-envs @@ -40,6 +41,7 @@ func New() *ConfigBuilder { serviceBaseURL: serviceBaseURL, infraEnvID: infraEnvID, pullSecretToken: pullSecretToken, + nodeZeroIP: nodeZeroIP, } } @@ -121,7 +123,7 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { readDir = func(dirPath string, files []igntypes.File) ([]igntypes.File, error) { entries, err := data.IgnitionData.ReadDir(path.Join("files", dirPath)) if err != nil { - return files, fmt.Errorf("Failed to open file dir \"%s\": %w", dirPath, err) + return files, fmt.Errorf("failed to open file dir \"%s\": %w", dirPath, err) } for _, e := range entries { fullPath := path.Join(dirPath, e.Name()) @@ -133,8 +135,13 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { } else { contents, err := data.IgnitionData.ReadFile(path.Join("files", fullPath)) if err != nil { - return files, fmt.Errorf("Failed to read file %s: %w", fullPath, err) + return files, fmt.Errorf("failed to read file %s: %w", fullPath, err) } + templated, err := c.templateString(e.Name(), string(contents)) + if err != nil { + return files, err + } + mode := 0600 if _, dirName := path.Split(dirPath); dirName == "bin" || dirName == "dispatcher.d" { mode = 0555 @@ -147,7 +154,7 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { FileEmbedded1: igntypes.FileEmbedded1{ Mode: &mode, Contents: igntypes.Resource{ - Source: ignutil.StrToPtr(dataurl.EncodeBytes(contents)), + Source: ignutil.StrToPtr(dataurl.EncodeBytes([]byte(templated))), }, }, } @@ -166,13 +173,13 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { entries, err := data.IgnitionData.ReadDir(basePath) if err != nil { - return units, fmt.Errorf("Failed to read systemd units: %w", err) + return units, fmt.Errorf("failed to read systemd units: %w", err) } for _, e := range entries { contents, err := data.IgnitionData.ReadFile(path.Join(basePath, e.Name())) if err != nil { - return units, fmt.Errorf("Failed to read unit %s: %w", e.Name(), err) + return units, fmt.Errorf("failed to read unit %s: %w", e.Name(), err) } templated, err := c.templateString(e.Name(), string(contents)) @@ -196,6 +203,7 @@ func (c ConfigBuilder) templateString(name string, text string) (string, error) "ServiceBaseURL": c.serviceBaseURL, "infraEnvId": c.infraEnvID, "PullSecretToken": c.pullSecretToken, + "NodeZeroIP": c.nodeZeroIP, } tmpl, err := template.New(name).Parse(string(text)) diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index d88f19baaf..5567d460d2 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -13,8 +13,8 @@ const ( // BuildImage builds an ISO with ignition content from a base image, and writes // the result to disk. -func BuildImage(baseImage string) error { - configBuilder := New() +func BuildImage(baseImage string, nodeZeroIP string) error { + configBuilder := New(nodeZeroIP) ignition, err := configBuilder.Ignition() if err != nil { return err From 0fec015c8edbe3716c0fc94c2cfc394df5c37c6b Mon Sep 17 00:00:00 2001 From: Richard Su Date: Tue, 8 Mar 2022 22:54:23 -0800 Subject: [PATCH 018/274] Rename assisted-installer pod to assisted-service When cluster installation starts, another pod, also named assisted-installer will run on the hosts. So let's change our pod's name to assisted-service. --- .../data/agent/files/usr/local/share/assisted-service/pod.yml | 4 ++-- data/data/agent/systemd/units/assisted-service.service | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data/agent/files/usr/local/share/assisted-service/pod.yml b/data/data/agent/files/usr/local/share/assisted-service/pod.yml index bbe5c8a833..f7122d754b 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/pod.yml +++ b/data/data/agent/files/usr/local/share/assisted-service/pod.yml @@ -2,8 +2,8 @@ apiVersion: v1 kind: Pod metadata: labels: - app: assisted-installer - name: assisted-installer + app: assisted-service + name: assisted-service spec: containers: - args: diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index ea13a2d2c3..b942edab72 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -7,8 +7,8 @@ ConditionPathExists=/etc/assisted-service/node0 [Service] Environment=PODMAN_SYSTEMD_UNIT=%n ExecStart=/usr/local/bin/start-assisted-service.sh -ExecStop=/bin/podman pod stop --ignore assisted-installer -t 10 -ExecStopPost=/bin/podman pod rm --ignore assisted-installer +ExecStop=/bin/podman pod stop --ignore assisted-service -t 10 +ExecStopPost=/bin/podman pod rm --ignore assisted-service Restart=on-failure KillMode=none From e926e5d20dfc6134607fcd9c2a553188b5ceb1a4 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Wed, 9 Mar 2022 14:46:33 -0800 Subject: [PATCH 019/274] AGENT-43 Fetch infra-env-id before host registration The agent is baked into the ISO without knowing which infra-env-id it should use when it registers a host with assisted-service. Before starting the agent, a shell script continously calls the assisted-service REST-API waiting for an infra-env to appear. An infra-env should have been created on node0 after assisted-service has started up. When the REST-API list call returns an infra-env, the script extracts the infra-env-id and passes the id to the agent. --- .../files/usr/local/bin/start-agent.sh.template | 17 +++++++++++++++++ .../agent/systemd/units/agent.service.template | 5 ++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 data/data/agent/files/usr/local/bin/start-agent.sh.template diff --git a/data/data/agent/files/usr/local/bin/start-agent.sh.template b/data/data/agent/files/usr/local/bin/start-agent.sh.template new file mode 100644 index 0000000000..94898bd283 --- /dev/null +++ b/data/data/agent/files/usr/local/bin/start-agent.sh.template @@ -0,0 +1,17 @@ +#!/bin/bash + +source common.sh + +echo "Waiting for infra-env-id to be available" +INFRA_ENV_ID="" +until [[ $INFRA_ENV_ID != "" && $INFRA_ENV_ID != "null" ]]; do + sleep 5 + printf 'Querying assisted-service for infra-env-id...' + INFRA_ENV_ID=$(curl {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs | jq .[0].id) +done +# trim quotes +INFRA_ENV_ID=${INFRA_ENV_ID//\"} +echo "Fetched infra-env-id and found: $INFRA_ENV_ID" + +# use infra-env-id to have agent register this host with assisted-service +/usr/local/bin/agent --url {{.ServiceBaseURL}} --infra-env-id $INFRA_ENV_ID --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true \ No newline at end of file diff --git a/data/data/agent/systemd/units/agent.service.template b/data/data/agent/systemd/units/agent.service.template index 7a95b63064..3790bd5bbd 100644 --- a/data/data/agent/systemd/units/agent.service.template +++ b/data/data/agent/systemd/units/agent.service.template @@ -12,10 +12,9 @@ Environment=no_proxy= # TODO: If AUTH_TYPE != none, then PULL_SECRET_TOKEN needs to be updated # https://github.com/openshift/assisted-service/blob/master/internal/ignition/ignition.go#L1381 Environment=PULL_SECRET_TOKEN={{.PullSecretToken}} -TimeoutStartSec=180 +TimeoutStartSec=3000 ExecStartPre=podman run --privileged --rm -v /usr/local/bin:/hostbin quay.io/edge-infrastructure/assisted-installer-agent:latest cp /usr/bin/agent /hostbin -ExecStart=/usr/local/bin/agent --url {{.ServiceBaseURL}} --infra-env-id {{.infraEnvId}} --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true - +ExecStart=/usr/local/bin/start-agent.sh [Unit] Wants=network-online.target After=network-online.target From d082834a3a02d4a4b0407ab92294fdd145c25a05 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Tue, 8 Mar 2022 22:37:34 -0800 Subject: [PATCH 020/274] AGENT-37 Create cluster and infra-env using assisted-service REST-API The ZTP manifests are placed under data/manifests. The tool reads in the manifests and creates parameters in JSON that are used to specify the new cluster and infra-env. A new service, create-cluster-and-infra-env, waits for assisted-service to be running and for the REST-API to be ready. The service then POSTs the JSON parameters to the REST-API, creating a cluster and a infra-env. Having a dependency to assisted-service ensures that the other hosts running the ISO doesn't create duplicate clusters and infra-envs. --- .../files/usr/local/bin/common.sh.template | 8 + .../create-cluster-and-infra-env.sh.template | 23 +++ .../create-cluster-and-infra-env.service | 14 ++ go.mod | 21 +- pkg/agent/imagebuilder/content.go | 48 +++-- pkg/agent/manifests/clusterdeployment.go | 183 ++++++++++++++++++ pkg/agent/manifests/infraenv.go | 65 +++++++ 7 files changed, 341 insertions(+), 21 deletions(-) create mode 100644 data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template create mode 100644 data/data/agent/systemd/units/create-cluster-and-infra-env.service create mode 100644 pkg/agent/manifests/clusterdeployment.go create mode 100644 pkg/agent/manifests/infraenv.go diff --git a/data/data/agent/files/usr/local/bin/common.sh.template b/data/data/agent/files/usr/local/bin/common.sh.template index e588fc1186..75dc8286c8 100644 --- a/data/data/agent/files/usr/local/bin/common.sh.template +++ b/data/data/agent/files/usr/local/bin/common.sh.template @@ -15,3 +15,11 @@ get_host() { # shellcheck disable=SC2059 printf "${host_fmt}" "${host_ip}" } + +wait_for_assisted_service() { + echo "Waiting for assisted-service to be ready" + until $(curl --output /dev/null --silent --fail {{.ServiceBaseURL}}//api/assisted-install/v2/infra-envs); do + printf '.' + sleep 5 + done +} diff --git a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template new file mode 100644 index 0000000000..7f5eda39e7 --- /dev/null +++ b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Calls assisted-service REST-API to create cluster using the params generated from reading the ZTP manifests. +# The cluster's id is found in the create cluster response. +# The cluster-id is then used in the REST-API call to create the infra-env. +# + +source common.sh + +wait_for_assisted_service + +CLUSTER_CREATE_OUT=$(curl -X POST -H "Content-Type: application/json" -d '{{.ClusterCreateParamsJSON}}' {{.ServiceBaseURL}}/api/assisted-install/v2/clusters) +echo "cluster create response: $CLUSTER_CREATE_OUT" +# pick cluster_id out from cluster create response +CLUSTER_ID=$(echo $CLUSTER_CREATE_OUT | jq .id) +# trim quotes from CLUSTER_ID +CLUSTER_ID=${CLUSTER_ID//\"} + +INFRA_ENV_PARAMS_JSON='{{.InfraEnvCreateParamsJSON}}' +# replace "replace-cluster-id" with $CLUSTER_ID +INFRA_ENV_PARAMS_JSON=${INFRA_ENV_PARAMS_JSON//"replace-cluster-id"/$CLUSTER_ID} + +curl -X POST -H "Content-Type: application/json" -d $INFRA_ENV_PARAMS_JSON {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs diff --git a/data/data/agent/systemd/units/create-cluster-and-infra-env.service b/data/data/agent/systemd/units/create-cluster-and-infra-env.service new file mode 100644 index 0000000000..aa54b755f1 --- /dev/null +++ b/data/data/agent/systemd/units/create-cluster-and-infra-env.service @@ -0,0 +1,14 @@ +[Unit] +Description=Service that creates initial cluster and infra-env +Wants=network-online.target assisted-service.service +After=network-online.target assisted-service.service +ConditionPathExists=/etc/assisted-service/node0 + +[Service] +ExecStart=/usr/local/bin/create-cluster-and-infra-env.sh + +KillMode=none +Type=forking + +[Install] +WantedBy=multi-user.target diff --git a/go.mod b/go.mod index 013f2568e8..b97ac96127 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,24 @@ go 1.16 require ( github.com/coreos/go-systemd/v22 v22.3.2 // indirect github.com/coreos/ignition/v2 v2.9.0 - github.com/openshift/assisted-image-service v0.0.0-20220207151621-a9f6dc6bd2cf + github.com/go-openapi/strfmt v0.21.1 + github.com/go-openapi/swag v0.19.15 + github.com/openshift/assisted-image-service v0.0.0-20220307202600-054a1afa8d28 + github.com/openshift/assisted-service v1.0.10-0.20220116113517-db25501e204a + github.com/openshift/hive/apis v0.0.0-20210506000654-5c038fb05190 + github.com/thoas/go-funk v0.9.1 github.com/vincent-petithory/dataurl v1.0.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/api v0.21.1 + sigs.k8s.io/yaml v1.3.0 +) + +replace ( + github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.3.1 + github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20200715132148-0f91f62a41fe // Use OpenShift fork + github.com/openshift/hive/pkg/apis => github.com/carbonin/hive/pkg/apis v0.0.0-20210209195732-57e8c3ae12d1 + k8s.io/api => k8s.io/api v0.0.0-20190712022805-31fe033ae6f9 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190711222657-391ed67afa7b + k8s.io/client-go => k8s.io/client-go v0.0.0-20190620085101-78d2af792bab + sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 + sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205 ) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index d75b9cfa47..c869b987c7 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -14,34 +14,43 @@ import ( "github.com/vincent-petithory/dataurl" data "github.com/openshift-agent-team/fleeting/data/data/agent" + "github.com/openshift-agent-team/fleeting/pkg/agent/manifests" ) // ConfigBuilder builds an Ignition config type ConfigBuilder struct { - pullSecret string - serviceBaseURL string - infraEnvID string - pullSecretToken string - nodeZeroIP string + pullSecret string + serviceBaseURL string + pullSecretToken string + nodeZeroIP string + createClusterParamsJSON string + createInfraEnvParamsJSON string } func New(nodeZeroIP string) *ConfigBuilder { - pullSecret := getEnv("PULL_SECRET", "") + pullSecret := manifests.GetPullSecret() // TODO: try setting SERVICE_BASE_URL within agent.service serviceBaseURL := getEnv("SERVICE_BASE_URL", "http://"+nodeZeroIP+":8090") - // TODO: get id either from InfraEnv CR that is included - // with tool, or query the id from the REST_API - // curl http://SERVICE_BASE_URL/api/assisted-install/v2/infra-envs - infraEnvID := getEnv("INFRA_ENV_ID", "infra-env-id-missing") // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") + clusterParams := manifests.CreateClusterParams() + clusterJSON, err := json.Marshal(clusterParams) + if err != nil { + fmt.Errorf("Error marshalling cluster params into json: %w", err) + } + infraEnvParams := manifests.CreateInfraEnvParams() + infraEnvJSON, err := json.Marshal(infraEnvParams) + if err != nil { + fmt.Errorf("Error marshal infra env params into json: %w", err) + } return &ConfigBuilder{ - pullSecret: pullSecret, - serviceBaseURL: serviceBaseURL, - infraEnvID: infraEnvID, - pullSecretToken: pullSecretToken, - nodeZeroIP: nodeZeroIP, + pullSecret: pullSecret, + serviceBaseURL: serviceBaseURL, + pullSecretToken: pullSecretToken, + nodeZeroIP: nodeZeroIP, + createClusterParamsJSON: string(clusterJSON), + createInfraEnvParamsJSON: string(infraEnvJSON), } } @@ -200,10 +209,11 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { func (c ConfigBuilder) templateString(name string, text string) (string, error) { params := map[string]interface{}{ - "ServiceBaseURL": c.serviceBaseURL, - "infraEnvId": c.infraEnvID, - "PullSecretToken": c.pullSecretToken, - "NodeZeroIP": c.nodeZeroIP, + "ServiceBaseURL": c.serviceBaseURL, + "PullSecretToken": c.pullSecretToken, + "NodeZeroIP": c.nodeZeroIP, + "ClusterCreateParamsJSON": c.createClusterParamsJSON, + "InfraEnvCreateParamsJSON": c.createInfraEnvParamsJSON, } tmpl, err := template.New(name).Parse(string(text)) diff --git a/pkg/agent/manifests/clusterdeployment.go b/pkg/agent/manifests/clusterdeployment.go new file mode 100644 index 0000000000..13920789b7 --- /dev/null +++ b/pkg/agent/manifests/clusterdeployment.go @@ -0,0 +1,183 @@ +package manifests + +import ( + "fmt" + "os" + + "github.com/go-openapi/swag" + hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1" + "github.com/openshift/assisted-service/models" + hivev1 "github.com/openshift/hive/apis/hive/v1" + "github.com/thoas/go-funk" + corev1 "k8s.io/api/core/v1" + "sigs.k8s.io/yaml" +) + +func GetPullSecret() string { + secretData, err := os.ReadFile("./data/manifests/pull-secret.yaml") + if err != nil { + fmt.Errorf("Error reading pull secret: %w", err) + } + var secret corev1.Secret + if err := yaml.Unmarshal(secretData, &secret); err != nil { + fmt.Errorf("Error unmarshalling pull secret: %w", err) + } + pullSecret := secret.StringData[".dockerconfigjson"] + return pullSecret +} + +func getClusterDeployment() hivev1.ClusterDeployment { + cdData, err := os.ReadFile("./data/manifests/cluster-deployment.yaml") + if err != nil { + fmt.Errorf("Error reading cluster deployment CR: %w", err) + } + var cd hivev1.ClusterDeployment + if err := yaml.Unmarshal(cdData, &cd); err != nil { + fmt.Errorf("Error unmarshalling cluster deployment CR: %w", err) + } + return cd +} + +func getAgentClusterInstall() hiveext.AgentClusterInstall { + aciData, err := os.ReadFile("./data/manifests/agent-cluster-install.yaml") + if err != nil { + fmt.Errorf("Error reading AgentClusterInstall CR: %w", err) + } + var aci hiveext.AgentClusterInstall + if err := yaml.Unmarshal(aciData, &aci); err != nil { + fmt.Errorf("Error unmarshalling AgentClusterInstall CR: %w", err) + } + return aci +} + +// createClusterParams and associated functions were copied from +// https://github.com/openshift/assisted-service/blob/c5eacda676475f5a6de123678c1af353a2368bd3/internal/controller/controllers/clusterdeployments_controller.go#L1088 +// TODO: Refactor clusterdeployments_controller to have a CreateClusterParams function that can be used in controller and here. +// After the refactoring most of the code below goes away, especially the helper functions that are being carried over here. +func CreateClusterParams() *models.ClusterCreateParams { + cd := getClusterDeployment() + aci := getAgentClusterInstall() + clusterInstall := &aci + // TODO: Have single source for image version and cpu arch + releaseImageVersion := "4.10.0-rc.1" + releaseImageCPUArch := "x86_64" + pullSecret := GetPullSecret() + + clusterParams := &models.ClusterCreateParams{ + BaseDNSDomain: cd.Spec.BaseDomain, + Name: swag.String(cd.Spec.ClusterName), + OpenshiftVersion: &releaseImageVersion, + OlmOperators: nil, // TODO: handle operators + PullSecret: swag.String(pullSecret), + VipDhcpAllocation: swag.Bool(false), + IngressVip: clusterInstall.Spec.IngressVIP, + SSHPublicKey: clusterInstall.Spec.SSHPublicKey, + CPUArchitecture: releaseImageCPUArch, + UserManagedNetworking: swag.Bool(isUserManagedNetwork(clusterInstall)), + } + + if len(clusterInstall.Spec.Networking.ClusterNetwork) > 0 { + for _, net := range clusterInstall.Spec.Networking.ClusterNetwork { + clusterParams.ClusterNetworks = append(clusterParams.ClusterNetworks, &models.ClusterNetwork{ + Cidr: models.Subnet(net.CIDR), + HostPrefix: int64(net.HostPrefix)}) + } + } + + if len(clusterInstall.Spec.Networking.ServiceNetwork) > 0 { + for _, cidr := range clusterInstall.Spec.Networking.ServiceNetwork { + clusterParams.ServiceNetworks = append(clusterParams.ServiceNetworks, &models.ServiceNetwork{ + Cidr: models.Subnet(cidr), + }) + } + } + + if clusterInstall.Spec.ProvisionRequirements.ControlPlaneAgents == 1 && + clusterInstall.Spec.ProvisionRequirements.WorkerAgents == 0 { + clusterParams.HighAvailabilityMode = swag.String("None") + } + + if hyperthreadingInSpec(clusterInstall) { + clusterParams.Hyperthreading = getHyperthreading(clusterInstall) + } + + if isDiskEncryptionEnabled(clusterInstall) { + clusterParams.DiskEncryption = &models.DiskEncryption{ + EnableOn: clusterInstall.Spec.DiskEncryption.EnableOn, + Mode: clusterInstall.Spec.DiskEncryption.Mode, + TangServers: clusterInstall.Spec.DiskEncryption.TangServers, + } + } + + return clusterParams +} + +func isUserManagedNetwork(clusterInstall *hiveext.AgentClusterInstall) bool { + return clusterInstall.Spec.Networking.UserManagedNetworking || + clusterInstall.Spec.ProvisionRequirements.ControlPlaneAgents == 1 && clusterInstall.Spec.ProvisionRequirements.WorkerAgents == 0 +} + +//see https://docs.openshift.com/container-platform/4.7/installing/installing_platform_agnostic/installing-platform-agnostic.html#installation-bare-metal-config-yaml_installing-platform-agnostic +func hyperthreadingInSpec(clusterInstall *hiveext.AgentClusterInstall) bool { + //check if either master or worker pool hyperthreading settings are explicitly specified + return clusterInstall.Spec.ControlPlane != nil || + funk.Contains(clusterInstall.Spec.Compute, func(pool hiveext.AgentMachinePool) bool { + return pool.Name == hiveext.WorkerAgentMachinePool + }) +} + +func getHyperthreading(clusterInstall *hiveext.AgentClusterInstall) *string { + const ( + None = 0 + Workers = 1 + Masters = 2 + All = 3 + ) + var config uint = 0 + + //if there is no configuration of hyperthreading in the Spec then + //we are opting of the default behavior which is all enabled + if !hyperthreadingInSpec(clusterInstall) { + config = All + } + + //check if the Spec enables hyperthreading for workers + for _, machinePool := range clusterInstall.Spec.Compute { + if machinePool.Name == hiveext.WorkerAgentMachinePool && machinePool.Hyperthreading == hiveext.HyperthreadingEnabled { + config = config | Workers + } + } + + //check if the Spec enables hyperthreading for masters + if clusterInstall.Spec.ControlPlane != nil { + if clusterInstall.Spec.ControlPlane.Hyperthreading == hiveext.HyperthreadingEnabled { + config = config | Masters + } + } + + //map between CRD Spec and cluster API + switch config { + case None: + return swag.String(models.ClusterHyperthreadingNone) + case Workers: + return swag.String(models.ClusterHyperthreadingWorkers) + case Masters: + return swag.String(models.ClusterHyperthreadingMasters) + default: + return swag.String(models.ClusterHyperthreadingAll) + } +} + +func isDiskEncryptionEnabled(clusterInstall *hiveext.AgentClusterInstall) bool { + if clusterInstall.Spec.DiskEncryption == nil { + return false + } + switch swag.StringValue(clusterInstall.Spec.DiskEncryption.EnableOn) { + case models.DiskEncryptionEnableOnAll, models.DiskEncryptionEnableOnMasters, models.DiskEncryptionEnableOnWorkers: + return true + case models.DiskEncryptionEnableOnNone: + return false + default: + return false + } +} diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go new file mode 100644 index 0000000000..1478b9da27 --- /dev/null +++ b/pkg/agent/manifests/infraenv.go @@ -0,0 +1,65 @@ +package manifests + +import ( + "fmt" + "os" + "strings" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" + "github.com/openshift/assisted-service/models" + "sigs.k8s.io/yaml" +) + +func getInfraEnv() aiv1beta1.InfraEnv { + infraEnvData, err := os.ReadFile("/data/manifests/infraenv.yaml") + if err != nil { + fmt.Errorf("Error reading pull secret: %w", err) + } + var infraEnv aiv1beta1.InfraEnv + if err := yaml.Unmarshal(infraEnvData, &infraEnv); err != nil { + fmt.Errorf("Error unmarshalling pull secret: %w", err) + } + return infraEnv +} + +// createInfraEnvParams body was copied from +// https://github.com/openshift/assisted-service/blob/5d4d836747862f43fa2ec882e5871648bd12c780/internal/controller/controllers/infraenv_controller.go#L339 +// TODO: Refactor infraenv_controller to have a CreateInfraEnvParams function that can be used in controller and here. +func CreateInfraEnvParams() *models.InfraEnvCreateParams { + infraEnv := getInfraEnv() + // TODO: Have single source for image version and cpu arch + releaseImageVersion := "4.10.0-rc.1" + releaseImageCPUArch := "x86_64" + pullSecret := GetPullSecret() + + createParams := &models.InfraEnvCreateParams{ + Name: &infraEnv.Name, + ImageType: "full-iso", + IgnitionConfigOverride: infraEnv.Spec.IgnitionConfigOverride, + PullSecret: &pullSecret, + SSHAuthorizedKey: &infraEnv.Spec.SSHAuthorizedKey, + CPUArchitecture: releaseImageCPUArch, + } + if infraEnv.Spec.Proxy != nil { + proxy := &models.Proxy{ + HTTPProxy: &infraEnv.Spec.Proxy.HTTPProxy, + HTTPSProxy: &infraEnv.Spec.Proxy.HTTPSProxy, + NoProxy: &infraEnv.Spec.Proxy.NoProxy, + } + createParams.Proxy = proxy + } + + if len(infraEnv.Spec.AdditionalNTPSources) > 0 { + createParams.AdditionalNtpSources = swag.String(strings.Join(infraEnv.Spec.AdditionalNTPSources[:], ",")) + } + + // cluster-id is set in shell script + var tempClusterID strfmt.UUID + tempClusterID = "replace-cluster-id" + createParams.ClusterID = &tempClusterID + createParams.OpenshiftVersion = &releaseImageVersion + + return createParams +} From 145224aba59b64d7a239c76af5a58d27a3c93a93 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Wed, 9 Mar 2022 14:45:58 -0800 Subject: [PATCH 021/274] AGENT-37 Remove extra back slash --- data/data/agent/files/usr/local/bin/common.sh.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/data/agent/files/usr/local/bin/common.sh.template b/data/data/agent/files/usr/local/bin/common.sh.template index 75dc8286c8..177b8097a1 100644 --- a/data/data/agent/files/usr/local/bin/common.sh.template +++ b/data/data/agent/files/usr/local/bin/common.sh.template @@ -18,7 +18,7 @@ get_host() { wait_for_assisted_service() { echo "Waiting for assisted-service to be ready" - until $(curl --output /dev/null --silent --fail {{.ServiceBaseURL}}//api/assisted-install/v2/infra-envs); do + until $(curl --output /dev/null --silent --fail {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs); do printf '.' sleep 5 done From a952109eebbb6940b243c4322c8d8f6bb2ebcf02 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Mon, 14 Mar 2022 14:50:36 -0700 Subject: [PATCH 022/274] NO-ISSUE Increase assisted-service start timeout Default timeout of 90s is not long enough on my network and laptop for assisted-service images to be pulled. Increasing timeout to 300s. --- data/data/agent/systemd/units/assisted-service.service | 1 + 1 file changed, 1 insertion(+) diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index b942edab72..f99be82610 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -6,6 +6,7 @@ ConditionPathExists=/etc/assisted-service/node0 [Service] Environment=PODMAN_SYSTEMD_UNIT=%n +TimeoutStartSec=300 ExecStart=/usr/local/bin/start-assisted-service.sh ExecStop=/bin/podman pod stop --ignore assisted-service -t 10 ExecStopPost=/bin/podman pod rm --ignore assisted-service From e083b23016476af65e16e21727477f2f717e5d81 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Mon, 14 Mar 2022 16:47:56 -0700 Subject: [PATCH 023/274] AGENT-37: change create-cluster-and-infra-env service type to oneshot --- .../agent/systemd/units/create-cluster-and-infra-env.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/data/agent/systemd/units/create-cluster-and-infra-env.service b/data/data/agent/systemd/units/create-cluster-and-infra-env.service index aa54b755f1..b8382af539 100644 --- a/data/data/agent/systemd/units/create-cluster-and-infra-env.service +++ b/data/data/agent/systemd/units/create-cluster-and-infra-env.service @@ -8,7 +8,7 @@ ConditionPathExists=/etc/assisted-service/node0 ExecStart=/usr/local/bin/create-cluster-and-infra-env.sh KillMode=none -Type=forking +Type=oneshot [Install] WantedBy=multi-user.target From 28bb6b3818dc5376f23d313e7451348416c59990 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Mon, 14 Mar 2022 16:49:01 -0700 Subject: [PATCH 024/274] AGENT-37 Remove unneeded replaces in go.mod --- go.mod | 6 ------ 1 file changed, 6 deletions(-) diff --git a/go.mod b/go.mod index b97ac96127..ffbc317925 100644 --- a/go.mod +++ b/go.mod @@ -17,12 +17,6 @@ require ( ) replace ( - github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.3.1 - github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20200715132148-0f91f62a41fe // Use OpenShift fork - github.com/openshift/hive/pkg/apis => github.com/carbonin/hive/pkg/apis v0.0.0-20210209195732-57e8c3ae12d1 - k8s.io/api => k8s.io/api v0.0.0-20190712022805-31fe033ae6f9 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190711222657-391ed67afa7b - k8s.io/client-go => k8s.io/client-go v0.0.0-20190620085101-78d2af792bab sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205 ) From 459664011c973b4d8ba6224f17919c9cfd068b86 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Mon, 14 Mar 2022 17:18:54 -0700 Subject: [PATCH 025/274] AGENT-37 Move manfiests from ./data/manifests to ./manifests The manifests are currently read and transformed into parameters. They aren't needed to be written into the ISO so move them out of the ./data directory. --- .../usr/local/bin/create-cluster-and-infra-env.sh.template | 3 ++- pkg/agent/manifests/clusterdeployment.go | 6 +++--- pkg/agent/manifests/infraenv.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template index 7f5eda39e7..67d96684be 100644 --- a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template +++ b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template @@ -15,9 +15,10 @@ echo "cluster create response: $CLUSTER_CREATE_OUT" CLUSTER_ID=$(echo $CLUSTER_CREATE_OUT | jq .id) # trim quotes from CLUSTER_ID CLUSTER_ID=${CLUSTER_ID//\"} +echo "CLUSTER_ID: $CLUSTER_ID" INFRA_ENV_PARAMS_JSON='{{.InfraEnvCreateParamsJSON}}' # replace "replace-cluster-id" with $CLUSTER_ID INFRA_ENV_PARAMS_JSON=${INFRA_ENV_PARAMS_JSON//"replace-cluster-id"/$CLUSTER_ID} -curl -X POST -H "Content-Type: application/json" -d $INFRA_ENV_PARAMS_JSON {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs +curl -X POST -H "Content-Type: application/json" -d "$INFRA_ENV_PARAMS_JSON" {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs diff --git a/pkg/agent/manifests/clusterdeployment.go b/pkg/agent/manifests/clusterdeployment.go index 13920789b7..290f3c2c02 100644 --- a/pkg/agent/manifests/clusterdeployment.go +++ b/pkg/agent/manifests/clusterdeployment.go @@ -14,7 +14,7 @@ import ( ) func GetPullSecret() string { - secretData, err := os.ReadFile("./data/manifests/pull-secret.yaml") + secretData, err := os.ReadFile("./manifests/pull-secret.yaml") if err != nil { fmt.Errorf("Error reading pull secret: %w", err) } @@ -27,7 +27,7 @@ func GetPullSecret() string { } func getClusterDeployment() hivev1.ClusterDeployment { - cdData, err := os.ReadFile("./data/manifests/cluster-deployment.yaml") + cdData, err := os.ReadFile("./manifests/cluster-deployment.yaml") if err != nil { fmt.Errorf("Error reading cluster deployment CR: %w", err) } @@ -39,7 +39,7 @@ func getClusterDeployment() hivev1.ClusterDeployment { } func getAgentClusterInstall() hiveext.AgentClusterInstall { - aciData, err := os.ReadFile("./data/manifests/agent-cluster-install.yaml") + aciData, err := os.ReadFile("./manifests/agent-cluster-install.yaml") if err != nil { fmt.Errorf("Error reading AgentClusterInstall CR: %w", err) } diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 1478b9da27..85dc6a75ed 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -13,7 +13,7 @@ import ( ) func getInfraEnv() aiv1beta1.InfraEnv { - infraEnvData, err := os.ReadFile("/data/manifests/infraenv.yaml") + infraEnvData, err := os.ReadFile("./manifests/infraenv.yaml") if err != nil { fmt.Errorf("Error reading pull secret: %w", err) } From e3007959af16986b3b2fb62784b566da171d2240 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Wed, 16 Mar 2022 15:38:22 -0700 Subject: [PATCH 026/274] AGENT-43 Apply suggestions from code review Co-authored-by: Antoni Segura Puimedon --- .../agent/files/usr/local/bin/start-agent.sh.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-agent.sh.template b/data/data/agent/files/usr/local/bin/start-agent.sh.template index 94898bd283..3581604f62 100644 --- a/data/data/agent/files/usr/local/bin/start-agent.sh.template +++ b/data/data/agent/files/usr/local/bin/start-agent.sh.template @@ -2,16 +2,16 @@ source common.sh -echo "Waiting for infra-env-id to be available" +>&2 echo "Waiting for infra-env-id to be available" INFRA_ENV_ID="" until [[ $INFRA_ENV_ID != "" && $INFRA_ENV_ID != "null" ]]; do sleep 5 - printf 'Querying assisted-service for infra-env-id...' - INFRA_ENV_ID=$(curl {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs | jq .[0].id) + >&2 echo "Querying assisted-service for infra-env-id..." + INFRA_ENV_ID=$(curl '{{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs' | jq .[0].id) done # trim quotes INFRA_ENV_ID=${INFRA_ENV_ID//\"} echo "Fetched infra-env-id and found: $INFRA_ENV_ID" # use infra-env-id to have agent register this host with assisted-service -/usr/local/bin/agent --url {{.ServiceBaseURL}} --infra-env-id $INFRA_ENV_ID --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true \ No newline at end of file +exec /usr/local/bin/agent --url '{{.ServiceBaseURL}}' --infra-env-id "$INFRA_ENV_ID" --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true \ No newline at end of file From bd19cc391f9b923ffd9fdba1e56d2e4074529bcc Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 21 Mar 2022 13:47:58 -0400 Subject: [PATCH 027/274] Use "jq -r" to avoid quotes in output --- .../usr/local/bin/create-cluster-and-infra-env.sh.template | 4 +--- data/data/agent/files/usr/local/bin/start-agent.sh.template | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template index 67d96684be..ef8bb973e6 100644 --- a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template +++ b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template @@ -12,9 +12,7 @@ wait_for_assisted_service CLUSTER_CREATE_OUT=$(curl -X POST -H "Content-Type: application/json" -d '{{.ClusterCreateParamsJSON}}' {{.ServiceBaseURL}}/api/assisted-install/v2/clusters) echo "cluster create response: $CLUSTER_CREATE_OUT" # pick cluster_id out from cluster create response -CLUSTER_ID=$(echo $CLUSTER_CREATE_OUT | jq .id) -# trim quotes from CLUSTER_ID -CLUSTER_ID=${CLUSTER_ID//\"} +CLUSTER_ID=$(echo $CLUSTER_CREATE_OUT | jq -r .id) echo "CLUSTER_ID: $CLUSTER_ID" INFRA_ENV_PARAMS_JSON='{{.InfraEnvCreateParamsJSON}}' diff --git a/data/data/agent/files/usr/local/bin/start-agent.sh.template b/data/data/agent/files/usr/local/bin/start-agent.sh.template index 3581604f62..e6d87737bf 100644 --- a/data/data/agent/files/usr/local/bin/start-agent.sh.template +++ b/data/data/agent/files/usr/local/bin/start-agent.sh.template @@ -7,11 +7,9 @@ INFRA_ENV_ID="" until [[ $INFRA_ENV_ID != "" && $INFRA_ENV_ID != "null" ]]; do sleep 5 >&2 echo "Querying assisted-service for infra-env-id..." - INFRA_ENV_ID=$(curl '{{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs' | jq .[0].id) + INFRA_ENV_ID=$(curl '{{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs' | jq -r .[0].id) done -# trim quotes -INFRA_ENV_ID=${INFRA_ENV_ID//\"} echo "Fetched infra-env-id and found: $INFRA_ENV_ID" # use infra-env-id to have agent register this host with assisted-service -exec /usr/local/bin/agent --url '{{.ServiceBaseURL}}' --infra-env-id "$INFRA_ENV_ID" --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true \ No newline at end of file +exec /usr/local/bin/agent --url '{{.ServiceBaseURL}}' --infra-env-id "$INFRA_ENV_ID" --agent-version quay.io/edge-infrastructure/assisted-installer-agent:latest --insecure=true From 662b8e2e1613e01f069dedbf37ce508f4e3b542e Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 21 Mar 2022 13:56:50 -0400 Subject: [PATCH 028/274] Don't log progress in curl commands --- .../usr/local/bin/create-cluster-and-infra-env.sh.template | 6 ++++-- data/data/agent/files/usr/local/bin/start-agent.sh.template | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template index ef8bb973e6..567c448624 100644 --- a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template +++ b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template @@ -9,7 +9,9 @@ source common.sh wait_for_assisted_service -CLUSTER_CREATE_OUT=$(curl -X POST -H "Content-Type: application/json" -d '{{.ClusterCreateParamsJSON}}' {{.ServiceBaseURL}}/api/assisted-install/v2/clusters) +set -e + +CLUSTER_CREATE_OUT=$(curl -s -S -X POST -H "Content-Type: application/json" -d '{{.ClusterCreateParamsJSON}}' {{.ServiceBaseURL}}/api/assisted-install/v2/clusters) echo "cluster create response: $CLUSTER_CREATE_OUT" # pick cluster_id out from cluster create response CLUSTER_ID=$(echo $CLUSTER_CREATE_OUT | jq -r .id) @@ -19,4 +21,4 @@ INFRA_ENV_PARAMS_JSON='{{.InfraEnvCreateParamsJSON}}' # replace "replace-cluster-id" with $CLUSTER_ID INFRA_ENV_PARAMS_JSON=${INFRA_ENV_PARAMS_JSON//"replace-cluster-id"/$CLUSTER_ID} -curl -X POST -H "Content-Type: application/json" -d "$INFRA_ENV_PARAMS_JSON" {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs +curl -s -S -X POST -H "Content-Type: application/json" -d "$INFRA_ENV_PARAMS_JSON" {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs diff --git a/data/data/agent/files/usr/local/bin/start-agent.sh.template b/data/data/agent/files/usr/local/bin/start-agent.sh.template index e6d87737bf..60d7a229e6 100644 --- a/data/data/agent/files/usr/local/bin/start-agent.sh.template +++ b/data/data/agent/files/usr/local/bin/start-agent.sh.template @@ -7,7 +7,7 @@ INFRA_ENV_ID="" until [[ $INFRA_ENV_ID != "" && $INFRA_ENV_ID != "null" ]]; do sleep 5 >&2 echo "Querying assisted-service for infra-env-id..." - INFRA_ENV_ID=$(curl '{{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs' | jq -r .[0].id) + INFRA_ENV_ID=$(curl -s -S '{{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs' | jq -r .[0].id) done echo "Fetched infra-env-id and found: $INFRA_ENV_ID" From 1e2244a7a37ffb5ee4c20676ed16926702057f3d Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 21 Mar 2022 15:04:18 -0400 Subject: [PATCH 029/274] Don't require SERVICE_BASE_URL to be set We already pass the IP address through the command line, so there is no need to get the URL from an environment variable. The README gave the wrong port number, so it was also confusing. Ensure it works with IPv6 addresses also. --- pkg/agent/imagebuilder/content.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index c869b987c7..11bcf0fb45 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "net" "os" "path" "strings" @@ -29,10 +30,12 @@ type ConfigBuilder struct { func New(nodeZeroIP string) *ConfigBuilder { pullSecret := manifests.GetPullSecret() - // TODO: try setting SERVICE_BASE_URL within agent.service - serviceBaseURL := getEnv("SERVICE_BASE_URL", "http://"+nodeZeroIP+":8090") // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") + + serviceBaseURL := fmt.Sprintf("http://%s/", + net.JoinHostPort(nodeZeroIP, "8090")) + clusterParams := manifests.CreateClusterParams() clusterJSON, err := json.Marshal(clusterParams) if err != nil { From f4fb0fbb57048780d81d5a05d66682a8e51d69c7 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Wed, 23 Mar 2022 01:38:07 -0400 Subject: [PATCH 030/274] AGENT-38: Automate cluster installation A new systemd service "start-cluster-installation.service" runs after a cluster is created by "create-cluster-and-infra-env.service". The "start-cluster-installation.service" checks if all the hosts in a cluster are known and ready. Also, sets the API VIP and once the cluster status is ready, it starts cluster installation using rest api. --- .../start-cluster-installation.sh.template | 54 +++++++++++++++++++ .../units/start-cluster-installation.service | 15 ++++++ pkg/agent/build_image.go | 5 +- pkg/agent/imagebuilder/content.go | 5 +- pkg/agent/imagebuilder/embed_ignition.go | 4 +- 5 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template create mode 100644 data/data/agent/systemd/units/start-cluster-installation.service diff --git a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template new file mode 100644 index 0000000000..ea54abe133 --- /dev/null +++ b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template @@ -0,0 +1,54 @@ +#!/bin/bash +set -e + +source common.sh + +wait_for_assisted_service + +BASE_URL="http://{{.NodeZeroIP}}:8090/api/assisted-install/v2" + +# Get cluster id +cluster_id=$(curl -s -S ${BASE_URL}/clusters | jq -r .[].id) +# Get infra_env_id +infra_env_id=$(curl -s -S ${BASE_URL}/infra-envs| jq -r .[].id) + +known_hosts=0 + +while [[ "$cluster_status" != "ready" && "${known_hosts}" != "${host_count}" ]] +do + cluster_status=$(curl -s -S ${BASE_URL}/clusters | jq -r .[].status) + host_status=$(curl -s -S ${BASE_URL}/infra-envs/${infra_env_id}/hosts | jq -r .[].status) + if [[ -n ${host_status} ]]; then + host_count=$(curl -s -S ${BASE_URL}/infra-envs/${infra_env_id}/hosts | jq length) + echo Total hosts: ${host_count} + for status in ${host_status}; do + echo "Host status is $status" + if [[ "${status}" == "known" ]]; then + ((known_hosts+=1)) + echo "Hosts known and ready for cluster installation (${known_hosts}/${host_count})" + if [[ "${known_hosts}" == "${host_count}" ]]; then + break + fi + else + echo "Waiting for hosts to become ready for cluster installation..." + sleep 10 + fi + done + fi +done +echo "All ${host_count} hosts are ready." + +while [[ "$cluster_status" != "ready" ]] +do + echo "Setting api vip" + curl -s -S -X PATCH ${BASE_URL}/clusters/${cluster_id} -H "Content-Type: application/json" -d '{"api_vip": "{{.APIVIP}}"}' + cluster_status=$(curl -s -S ${BASE_URL}/clusters | jq -r .[].status) + echo "Cluster status: ${cluster_status}" + if [[ "$cluster_status" == "ready" ]]; then + echo "Starting cluster installation..." + curl -s -S -X POST ${BASE_URL}/clusters/${cluster_id}/actions/install \ + -H 'accept: application/json' \ + -d '' + echo "Cluster installation started" + fi +done diff --git a/data/data/agent/systemd/units/start-cluster-installation.service b/data/data/agent/systemd/units/start-cluster-installation.service new file mode 100644 index 0000000000..f34fbedf4b --- /dev/null +++ b/data/data/agent/systemd/units/start-cluster-installation.service @@ -0,0 +1,15 @@ +[Unit] +Description=Service that starts cluster installation +Wants=network-online.target create-cluster-and-infra-env.service +After=network-online.target create-cluster-and-infra-env.service +ConditionPathExists=/etc/assisted-service/node0 + +[Service] +ExecStart=/usr/local/bin/start-cluster-installation.sh + +KillMode=none +Type=oneshot + + +[Install] +WantedBy=multi-user.target diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go index 4365463dd3..58d826dfc6 100644 --- a/pkg/agent/build_image.go +++ b/pkg/agent/build_image.go @@ -10,9 +10,10 @@ import ( func BuildImage() error { nodeZeroIP := flag.String("node-zero-ip", "", "IP of the node to run OpenShift Assisted Installation Service on. (Required)") + apiVip := flag.String("apivip", "", "API Virtual IP. (Required)") flag.Parse() - if *nodeZeroIP == "" { + if *nodeZeroIP == "" || *apiVip == "" { flag.PrintDefaults() os.Exit(1) } @@ -22,7 +23,7 @@ func BuildImage() error { return err } - err = imagebuilder.BuildImage(baseImage, *nodeZeroIP) + err = imagebuilder.BuildImage(baseImage, *nodeZeroIP, *apiVip) if err != nil { return err } diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 11bcf0fb45..71a73cb320 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -26,9 +26,10 @@ type ConfigBuilder struct { nodeZeroIP string createClusterParamsJSON string createInfraEnvParamsJSON string + apiVip string } -func New(nodeZeroIP string) *ConfigBuilder { +func New(nodeZeroIP string, apiVip string) *ConfigBuilder { pullSecret := manifests.GetPullSecret() // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") @@ -54,6 +55,7 @@ func New(nodeZeroIP string) *ConfigBuilder { nodeZeroIP: nodeZeroIP, createClusterParamsJSON: string(clusterJSON), createInfraEnvParamsJSON: string(infraEnvJSON), + apiVip: apiVip, } } @@ -217,6 +219,7 @@ func (c ConfigBuilder) templateString(name string, text string) (string, error) "NodeZeroIP": c.nodeZeroIP, "ClusterCreateParamsJSON": c.createClusterParamsJSON, "InfraEnvCreateParamsJSON": c.createInfraEnvParamsJSON, + "APIVIP": c.apiVip, } tmpl, err := template.New(name).Parse(string(text)) diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index 5567d460d2..b6a7ec16bb 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -13,8 +13,8 @@ const ( // BuildImage builds an ISO with ignition content from a base image, and writes // the result to disk. -func BuildImage(baseImage string, nodeZeroIP string) error { - configBuilder := New(nodeZeroIP) +func BuildImage(baseImage string, nodeZeroIP string, apiVip string) error { + configBuilder := New(nodeZeroIP, apiVip) ignition, err := configBuilder.Ignition() if err != nil { return err From ed7acfe56afb0b916b574c0dcd1af80a3257432d Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Wed, 23 Mar 2022 17:06:58 -0400 Subject: [PATCH 031/274] Read api_vip from manifests --- pkg/agent/build_image.go | 5 ++--- pkg/agent/imagebuilder/content.go | 8 ++++++-- pkg/agent/imagebuilder/embed_ignition.go | 4 ++-- pkg/agent/manifests/clusterdeployment.go | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go index 58d826dfc6..4365463dd3 100644 --- a/pkg/agent/build_image.go +++ b/pkg/agent/build_image.go @@ -10,10 +10,9 @@ import ( func BuildImage() error { nodeZeroIP := flag.String("node-zero-ip", "", "IP of the node to run OpenShift Assisted Installation Service on. (Required)") - apiVip := flag.String("apivip", "", "API Virtual IP. (Required)") flag.Parse() - if *nodeZeroIP == "" || *apiVip == "" { + if *nodeZeroIP == "" { flag.PrintDefaults() os.Exit(1) } @@ -23,7 +22,7 @@ func BuildImage() error { return err } - err = imagebuilder.BuildImage(baseImage, *nodeZeroIP, *apiVip) + err = imagebuilder.BuildImage(baseImage, *nodeZeroIP) if err != nil { return err } diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 71a73cb320..00ec703548 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -29,7 +29,7 @@ type ConfigBuilder struct { apiVip string } -func New(nodeZeroIP string, apiVip string) *ConfigBuilder { +func New(nodeZeroIP string) *ConfigBuilder { pullSecret := manifests.GetPullSecret() // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") @@ -48,6 +48,10 @@ func New(nodeZeroIP string, apiVip string) *ConfigBuilder { if err != nil { fmt.Errorf("Error marshal infra env params into json: %w", err) } + + aci := manifests.GetAgentClusterInstall() + clusterInstall := &aci + return &ConfigBuilder{ pullSecret: pullSecret, serviceBaseURL: serviceBaseURL, @@ -55,7 +59,7 @@ func New(nodeZeroIP string, apiVip string) *ConfigBuilder { nodeZeroIP: nodeZeroIP, createClusterParamsJSON: string(clusterJSON), createInfraEnvParamsJSON: string(infraEnvJSON), - apiVip: apiVip, + apiVip: clusterInstall.Spec.APIVIP, } } diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index b6a7ec16bb..5567d460d2 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -13,8 +13,8 @@ const ( // BuildImage builds an ISO with ignition content from a base image, and writes // the result to disk. -func BuildImage(baseImage string, nodeZeroIP string, apiVip string) error { - configBuilder := New(nodeZeroIP, apiVip) +func BuildImage(baseImage string, nodeZeroIP string) error { + configBuilder := New(nodeZeroIP) ignition, err := configBuilder.Ignition() if err != nil { return err diff --git a/pkg/agent/manifests/clusterdeployment.go b/pkg/agent/manifests/clusterdeployment.go index 290f3c2c02..b6023ae399 100644 --- a/pkg/agent/manifests/clusterdeployment.go +++ b/pkg/agent/manifests/clusterdeployment.go @@ -38,7 +38,7 @@ func getClusterDeployment() hivev1.ClusterDeployment { return cd } -func getAgentClusterInstall() hiveext.AgentClusterInstall { +func GetAgentClusterInstall() hiveext.AgentClusterInstall { aciData, err := os.ReadFile("./manifests/agent-cluster-install.yaml") if err != nil { fmt.Errorf("Error reading AgentClusterInstall CR: %w", err) @@ -56,7 +56,7 @@ func getAgentClusterInstall() hiveext.AgentClusterInstall { // After the refactoring most of the code below goes away, especially the helper functions that are being carried over here. func CreateClusterParams() *models.ClusterCreateParams { cd := getClusterDeployment() - aci := getAgentClusterInstall() + aci := GetAgentClusterInstall() clusterInstall := &aci // TODO: Have single source for image version and cpu arch releaseImageVersion := "4.10.0-rc.1" From c112925de943ca0c64c6cb5ac0e6d9bbe50a2ee1 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Thu, 24 Mar 2022 10:47:13 -0400 Subject: [PATCH 032/274] shellcheck fixes --- .../start-cluster-installation.sh.template | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template index ea54abe133..92efc193d2 100644 --- a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template +++ b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template @@ -8,21 +8,21 @@ wait_for_assisted_service BASE_URL="http://{{.NodeZeroIP}}:8090/api/assisted-install/v2" # Get cluster id -cluster_id=$(curl -s -S ${BASE_URL}/clusters | jq -r .[].id) +cluster_id=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].id) # Get infra_env_id -infra_env_id=$(curl -s -S ${BASE_URL}/infra-envs| jq -r .[].id) +infra_env_id=$(curl -s -S "${BASE_URL}/infra-envs"| jq -r .[].id) known_hosts=0 -while [[ "$cluster_status" != "ready" && "${known_hosts}" != "${host_count}" ]] +while [[ "${cluster_status}" != "ready" && "${known_hosts}" != "${host_count}" ]] do - cluster_status=$(curl -s -S ${BASE_URL}/clusters | jq -r .[].status) - host_status=$(curl -s -S ${BASE_URL}/infra-envs/${infra_env_id}/hosts | jq -r .[].status) + cluster_status=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].status) + host_status=$(curl -s -S "${BASE_URL}/infra-envs/${infra_env_id}/hosts" | jq -r .[].status) if [[ -n ${host_status} ]]; then - host_count=$(curl -s -S ${BASE_URL}/infra-envs/${infra_env_id}/hosts | jq length) - echo Total hosts: ${host_count} + host_count=$(curl -s -S "${BASE_URL}/infra-envs/${infra_env_id}/hosts" | jq length) + echo "Total hosts: ${host_count}" for status in ${host_status}; do - echo "Host status is $status" + echo "Host status is ${status}" if [[ "${status}" == "known" ]]; then ((known_hosts+=1)) echo "Hosts known and ready for cluster installation (${known_hosts}/${host_count})" @@ -38,15 +38,15 @@ do done echo "All ${host_count} hosts are ready." -while [[ "$cluster_status" != "ready" ]] +while [[ "${cluster_status}" != "ready" ]] do echo "Setting api vip" - curl -s -S -X PATCH ${BASE_URL}/clusters/${cluster_id} -H "Content-Type: application/json" -d '{"api_vip": "{{.APIVIP}}"}' - cluster_status=$(curl -s -S ${BASE_URL}/clusters | jq -r .[].status) + curl -s -S -X PATCH "${BASE_URL}/clusters/${cluster_id}" -H "Content-Type: application/json" -d '{"api_vip": "{{.APIVIP}}"}' + cluster_status=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].status) echo "Cluster status: ${cluster_status}" - if [[ "$cluster_status" == "ready" ]]; then + if [[ "${cluster_status}" == "ready" ]]; then echo "Starting cluster installation..." - curl -s -S -X POST ${BASE_URL}/clusters/${cluster_id}/actions/install \ + curl -s -S -X POST "${BASE_URL}/clusters/${cluster_id}/actions/install" \ -H 'accept: application/json' \ -d '' echo "Cluster installation started" From 7483afa9e16460ad399303fb0ac8e593a59ba26a Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 24 Mar 2022 15:13:03 -0400 Subject: [PATCH 033/274] Get rid of start-assisted-service script This script has not been adding anything useful since we started templating the configmap to insert the host IP directly in 866bee76a275a0394b0ad921682dcaaa3391de92. --- .../usr/local/bin/start-assisted-service.sh | 23 ------------------- .../systemd/units/assisted-service.service | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100755 data/data/agent/files/usr/local/bin/start-assisted-service.sh diff --git a/data/data/agent/files/usr/local/bin/start-assisted-service.sh b/data/data/agent/files/usr/local/bin/start-assisted-service.sh deleted file mode 100755 index 3dae7cd1e2..0000000000 --- a/data/data/agent/files/usr/local/bin/start-assisted-service.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -get_host() { - local default_gateway - local host_ip - - default_gateway=$(ip -j route show default | jq -r '.[0].gateway') - host_ip=$(ip -j route get "${default_gateway}" | jq -r '.[0].prefsrc') - - local host_fmt="%s" - if [[ ${host_ip} =~ : ]]; then - host_fmt="[%s]" - fi - - # shellcheck disable=SC2059 - printf "${host_fmt}" "${host_ip}" -} - - -HOST=$(get_host) -echo Using hostname "${HOST}" 1>&2 - -podman play kube --configmap <(sed -e "/SERVICE_BASE_URL/ s/127\.0\.0\.1/${HOST}/" /usr/local/share/assisted-service/configmap.yml) /usr/local/share/assisted-service/pod.yml diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index f99be82610..3ff2643cfc 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -7,7 +7,7 @@ ConditionPathExists=/etc/assisted-service/node0 [Service] Environment=PODMAN_SYSTEMD_UNIT=%n TimeoutStartSec=300 -ExecStart=/usr/local/bin/start-assisted-service.sh +ExecStart=/bin/podman play kube --configmap /usr/local/share/assisted-service/configmap.yml /usr/local/share/assisted-service/pod.yml ExecStop=/bin/podman pod stop --ignore assisted-service -t 10 ExecStopPost=/bin/podman pod rm --ignore assisted-service From 7a1e8441edb9984b408cb0e5d70ad424b6391e3f Mon Sep 17 00:00:00 2001 From: Bob Fournier Date: Mon, 28 Mar 2022 07:52:59 -0400 Subject: [PATCH 034/274] Exit on manifest file errors Use common function to read and unmarshal files. Exit if errors detected. --- pkg/agent/manifests/clusterdeployment.go | 31 +++++++++--------------- pkg/agent/manifests/infraenv.go | 11 +++------ pkg/agent/manifests/manifests.go | 24 ++++++++++++++++++ 3 files changed, 40 insertions(+), 26 deletions(-) create mode 100644 pkg/agent/manifests/manifests.go diff --git a/pkg/agent/manifests/clusterdeployment.go b/pkg/agent/manifests/clusterdeployment.go index 290f3c2c02..41e1344944 100644 --- a/pkg/agent/manifests/clusterdeployment.go +++ b/pkg/agent/manifests/clusterdeployment.go @@ -10,43 +10,36 @@ import ( hivev1 "github.com/openshift/hive/apis/hive/v1" "github.com/thoas/go-funk" corev1 "k8s.io/api/core/v1" - "sigs.k8s.io/yaml" ) func GetPullSecret() string { - secretData, err := os.ReadFile("./manifests/pull-secret.yaml") - if err != nil { - fmt.Errorf("Error reading pull secret: %w", err) - } var secret corev1.Secret - if err := yaml.Unmarshal(secretData, &secret); err != nil { - fmt.Errorf("Error unmarshalling pull secret: %w", err) + if err := GetFileData("pull-secret.yaml", &secret); err != nil { + fmt.Println(err.Error()) + os.Exit(1) } + pullSecret := secret.StringData[".dockerconfigjson"] return pullSecret } func getClusterDeployment() hivev1.ClusterDeployment { - cdData, err := os.ReadFile("./manifests/cluster-deployment.yaml") - if err != nil { - fmt.Errorf("Error reading cluster deployment CR: %w", err) - } var cd hivev1.ClusterDeployment - if err := yaml.Unmarshal(cdData, &cd); err != nil { - fmt.Errorf("Error unmarshalling cluster deployment CR: %w", err) + if err := GetFileData("cluster-deployment.yaml", &cd); err != nil { + fmt.Println(err.Error()) + os.Exit(1) } + return cd } func getAgentClusterInstall() hiveext.AgentClusterInstall { - aciData, err := os.ReadFile("./manifests/agent-cluster-install.yaml") - if err != nil { - fmt.Errorf("Error reading AgentClusterInstall CR: %w", err) - } var aci hiveext.AgentClusterInstall - if err := yaml.Unmarshal(aciData, &aci); err != nil { - fmt.Errorf("Error unmarshalling AgentClusterInstall CR: %w", err) + if err := GetFileData("agent-cluster-install.yaml", &aci); err != nil { + fmt.Println(err.Error()) + os.Exit(1) } + return aci } diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 85dc6a75ed..5da837bd3c 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -9,18 +9,15 @@ import ( "github.com/go-openapi/swag" aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" "github.com/openshift/assisted-service/models" - "sigs.k8s.io/yaml" ) func getInfraEnv() aiv1beta1.InfraEnv { - infraEnvData, err := os.ReadFile("./manifests/infraenv.yaml") - if err != nil { - fmt.Errorf("Error reading pull secret: %w", err) - } var infraEnv aiv1beta1.InfraEnv - if err := yaml.Unmarshal(infraEnvData, &infraEnv); err != nil { - fmt.Errorf("Error unmarshalling pull secret: %w", err) + if err := GetFileData("infraenv.yaml", &infraEnv); err != nil { + fmt.Println(err.Error()) + os.Exit(1) } + return infraEnv } diff --git a/pkg/agent/manifests/manifests.go b/pkg/agent/manifests/manifests.go new file mode 100644 index 0000000000..c2951cf2c2 --- /dev/null +++ b/pkg/agent/manifests/manifests.go @@ -0,0 +1,24 @@ +package manifests + +import ( + "fmt" + "os" + "path/filepath" + + "sigs.k8s.io/yaml" +) + +// Read a Yaml file and unmarshal the contents +func GetFileData(fileName string, output interface{}) error { + + path := filepath.Join("./manifests", fileName) + + contents, err := os.ReadFile(path) + if err != nil { + err = fmt.Errorf("Error reading file %s: %w", path, err) + } else if err = yaml.Unmarshal(contents, output); err != nil { + err = fmt.Errorf("Error unmarshalling contents of %s: %w", path, err) + } + + return err +} From e2dcdd9ada71de7179a4e888dec29d2d9214b920 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 23 Mar 2022 16:13:53 -0400 Subject: [PATCH 035/274] Break assisted-service pod into separate systemd services Using "podman kube play" doesn't play that well with systemd, so split the config up and run each container and the pod as a separate systemd service. --- .../assisted-service/configmap.yml.template | 30 -------------- .../assisted-service/environment.template | 25 ++++++++++++ .../usr/local/share/assisted-service/pod.yml | 40 ------------------- .../units/assisted-image-service.service | 21 ++++++++++ .../systemd/units/assisted-service-db.service | 20 ++++++++++ .../units/assisted-service-pod.service | 23 +++++++++++ .../systemd/units/assisted-service-ui.service | 21 ++++++++++ .../systemd/units/assisted-service.service | 24 ++++++----- 8 files changed, 123 insertions(+), 81 deletions(-) delete mode 100644 data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template create mode 100644 data/data/agent/files/usr/local/share/assisted-service/environment.template delete mode 100644 data/data/agent/files/usr/local/share/assisted-service/pod.yml create mode 100644 data/data/agent/systemd/units/assisted-image-service.service create mode 100644 data/data/agent/systemd/units/assisted-service-db.service create mode 100644 data/data/agent/systemd/units/assisted-service-pod.service create mode 100644 data/data/agent/systemd/units/assisted-service-ui.service diff --git a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template b/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template deleted file mode 100644 index 37bfeef85b..0000000000 --- a/data/data/agent/files/usr/local/share/assisted-service/configmap.yml.template +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: config -data: - ASSISTED_SERVICE_HOST: {{.NodeZeroIP}}:8090 - ASSISTED_SERVICE_SCHEME: http - AUTH_TYPE: none - DB_HOST: 127.0.0.1 - DB_NAME: installer - DB_PASS: admin - DB_PORT: "5432" - DB_USER: admin - DEPLOY_TARGET: onprem - DISK_ENCRYPTION_SUPPORT: "true" - DUMMY_IGNITION: "false" - ENABLE_SINGLE_NODE_DNSMASQ: "true" - HW_VALIDATOR_REQUIREMENTS: '[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10}}]' - IMAGE_SERVICE_BASE_URL: http://{{.NodeZeroIP}}:8888 - IPV6_SUPPORT: "true" - LISTEN_PORT: "8888" - NTP_DEFAULT_SERVER: "" - OS_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}]' - POSTGRESQL_DATABASE: installer - POSTGRESQL_PASSWORD: admin - POSTGRESQL_USER: admin - PUBLIC_CONTAINER_REGISTRIES: 'quay.io' - RELEASE_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}]' - SERVICE_BASE_URL: http://{{.NodeZeroIP}}:8090 - STORAGE: filesystem diff --git a/data/data/agent/files/usr/local/share/assisted-service/environment.template b/data/data/agent/files/usr/local/share/assisted-service/environment.template new file mode 100644 index 0000000000..5023a2cc38 --- /dev/null +++ b/data/data/agent/files/usr/local/share/assisted-service/environment.template @@ -0,0 +1,25 @@ +ASSISTED_SERVICE_HOST={{.NodeZeroIP}}:8090 +ASSISTED_SERVICE_SCHEME=http +AUTH_TYPE=none +DB_HOST=127.0.0.1 +DB_NAME=installer +DB_PASS=admin +DB_PORT=5432 +DB_USER=admin +DEPLOY_TARGET=onprem +DISK_ENCRYPTION_SUPPORT=true +DUMMY_IGNITION=false +ENABLE_SINGLE_NODE_DNSMASQ=true +HW_VALIDATOR_REQUIREMENTS=[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10}}] +IMAGE_SERVICE_BASE_URL=http://{{.NodeZeroIP}}:8888 +IPV6_SUPPORT=true +LISTEN_PORT=8888 +NTP_DEFAULT_SERVER= +OS_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}] +POSTGRESQL_DATABASE=installer +POSTGRESQL_PASSWORD=admin +POSTGRESQL_USER=admin +PUBLIC_CONTAINER_REGISTRIES=quay.io +RELEASE_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}] +SERVICE_BASE_URL=http://{{.NodeZeroIP}}:8090 +STORAGE=filesystem diff --git a/data/data/agent/files/usr/local/share/assisted-service/pod.yml b/data/data/agent/files/usr/local/share/assisted-service/pod.yml deleted file mode 100644 index f7122d754b..0000000000 --- a/data/data/agent/files/usr/local/share/assisted-service/pod.yml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - labels: - app: assisted-service - name: assisted-service -spec: - containers: - - args: - - su - - -c - - run-postgresql - - postgres - image: quay.io/centos7/postgresql-12-centos7:latest - name: db - envFrom: - - configMapRef: - name: config - - image: quay.io/edge-infrastructure/assisted-installer-ui:latest - name: ui - ports: - - hostPort: 8080 - envFrom: - - configMapRef: - name: config - - image: quay.io/edge-infrastructure/assisted-image-service:latest - name: image-service - ports: - - hostPort: 8888 - envFrom: - - configMapRef: - name: config - - image: quay.io/edge-infrastructure/assisted-service:latest - name: service - ports: - - hostPort: 8090 - envFrom: - - configMapRef: - name: config - restartPolicy: Never diff --git a/data/data/agent/systemd/units/assisted-image-service.service b/data/data/agent/systemd/units/assisted-image-service.service new file mode 100644 index 0000000000..f100033ac1 --- /dev/null +++ b/data/data/agent/systemd/units/assisted-image-service.service @@ -0,0 +1,21 @@ +[Unit] +Description=Assisted Image Service +Wants=network.target +RequiresMountsFor=%t/containers +Requires=assisted-service.service +BindsTo=assisted-service-pod.service +After=network-online.target assisted-service-pod.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=300 +ExecStartPre=/bin/rm -f %t/%n.ctr-id +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=image-service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-image-service:latest +ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id +Type=notify +NotifyAccess=all + +[Install] +WantedBy=multi-user.target diff --git a/data/data/agent/systemd/units/assisted-service-db.service b/data/data/agent/systemd/units/assisted-service-db.service new file mode 100644 index 0000000000..6f8775089f --- /dev/null +++ b/data/data/agent/systemd/units/assisted-service-db.service @@ -0,0 +1,20 @@ +[Unit] +Description=Assisted Service database +Wants=network.target +RequiresMountsFor=%t/containers +BindsTo=assisted-service-pod.service +After=network-online.target assisted-service-pod.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=300 +ExecStartPre=/bin/rm -f %t/%n.ctr-id +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=db --env-file=/usr/local/share/assisted-service/environment quay.io/centos7/postgresql-12-centos7:latest +ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id +Type=notify +NotifyAccess=all + +[Install] +WantedBy=multi-user.target diff --git a/data/data/agent/systemd/units/assisted-service-pod.service b/data/data/agent/systemd/units/assisted-service-pod.service new file mode 100644 index 0000000000..17598d3d98 --- /dev/null +++ b/data/data/agent/systemd/units/assisted-service-pod.service @@ -0,0 +1,23 @@ +[Unit] +Description=Assisted Service pod +Wants=network.target node-zero.service +After=network-online.target node-zero.service +ConditionPathExists=/etc/assisted-service/node0 +RequiresMountsFor= +Requires=assisted-service-db.service assisted-image-service.service assisted-service.service assisted-service-ui.service +Before=assisted-service-db.service assisted-image-service.service assisted-service.service assisted-service-ui.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=70 +ExecStartPre=/bin/rm -f %t/%n.pid %t/%N.pod-id +ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/%n.pid --pod-id-file %t/%N.pod-id -n assisted-service --publish=8090:8090 --publish=8080:8080 --publish=8888:8888 +ExecStart=/usr/bin/podman pod start --pod-id-file=%t/%N.pod-id +ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file=%t/%N.pod-id -t 10 +ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file=%t/%N.pod-id +PIDFile=%t/%n.pid +Type=forking + +[Install] +WantedBy=multi-user.target diff --git a/data/data/agent/systemd/units/assisted-service-ui.service b/data/data/agent/systemd/units/assisted-service-ui.service new file mode 100644 index 0000000000..532bbeec2f --- /dev/null +++ b/data/data/agent/systemd/units/assisted-service-ui.service @@ -0,0 +1,21 @@ +[Unit] +Description=Assisted Service UI container +Wants=network.target +RequiresMountsFor=%t/containers +Requires=assisted-service.service +BindsTo=assisted-service-pod.service +After=network-online.target assisted-service-pod.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=300 +ExecStartPre=/bin/rm -f %t/%n.ctr-id +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=ui --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-installer-ui:latest +ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id +Type=notify +NotifyAccess=all + +[Install] +WantedBy=multi-user.target diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index 3ff2643cfc..e309cf37f8 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -1,19 +1,21 @@ [Unit] -Description=OpenShift Assisted Installation Service -Wants=network-online.target node-zero.service -After=network-online.target node-zero.service -ConditionPathExists=/etc/assisted-service/node0 +Description=Assisted Service container +Wants=network.target +RequiresMountsFor=%t/containers +Requires=assisted-service-db.service +BindsTo=assisted-service-pod.service +After=network-online.target assisted-service-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -TimeoutStartSec=300 -ExecStart=/bin/podman play kube --configmap /usr/local/share/assisted-service/configmap.yml /usr/local/share/assisted-service/pod.yml -ExecStop=/bin/podman pod stop --ignore assisted-service -t 10 -ExecStopPost=/bin/podman pod rm --ignore assisted-service - Restart=on-failure -KillMode=none -Type=forking +TimeoutStopSec=300 +ExecStartPre=/bin/rm -f %t/%n.ctr-id +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-service:latest +ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id +Type=notify +NotifyAccess=all [Install] WantedBy=multi-user.target From 08355a4f9fe69cc2ccb3adf18a3c258d15930a85 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 28 Mar 2022 11:38:06 -0400 Subject: [PATCH 036/274] Rename containers to mention assisted The `podman ps` command just lists container names, not the pod they belong to, so for clarity use less-generic names. --- data/data/agent/systemd/units/assisted-service-db.service | 2 +- data/data/agent/systemd/units/assisted-service-ui.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/data/agent/systemd/units/assisted-service-db.service b/data/data/agent/systemd/units/assisted-service-db.service index 6f8775089f..b6518b8b51 100644 --- a/data/data/agent/systemd/units/assisted-service-db.service +++ b/data/data/agent/systemd/units/assisted-service-db.service @@ -10,7 +10,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=db --env-file=/usr/local/share/assisted-service/environment quay.io/centos7/postgresql-12-centos7:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-db --env-file=/usr/local/share/assisted-service/environment quay.io/centos7/postgresql-12-centos7:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service-ui.service b/data/data/agent/systemd/units/assisted-service-ui.service index 532bbeec2f..1c3ce79efe 100644 --- a/data/data/agent/systemd/units/assisted-service-ui.service +++ b/data/data/agent/systemd/units/assisted-service-ui.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=ui --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-installer-ui:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-ui --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-installer-ui:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify From 8e692585c84046d938cf362a539880d515fbc67c Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 24 Mar 2022 13:49:30 -0400 Subject: [PATCH 037/274] Send assisted service logs to the journal --- data/data/agent/systemd/units/assisted-image-service.service | 2 +- data/data/agent/systemd/units/assisted-service-db.service | 2 +- data/data/agent/systemd/units/assisted-service-ui.service | 2 +- data/data/agent/systemd/units/assisted-service.service | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data/agent/systemd/units/assisted-image-service.service b/data/data/agent/systemd/units/assisted-image-service.service index f100033ac1..8804b8eab3 100644 --- a/data/data/agent/systemd/units/assisted-image-service.service +++ b/data/data/agent/systemd/units/assisted-image-service.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=image-service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-image-service:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=image-service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-image-service:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service-db.service b/data/data/agent/systemd/units/assisted-service-db.service index b6518b8b51..62ecbe0f19 100644 --- a/data/data/agent/systemd/units/assisted-service-db.service +++ b/data/data/agent/systemd/units/assisted-service-db.service @@ -10,7 +10,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-db --env-file=/usr/local/share/assisted-service/environment quay.io/centos7/postgresql-12-centos7:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-db --env-file=/usr/local/share/assisted-service/environment quay.io/centos7/postgresql-12-centos7:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service-ui.service b/data/data/agent/systemd/units/assisted-service-ui.service index 1c3ce79efe..7d68891917 100644 --- a/data/data/agent/systemd/units/assisted-service-ui.service +++ b/data/data/agent/systemd/units/assisted-service-ui.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-ui --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-installer-ui:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-ui --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-installer-ui:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index e309cf37f8..42b65aaf8f 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-service:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-service:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify From 755d3801d5320a57bd3eef096e213c081c9d275f Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 24 Mar 2022 17:00:34 -0400 Subject: [PATCH 038/274] Split up environment file Create a separate environment file for each service that needs it. --- .../files/usr/local/share/assisted-service/assisted-db.env | 3 +++ ...{environment.template => assisted-service.env.template} | 7 ------- .../usr/local/share/assisted-service/images.env.template | 3 +++ .../agent/systemd/units/assisted-image-service.service | 2 +- data/data/agent/systemd/units/assisted-service-db.service | 2 +- data/data/agent/systemd/units/assisted-service-ui.service | 2 +- data/data/agent/systemd/units/assisted-service.service | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 data/data/agent/files/usr/local/share/assisted-service/assisted-db.env rename data/data/agent/files/usr/local/share/assisted-service/{environment.template => assisted-service.env.template} (64%) create mode 100644 data/data/agent/files/usr/local/share/assisted-service/images.env.template diff --git a/data/data/agent/files/usr/local/share/assisted-service/assisted-db.env b/data/data/agent/files/usr/local/share/assisted-service/assisted-db.env new file mode 100644 index 0000000000..521e8cc702 --- /dev/null +++ b/data/data/agent/files/usr/local/share/assisted-service/assisted-db.env @@ -0,0 +1,3 @@ +POSTGRESQL_DATABASE=installer +POSTGRESQL_PASSWORD=admin +POSTGRESQL_USER=admin diff --git a/data/data/agent/files/usr/local/share/assisted-service/environment.template b/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template similarity index 64% rename from data/data/agent/files/usr/local/share/assisted-service/environment.template rename to data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template index 5023a2cc38..57d925dc79 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/environment.template +++ b/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template @@ -1,5 +1,3 @@ -ASSISTED_SERVICE_HOST={{.NodeZeroIP}}:8090 -ASSISTED_SERVICE_SCHEME=http AUTH_TYPE=none DB_HOST=127.0.0.1 DB_NAME=installer @@ -13,12 +11,7 @@ ENABLE_SINGLE_NODE_DNSMASQ=true HW_VALIDATOR_REQUIREMENTS=[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":120,"installation_disk_speed_threshold_ms":10}}] IMAGE_SERVICE_BASE_URL=http://{{.NodeZeroIP}}:8888 IPV6_SUPPORT=true -LISTEN_PORT=8888 NTP_DEFAULT_SERVER= -OS_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}] -POSTGRESQL_DATABASE=installer -POSTGRESQL_PASSWORD=admin -POSTGRESQL_USER=admin PUBLIC_CONTAINER_REGISTRIES=quay.io RELEASE_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}] SERVICE_BASE_URL=http://{{.NodeZeroIP}}:8090 diff --git a/data/data/agent/files/usr/local/share/assisted-service/images.env.template b/data/data/agent/files/usr/local/share/assisted-service/images.env.template new file mode 100644 index 0000000000..003a26cb11 --- /dev/null +++ b/data/data/agent/files/usr/local/share/assisted-service/images.env.template @@ -0,0 +1,3 @@ +ASSISTED_SERVICE_HOST={{.NodeZeroIP}}:8090 +ASSISTED_SERVICE_SCHEME=http +OS_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}] diff --git a/data/data/agent/systemd/units/assisted-image-service.service b/data/data/agent/systemd/units/assisted-image-service.service index 8804b8eab3..3f9b7003dc 100644 --- a/data/data/agent/systemd/units/assisted-image-service.service +++ b/data/data/agent/systemd/units/assisted-image-service.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=image-service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-image-service:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=image-service -e LISTEN_PORT=8888 --env-file=/usr/local/share/assisted-service/images.env quay.io/edge-infrastructure/assisted-image-service:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service-db.service b/data/data/agent/systemd/units/assisted-service-db.service index 62ecbe0f19..121168ac5c 100644 --- a/data/data/agent/systemd/units/assisted-service-db.service +++ b/data/data/agent/systemd/units/assisted-service-db.service @@ -10,7 +10,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-db --env-file=/usr/local/share/assisted-service/environment quay.io/centos7/postgresql-12-centos7:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-db --env-file=/usr/local/share/assisted-service/assisted-db.env quay.io/centos7/postgresql-12-centos7:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service-ui.service b/data/data/agent/systemd/units/assisted-service-ui.service index 7d68891917..1c6d190676 100644 --- a/data/data/agent/systemd/units/assisted-service-ui.service +++ b/data/data/agent/systemd/units/assisted-service-ui.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-ui --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-installer-ui:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=assisted-ui quay.io/edge-infrastructure/assisted-installer-ui:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index 42b65aaf8f..aeca130074 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -11,7 +11,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=300 ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service --env-file=/usr/local/share/assisted-service/environment quay.io/edge-infrastructure/assisted-service:latest +ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service --env-file=/usr/local/share/assisted-service/assisted-service.env --env-file=/usr/local/share/assisted-service/images.env quay.io/edge-infrastructure/assisted-service:latest ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id Type=notify From b0ccc14023627c45ef4d687902055dcea2764886 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 24 Mar 2022 15:56:24 -0400 Subject: [PATCH 039/274] Fail on error in create-cluster-and-infra-env --- .../usr/local/bin/create-cluster-and-infra-env.sh.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template index 567c448624..223958a953 100644 --- a/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template +++ b/data/data/agent/files/usr/local/bin/create-cluster-and-infra-env.sh.template @@ -11,7 +11,7 @@ wait_for_assisted_service set -e -CLUSTER_CREATE_OUT=$(curl -s -S -X POST -H "Content-Type: application/json" -d '{{.ClusterCreateParamsJSON}}' {{.ServiceBaseURL}}/api/assisted-install/v2/clusters) +CLUSTER_CREATE_OUT=$(curl -f -s -S -X POST -H "Content-Type: application/json" -d '{{.ClusterCreateParamsJSON}}' {{.ServiceBaseURL}}/api/assisted-install/v2/clusters) echo "cluster create response: $CLUSTER_CREATE_OUT" # pick cluster_id out from cluster create response CLUSTER_ID=$(echo $CLUSTER_CREATE_OUT | jq -r .id) @@ -21,4 +21,4 @@ INFRA_ENV_PARAMS_JSON='{{.InfraEnvCreateParamsJSON}}' # replace "replace-cluster-id" with $CLUSTER_ID INFRA_ENV_PARAMS_JSON=${INFRA_ENV_PARAMS_JSON//"replace-cluster-id"/$CLUSTER_ID} -curl -s -S -X POST -H "Content-Type: application/json" -d "$INFRA_ENV_PARAMS_JSON" {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs +curl -f -s -S -X POST -H "Content-Type: application/json" -d "$INFRA_ENV_PARAMS_JSON" {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs From 0dbbef3667ab64753819c483fffcaeea0e6a4fde Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 24 Mar 2022 19:38:36 -0400 Subject: [PATCH 040/274] Re-run create cluster if assisted service fails Ensure that if the assisted-service pod is restarted, we will re-run the create-cluster-and-infra-env script. --- .../agent/systemd/units/create-cluster-and-infra-env.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/data/agent/systemd/units/create-cluster-and-infra-env.service b/data/data/agent/systemd/units/create-cluster-and-infra-env.service index b8382af539..eb57007eb6 100644 --- a/data/data/agent/systemd/units/create-cluster-and-infra-env.service +++ b/data/data/agent/systemd/units/create-cluster-and-infra-env.service @@ -1,6 +1,7 @@ [Unit] Description=Service that creates initial cluster and infra-env Wants=network-online.target assisted-service.service +PartOf=assisted-service-pod.service After=network-online.target assisted-service.service ConditionPathExists=/etc/assisted-service/node0 @@ -9,6 +10,7 @@ ExecStart=/usr/local/bin/create-cluster-and-infra-env.sh KillMode=none Type=oneshot +RemainAfterExit=true [Install] WantedBy=multi-user.target From f8e88bd2919bd8b609bab20e4c2ab4c572743484 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 24 Mar 2022 19:52:31 -0400 Subject: [PATCH 041/274] Remove assisted-image-service pod We don't actually need this for anything in the automated flow. --- .../units/assisted-image-service.service | 21 ------------------- .../units/assisted-service-pod.service | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 data/data/agent/systemd/units/assisted-image-service.service diff --git a/data/data/agent/systemd/units/assisted-image-service.service b/data/data/agent/systemd/units/assisted-image-service.service deleted file mode 100644 index 3f9b7003dc..0000000000 --- a/data/data/agent/systemd/units/assisted-image-service.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=Assisted Image Service -Wants=network.target -RequiresMountsFor=%t/containers -Requires=assisted-service.service -BindsTo=assisted-service-pod.service -After=network-online.target assisted-service-pod.service - -[Service] -Environment=PODMAN_SYSTEMD_UNIT=%n -Restart=on-failure -TimeoutStopSec=300 -ExecStartPre=/bin/rm -f %t/%n.ctr-id -ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=image-service -e LISTEN_PORT=8888 --env-file=/usr/local/share/assisted-service/images.env quay.io/edge-infrastructure/assisted-image-service:latest -ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id -ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id -Type=notify -NotifyAccess=all - -[Install] -WantedBy=multi-user.target diff --git a/data/data/agent/systemd/units/assisted-service-pod.service b/data/data/agent/systemd/units/assisted-service-pod.service index 17598d3d98..eec6a46d37 100644 --- a/data/data/agent/systemd/units/assisted-service-pod.service +++ b/data/data/agent/systemd/units/assisted-service-pod.service @@ -4,8 +4,8 @@ Wants=network.target node-zero.service After=network-online.target node-zero.service ConditionPathExists=/etc/assisted-service/node0 RequiresMountsFor= -Requires=assisted-service-db.service assisted-image-service.service assisted-service.service assisted-service-ui.service -Before=assisted-service-db.service assisted-image-service.service assisted-service.service assisted-service-ui.service +Requires=assisted-service-db.service assisted-service.service assisted-service-ui.service +Before=assisted-service-db.service assisted-service.service assisted-service-ui.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n From 8033c4861ccb30fefe2a64820e6a23d13a915693 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Wed, 30 Mar 2022 09:43:01 -0400 Subject: [PATCH 042/274] Read required hosts from ACI manifests, review fixes --- .../start-cluster-installation.sh.template | 28 ++++++++++--------- .../systemd/units/assisted-service.service | 1 + pkg/agent/imagebuilder/content.go | 3 ++ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template index 92efc193d2..b969498cb0 100644 --- a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template +++ b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template @@ -12,38 +12,40 @@ cluster_id=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].id) # Get infra_env_id infra_env_id=$(curl -s -S "${BASE_URL}/infra-envs"| jq -r .[].id) +required_hosts={{.ControlPlaneAgents}} +echo "Number of required hosts: ${required_hosts}" + known_hosts=0 -while [[ "${cluster_status}" != "ready" && "${known_hosts}" != "${host_count}" ]] +while [[ "${required_hosts}" != "${known_hosts}" ]] do - cluster_status=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].status) host_status=$(curl -s -S "${BASE_URL}/infra-envs/${infra_env_id}/hosts" | jq -r .[].status) if [[ -n ${host_status} ]]; then - host_count=$(curl -s -S "${BASE_URL}/infra-envs/${infra_env_id}/hosts" | jq length) - echo "Total hosts: ${host_count}" for status in ${host_status}; do - echo "Host status is ${status}" if [[ "${status}" == "known" ]]; then ((known_hosts+=1)) - echo "Hosts known and ready for cluster installation (${known_hosts}/${host_count})" - if [[ "${known_hosts}" == "${host_count}" ]]; then - break - fi + echo "Hosts known and ready for cluster installation (${known_hosts}/${required_hosts})" else echo "Waiting for hosts to become ready for cluster installation..." - sleep 10 + sleep 30 fi done fi done -echo "All ${host_count} hosts are ready." + +echo "All ${required_hosts} hosts are ready." + +api_vip=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].api_vip) +if [ "${api_vip}" == null ]; then + echo "Setting api vip" + curl -s -S -X PATCH "${BASE_URL}/clusters/${cluster_id}" -H "Content-Type: application/json" -d '{"api_vip": "{{.APIVIP}}"}' +fi while [[ "${cluster_status}" != "ready" ]] do - echo "Setting api vip" - curl -s -S -X PATCH "${BASE_URL}/clusters/${cluster_id}" -H "Content-Type: application/json" -d '{"api_vip": "{{.APIVIP}}"}' cluster_status=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].status) echo "Cluster status: ${cluster_status}" + sleep 5 if [[ "${cluster_status}" == "ready" ]]; then echo "Starting cluster installation..." curl -s -S -X POST "${BASE_URL}/clusters/${cluster_id}/actions/install" \ diff --git a/data/data/agent/systemd/units/assisted-service.service b/data/data/agent/systemd/units/assisted-service.service index f99be82610..6912c24693 100644 --- a/data/data/agent/systemd/units/assisted-service.service +++ b/data/data/agent/systemd/units/assisted-service.service @@ -14,6 +14,7 @@ ExecStopPost=/bin/podman pod rm --ignore assisted-service Restart=on-failure KillMode=none Type=forking +RemainAfterExit=true [Install] WantedBy=multi-user.target diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 00ec703548..59cd7b53f2 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -27,6 +27,7 @@ type ConfigBuilder struct { createClusterParamsJSON string createInfraEnvParamsJSON string apiVip string + controlPlaneAgents int } func New(nodeZeroIP string) *ConfigBuilder { @@ -60,6 +61,7 @@ func New(nodeZeroIP string) *ConfigBuilder { createClusterParamsJSON: string(clusterJSON), createInfraEnvParamsJSON: string(infraEnvJSON), apiVip: clusterInstall.Spec.APIVIP, + controlPlaneAgents: clusterInstall.Spec.ProvisionRequirements.ControlPlaneAgents, } } @@ -224,6 +226,7 @@ func (c ConfigBuilder) templateString(name string, text string) (string, error) "ClusterCreateParamsJSON": c.createClusterParamsJSON, "InfraEnvCreateParamsJSON": c.createInfraEnvParamsJSON, "APIVIP": c.apiVip, + "ControlPlaneAgents": c.controlPlaneAgents, } tmpl, err := template.New(name).Parse(string(text)) From cae6e99e5a224bf9bb1af67abb877aa65ced624a Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Wed, 30 Mar 2022 22:44:18 -0400 Subject: [PATCH 043/274] Read worker nodes --- .../bin/start-cluster-installation.sh.template | 14 +++++++++----- pkg/agent/imagebuilder/content.go | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template index b969498cb0..29e0c16fea 100644 --- a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template +++ b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template @@ -12,19 +12,23 @@ cluster_id=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].id) # Get infra_env_id infra_env_id=$(curl -s -S "${BASE_URL}/infra-envs"| jq -r .[].id) -required_hosts={{.ControlPlaneAgents}} -echo "Number of required hosts: ${required_hosts}" +required_master_nodes={{.ControlPlaneAgents}} +required_worker_nodes={{.WorkerAgents}} +total_required_nodes=$(( ${required_master_nodes}+${required_worker_nodes} )) +echo "Number of required master nodes: ${required_master_nodes}" +echo "Number of required worker nodes: ${required_worker_nodes}" +echo "Total number of required nodes: ${total_required_nodes}" known_hosts=0 -while [[ "${required_hosts}" != "${known_hosts}" ]] +while [[ "${total_required_nodes}" != "${known_hosts}" ]] do host_status=$(curl -s -S "${BASE_URL}/infra-envs/${infra_env_id}/hosts" | jq -r .[].status) if [[ -n ${host_status} ]]; then for status in ${host_status}; do if [[ "${status}" == "known" ]]; then ((known_hosts+=1)) - echo "Hosts known and ready for cluster installation (${known_hosts}/${required_hosts})" + echo "Hosts known and ready for cluster installation (${known_hosts}/${total_required_nodes})" else echo "Waiting for hosts to become ready for cluster installation..." sleep 30 @@ -33,7 +37,7 @@ do fi done -echo "All ${required_hosts} hosts are ready." +echo "All ${total_required_nodes} hosts are ready." api_vip=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].api_vip) if [ "${api_vip}" == null ]; then diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 59cd7b53f2..7ca57a82c3 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -28,6 +28,7 @@ type ConfigBuilder struct { createInfraEnvParamsJSON string apiVip string controlPlaneAgents int + workerAgents int } func New(nodeZeroIP string) *ConfigBuilder { @@ -62,6 +63,7 @@ func New(nodeZeroIP string) *ConfigBuilder { createInfraEnvParamsJSON: string(infraEnvJSON), apiVip: clusterInstall.Spec.APIVIP, controlPlaneAgents: clusterInstall.Spec.ProvisionRequirements.ControlPlaneAgents, + workerAgents: clusterInstall.Spec.ProvisionRequirements.WorkerAgents, } } @@ -227,6 +229,7 @@ func (c ConfigBuilder) templateString(name string, text string) (string, error) "InfraEnvCreateParamsJSON": c.createInfraEnvParamsJSON, "APIVIP": c.apiVip, "ControlPlaneAgents": c.controlPlaneAgents, + "WorkerAgents": c.workerAgents, } tmpl, err := template.New(name).Parse(string(text)) From f7b9ee24738f53ee9b45f47e2b6f2d0b058564bb Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Tue, 29 Mar 2022 16:52:20 -0400 Subject: [PATCH 044/274] AGENT-48: Add NMStateConfig to InfraEnvCreateParams Also, validate the labels from InfraEnv with NMStateConfig labels. --- go.mod | 1 + pkg/agent/imagebuilder/content.go | 6 ++- pkg/agent/manifests/infraenv.go | 14 +++++- pkg/agent/manifests/nmstateconfig.go | 68 ++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 pkg/agent/manifests/nmstateconfig.go diff --git a/go.mod b/go.mod index ffbc317925..be3bcdac63 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/openshift/assisted-image-service v0.0.0-20220307202600-054a1afa8d28 github.com/openshift/assisted-service v1.0.10-0.20220116113517-db25501e204a github.com/openshift/hive/apis v0.0.0-20210506000654-5c038fb05190 + github.com/pkg/errors v0.9.1 github.com/thoas/go-funk v0.9.1 github.com/vincent-petithory/dataurl v1.0.0 k8s.io/api v0.21.1 diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 11bcf0fb45..99b0cf9f58 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -42,7 +42,11 @@ func New(nodeZeroIP string) *ConfigBuilder { fmt.Errorf("Error marshalling cluster params into json: %w", err) } - infraEnvParams := manifests.CreateInfraEnvParams() + infraEnvParams, err := manifests.CreateInfraEnvParams() + if err != nil { + fmt.Errorf("Error building infra env params: %w", err) + } + infraEnvJSON, err := json.Marshal(infraEnvParams) if err != nil { fmt.Errorf("Error marshal infra env params into json: %w", err) diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 5da837bd3c..2f903c6e89 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -24,7 +24,7 @@ func getInfraEnv() aiv1beta1.InfraEnv { // createInfraEnvParams body was copied from // https://github.com/openshift/assisted-service/blob/5d4d836747862f43fa2ec882e5871648bd12c780/internal/controller/controllers/infraenv_controller.go#L339 // TODO: Refactor infraenv_controller to have a CreateInfraEnvParams function that can be used in controller and here. -func CreateInfraEnvParams() *models.InfraEnvCreateParams { +func CreateInfraEnvParams() (*models.InfraEnvCreateParams, error) { infraEnv := getInfraEnv() // TODO: Have single source for image version and cpu arch releaseImageVersion := "4.10.0-rc.1" @@ -58,5 +58,15 @@ func CreateInfraEnvParams() *models.InfraEnvCreateParams { createParams.ClusterID = &tempClusterID createParams.OpenshiftVersion = &releaseImageVersion - return createParams + staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) + if err != nil { + return nil, err + } + if len(staticNetworkConfig) > 0 { + // TODO: Use logging + // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) + createParams.StaticNetworkConfig = staticNetworkConfig + } + + return createParams, nil } diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go new file mode 100644 index 0000000000..553c265158 --- /dev/null +++ b/pkg/agent/manifests/nmstateconfig.go @@ -0,0 +1,68 @@ +package manifests + +import ( + "fmt" + "os" + "reflect" + + aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" + "github.com/openshift/assisted-service/models" + "github.com/pkg/errors" +) + +func getNMStateConfig() aiv1beta1.NMStateConfig { + var nmStateConfig aiv1beta1.NMStateConfig + if err := GetFileData("nmstateconfig.yaml", &nmStateConfig); err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } + + return nmStateConfig +} + +func validateNMStateConfigAndInfraEnv(nmStateConfig aiv1beta1.NMStateConfig, infraEnv aiv1beta1.InfraEnv) error { + if len(nmStateConfig.ObjectMeta.Labels) == 0 { + return errors.Errorf("NMStateConfig does not have any labels set") + } + + if len(infraEnv.Spec.NMStateConfigLabelSelector.MatchLabels) == 0 { + return errors.Errorf("Infra env does not have any labels set with NMStateConfigLabelSelector.MatchLabels") + } + + if !reflect.DeepEqual(infraEnv.Spec.NMStateConfigLabelSelector.MatchLabels, nmStateConfig.ObjectMeta.Labels) { + return errors.Errorf("Infra env and NMStateConfig labels do not match") + } + + return nil +} + +func buildMacInterfaceMap(nmStateConfig aiv1beta1.NMStateConfig) models.MacInterfaceMap { + macInterfaceMap := make(models.MacInterfaceMap, 0, len(nmStateConfig.Spec.Interfaces)) + for _, cfg := range nmStateConfig.Spec.Interfaces { + // ToDo: Use logging + // fmt.Println("adding MAC interface map to host static network config - Name: %s, MacAddress: %s ,", + // cfg.Name, cfg.MacAddress) + macInterfaceMap = append(macInterfaceMap, &models.MacInterfaceMapItems0{ + MacAddress: cfg.MacAddress, + LogicalNicName: cfg.Name, + }) + } + return macInterfaceMap +} + +func ProcessNMStateConfig(infraEnv aiv1beta1.InfraEnv) ([]*models.HostStaticNetworkConfig, error) { + + nmStateConfig := getNMStateConfig() + + err := validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) + if err != nil { + return nil, err + } + + var staticNetworkConfig []*models.HostStaticNetworkConfig + staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ + MacInterfaceMap: buildMacInterfaceMap(nmStateConfig), + NetworkYaml: string(nmStateConfig.Spec.NetConfig.Raw), + }) + return staticNetworkConfig, nil +} From 9358dc8f227b31b2fb968ba46700d230d2caf0c3 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 31 Mar 2022 12:30:07 -0400 Subject: [PATCH 045/274] Fix function name This change was accidentally reverted in fbb36c284c04cefb08af9e15d9df086a27c2473e, breaking compilation. --- pkg/agent/manifests/clusterdeployment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/agent/manifests/clusterdeployment.go b/pkg/agent/manifests/clusterdeployment.go index 41e1344944..64671800ae 100644 --- a/pkg/agent/manifests/clusterdeployment.go +++ b/pkg/agent/manifests/clusterdeployment.go @@ -33,7 +33,7 @@ func getClusterDeployment() hivev1.ClusterDeployment { return cd } -func getAgentClusterInstall() hiveext.AgentClusterInstall { +func GetAgentClusterInstall() hiveext.AgentClusterInstall { var aci hiveext.AgentClusterInstall if err := GetFileData("agent-cluster-install.yaml", &aci); err != nil { fmt.Println(err.Error()) @@ -49,7 +49,7 @@ func getAgentClusterInstall() hiveext.AgentClusterInstall { // After the refactoring most of the code below goes away, especially the helper functions that are being carried over here. func CreateClusterParams() *models.ClusterCreateParams { cd := getClusterDeployment() - aci := getAgentClusterInstall() + aci := GetAgentClusterInstall() clusterInstall := &aci // TODO: Have single source for image version and cpu arch releaseImageVersion := "4.10.0-rc.1" From cdb29b44b34c77f9e0f7cdb09821fdbe29cf3f08 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Mon, 4 Apr 2022 09:16:36 -0400 Subject: [PATCH 046/274] Temporarily disable nmstateconfig processing --- pkg/agent/manifests/infraenv.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 2f903c6e89..bf083d03dc 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -58,15 +58,15 @@ func CreateInfraEnvParams() (*models.InfraEnvCreateParams, error) { createParams.ClusterID = &tempClusterID createParams.OpenshiftVersion = &releaseImageVersion - staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) - if err != nil { - return nil, err - } - if len(staticNetworkConfig) > 0 { - // TODO: Use logging - // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) - createParams.StaticNetworkConfig = staticNetworkConfig - } + // staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) + // if err != nil { + // return nil, err + // } + // if len(staticNetworkConfig) > 0 { + // // TODO: Use logging + // // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) + // createParams.StaticNetworkConfig = staticNetworkConfig + // } return createParams, nil } From 5fa71587197dcceb39e8fadf913586a5e739df30 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Tue, 5 Apr 2022 19:19:05 -0400 Subject: [PATCH 047/274] Set BOOTSTRAP_HOST_MAC in assisted-service environment Setting the BOOTSTRAP_HOST_MAC environment variable notifies assisted-service of a MAC address of Node Zero so that it will be set as the bootstrap host. We choose the MAC address of interface that the service IP is on, as that is the most likely to be unique. To pass the environment variable to assisted-service, we turn the node0 file used to trigger starting the service into an environment file. --- .../files/usr/local/bin/set-node-zero.sh.template | 15 ++++++++++++--- .../agent/systemd/units/assisted-service.service | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/set-node-zero.sh.template b/data/data/agent/files/usr/local/bin/set-node-zero.sh.template index a21e5d40c9..5764adee3d 100644 --- a/data/data/agent/files/usr/local/bin/set-node-zero.sh.template +++ b/data/data/agent/files/usr/local/bin/set-node-zero.sh.template @@ -6,7 +6,16 @@ HOST=$(get_host) echo Using hostname ${HOST} 1>&2 if [[ ${HOST} == {{.NodeZeroIP}} ]] ;then - mkdir -p /etc/assisted-service && cd /etc/assisted-service && touch node0 - echo "This host is identified and set as node zero to run OpenShift Assisted Installer Service." > /etc/assisted-service/node0 - echo "Created file /etc/assisted-service/node0" + + NODE0_PATH=/etc/assisted-service/node0 + mkdir -p "$(dirname "${NODE0_PATH}")" + + NODE_ZERO_MAC=$(ip -j address | jq -r '.[] | select(.addr_info | map(select(.local == "{{.NodeZeroIP}}")) | any).address') + echo "MAC Address for Node 0: ${NODE_ZERO_MAC}" + + cat >"${NODE0_PATH}" < Date: Mon, 4 Apr 2022 17:57:52 -0400 Subject: [PATCH 048/274] AGENT-18: WIP, Configure static network addresses from manifest file Configure static network addresses on the node using the nmstateconfig manifest file. This uses the assisted-service staticnetworkconfig pkg, the version of assisted-installer was updated to pick up the most recent changes in staticnetworkconfig. One caveat - 'nmstatectl' must be installed on the machine running 'fleeting' since assisted-service uses it for the gen-code command. This will change shortly when the changes to add 'nmstatectl gc' merge to https://github.com/nmstate/nmstate and are used by assisted-service. This builds on the existing demo usng this manifest file http://pastebin.test.redhat.com/1042254, however the install doesn't fully complete since the hostname is not being set, that will be a follow-on. Unit tests still need to be added. --- .../units/pre-network-manager-config.service | 18 ++ go.mod | 13 +- pkg/agent/imagebuilder/content.go | 71 ++++--- pkg/agent/manifests/infraenv.go | 20 +- pkg/agent/manifests/network-scripts.go | 173 ++++++++++++++++++ pkg/agent/manifests/nmstateconfig.go | 47 ++++- 6 files changed, 296 insertions(+), 46 deletions(-) create mode 100644 data/data/agent/systemd/units/pre-network-manager-config.service create mode 100644 pkg/agent/manifests/network-scripts.go diff --git a/data/data/agent/systemd/units/pre-network-manager-config.service b/data/data/agent/systemd/units/pre-network-manager-config.service new file mode 100644 index 0000000000..f70e043db2 --- /dev/null +++ b/data/data/agent/systemd/units/pre-network-manager-config.service @@ -0,0 +1,18 @@ +[Unit] +Description=Prepare network manager config content +Before=dracut-initqueue.service +After=dracut-cmdline.service +DefaultDependencies=no + +[Service] +User=root +ExecStart=/usr/local/bin/pre-network-manager-config.sh + +TimeoutSec=60 +KillMode=none +Type=oneshot +PrivateTmp=true +RemainAfterExit=no + +[Install] +WantedBy=multi-user.target diff --git a/go.mod b/go.mod index be3bcdac63..9417a2c3d0 100644 --- a/go.mod +++ b/go.mod @@ -4,16 +4,21 @@ go 1.16 require ( github.com/coreos/go-systemd/v22 v22.3.2 // indirect - github.com/coreos/ignition/v2 v2.9.0 - github.com/go-openapi/strfmt v0.21.1 - github.com/go-openapi/swag v0.19.15 + github.com/coreos/ignition/v2 v2.13.0 + github.com/diskfs/go-diskfs v1.2.1-0.20210727185522-a769efacd235 // indirect + github.com/go-openapi/strfmt v0.21.2 + github.com/go-openapi/swag v0.21.1 + github.com/go-openapi/validate v0.20.3 // indirect github.com/openshift/assisted-image-service v0.0.0-20220307202600-054a1afa8d28 - github.com/openshift/assisted-service v1.0.10-0.20220116113517-db25501e204a + github.com/openshift/assisted-service v1.0.10-0.20220223093655-7ada9949bf1d github.com/openshift/hive/apis v0.0.0-20210506000654-5c038fb05190 github.com/pkg/errors v0.9.1 + github.com/sirupsen/logrus v1.8.1 github.com/thoas/go-funk v0.9.1 github.com/vincent-petithory/dataurl v1.0.0 k8s.io/api v0.21.1 + k8s.io/apimachinery v0.21.1 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect sigs.k8s.io/yaml v1.3.0 ) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 5303a17fce..48350b54d9 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -16,8 +16,12 @@ import ( data "github.com/openshift-agent-team/fleeting/data/data/agent" "github.com/openshift-agent-team/fleeting/pkg/agent/manifests" + + "github.com/openshift/assisted-service/models" ) +const NMCONNECTIONS_DIR = "/etc/assisted/network" + // ConfigBuilder builds an Ignition config type ConfigBuilder struct { pullSecret string @@ -29,6 +33,7 @@ type ConfigBuilder struct { apiVip string controlPlaneAgents int workerAgents int + staticNetworkConfig []*models.HostStaticNetworkConfig } func New(nodeZeroIP string) *ConfigBuilder { @@ -68,6 +73,7 @@ func New(nodeZeroIP string) *ConfigBuilder { apiVip: clusterInstall.Spec.APIVIP, controlPlaneAgents: clusterInstall.Spec.ProvisionRequirements.ControlPlaneAgents, workerAgents: clusterInstall.Spec.ProvisionRequirements.WorkerAgents, + staticNetworkConfig: infraEnvParams.StaticNetworkConfig, } } @@ -78,6 +84,18 @@ func getEnv(key, fallback string) string { return fallback } +func ignitionFileEmbed(path string, mode int, overwrite bool, data []byte) igntypes.File { + source := ignutil.StrToPtr(dataurl.EncodeBytes(data)) + + return igntypes.File{ + Node: igntypes.Node{Path: path, Overwrite: &overwrite}, + FileEmbedded1: igntypes.FileEmbedded1{ + Contents: igntypes.Resource{Source: source}, + Mode: &mode, + }, + } +} + // Ignition builds an ignition file and returns the bytes func (c ConfigBuilder) Ignition() ([]byte, error) { var err error @@ -104,22 +122,31 @@ func (c ConfigBuilder) Ignition() ([]byte, error) { // pull secret not included in data/data/agent/files because embed.FS // does not list directories with name starting with '.' if c.pullSecret != "" { - mode := 0420 - pullSecret := igntypes.File{ - Node: igntypes.Node{ - Path: "/root/.docker/config.json", - Overwrite: ignutil.BoolToPtr(true), - }, - FileEmbedded1: igntypes.FileEmbedded1{ - Mode: &mode, - Contents: igntypes.Resource{ - Source: ignutil.StrToPtr(dataurl.EncodeBytes([]byte(c.pullSecret))), - }, - }, - } + pullSecret := ignitionFileEmbed("/root/.docker/config.json", 0420, true, []byte(c.pullSecret)) files = append(files, pullSecret) } + if len(c.staticNetworkConfig) > 0 { + // Get the static network configuration from nmstate and generate NetworkManager ignition files + filesList, err := manifests.GetNMIgnitionFiles(c.staticNetworkConfig) + if err == nil { + for i := range filesList { + nmFilePath := path.Join(NMCONNECTIONS_DIR, filesList[i].FilePath) + nmStateIgnFile := ignitionFileEmbed(nmFilePath, 0600, true, []byte(filesList[i].FileContents)) + files = append(files, nmStateIgnFile) + } + + nmStateScriptFilePath := "/usr/local/bin/pre-network-manager-config.sh" + // A local version of the assisted-service internal script is currently used + nmStateScript := ignitionFileEmbed(nmStateScriptFilePath, 0755, true, []byte(manifests.PreNetworkConfigScript)) + files = append(files, nmStateScript) + } else { + // If manifest files are invalid, terminate to avoid networking problems at boot + fmt.Println(err.Error()) + os.Exit(1) + } + } + config.Storage.Files = files config.Systemd.Units, err = c.getUnits() @@ -172,18 +199,7 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { if _, dirName := path.Split(dirPath); dirName == "bin" || dirName == "dispatcher.d" { mode = 0555 } - file := igntypes.File{ - Node: igntypes.Node{ - Path: fullPath, - Overwrite: ignutil.BoolToPtr(true), - }, - FileEmbedded1: igntypes.FileEmbedded1{ - Mode: &mode, - Contents: igntypes.Resource{ - Source: ignutil.StrToPtr(dataurl.EncodeBytes([]byte(templated))), - }, - }, - } + file := ignitionFileEmbed(strings.TrimSuffix(fullPath, ".template"), mode, true, []byte(templated)) files = append(files, file) } } @@ -196,6 +212,7 @@ func (c ConfigBuilder) getFiles() ([]igntypes.File, error) { func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { units := make([]igntypes.Unit, 0) basePath := "systemd/units" + staticNetworkService := "pre-network-manager-config.service" entries, err := data.IgnitionData.ReadDir(basePath) if err != nil { @@ -203,6 +220,10 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { } for _, e := range entries { + if len(c.staticNetworkConfig) == 0 && e.Name() == staticNetworkService { + continue + } + contents, err := data.IgnitionData.ReadFile(path.Join(basePath, e.Name())) if err != nil { return units, fmt.Errorf("failed to read unit %s: %w", e.Name(), err) diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index bf083d03dc..481793aa9f 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -56,17 +56,17 @@ func CreateInfraEnvParams() (*models.InfraEnvCreateParams, error) { var tempClusterID strfmt.UUID tempClusterID = "replace-cluster-id" createParams.ClusterID = &tempClusterID - createParams.OpenshiftVersion = &releaseImageVersion + createParams.OpenshiftVersion = releaseImageVersion - // staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) - // if err != nil { - // return nil, err - // } - // if len(staticNetworkConfig) > 0 { - // // TODO: Use logging - // // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) - // createParams.StaticNetworkConfig = staticNetworkConfig - // } + staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) + if err != nil { + return nil, err + } + if len(staticNetworkConfig) > 0 { + // TODO: Use logging + // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) + createParams.StaticNetworkConfig = staticNetworkConfig + } return createParams, nil } diff --git a/pkg/agent/manifests/network-scripts.go b/pkg/agent/manifests/network-scripts.go new file mode 100644 index 0000000000..ec24fa8dd6 --- /dev/null +++ b/pkg/agent/manifests/network-scripts.go @@ -0,0 +1,173 @@ +package manifests + +// This file is copied from https://github.com/openshift/assisted-service/blob/master/internal/constants/scripts.go +// as its in the internal directory so can't be imported +// +// PreNetworkConfigScript script runs on hosts before network manager service starts in order to apply +// user's provided network configuration on the host. +// If the user provides static network configuration, the network config files will be stored in directory +// /etc/assisted/network in the following structure: +// /etc/assisted/network/ +// +-- host1 +// | +--- *.nmconnection +// | +--- mac_interface.ini +// +-- host2 +// +--- *.nmconnection +// +--- mac_interface.ini +// 1. *.nmconnections - files generated by nmstate based on yaml files provided by the user +// 2. mac_interface.ini - the file contains mapping of mac-address to logical interface name. +// There are two usages for the file: +// 1. Map logical interface name to MAC Address of the host. The logical interface name is a +// name provided by the user for the interface. It will be replaced by the script with the +// actual network interface name. +// 2. Identify the host directory which belongs to the current host by matching a MAC Address +// from the mapping file with host network interfaces. +// +// Applying the network configuration of each host will be done by: +// 1. Associate the current host with its matching hostX directory. The association will be done by +// matching host's mac addresses with those in mac_interface.ini. +// 2. Replace logical interface name in nmconnection files with the interface name as set on the host +// 3. Rename nmconnection files to start with the interface name (instead of the logical interface name) +// 4. Copy the nmconnection files to /NetworkManager/system-connections/ +const PreNetworkConfigScript = `#!/bin/bash + +# The directory that contains nmconnection files of all nodes +NMCONNECTIONS_DIR=/etc/assisted/network +MAC_NIC_MAPPING_FILE=mac_interface.ini + +if [ ! -d "$NMCONNECTIONS_DIR" ] +then + exit 0 +fi + +# A map of host mac addresses to interface names +declare -A host_macs_to_hw_iface + +# The directory that contains nmconnection files for the current host +host_dir="" + +# The mapping file of the current host +mapping_file="" + +# A nic-to-mac map created from the mapping file associated with the host +declare -A logical_nic_mac_map + +# Find destination directory based on ISO mode +if [[ -f /etc/initrd-release ]]; then + ETC_NETWORK_MANAGER="/run/NetworkManager/system-connections" +else + ETC_NETWORK_MANAGER="/etc/NetworkManager/system-connections" +fi + +# remove default connection file create by NM(nm-initrd-generator). This is a WA until +# NM is back to supporting priority between nmconnections +rm -f ${ETC_NETWORK_MANAGER}/* + +# Create a map of host mac addresses to their network interfaces +function map_host_macs_to_interfaces() { + SYS_CLASS_NET_DIR='/sys/class/net' + for nic in $( ls $SYS_CLASS_NET_DIR ) + do + mac=$(cat $SYS_CLASS_NET_DIR/$nic/address | tr '[:lower:]' '[:upper:]') + host_macs_to_hw_iface[$mac]=$nic + done +} + +function find_host_directory_by_mac_address() { + for d in $(ls -d ${NMCONNECTIONS_DIR}/host*) + do + mapping_file="${d}/${MAC_NIC_MAPPING_FILE}" + if [ ! -f $mapping_file ] + then + echo "Mapping file '$mapping_file' is missing. Skipping on directory '$d'" + continue + fi + + # check if mapping file contains mac-address that exists on the current host + for mac_address in $(cat $mapping_file | cut -d= -f1 | tr '[:lower:]' '[:upper:]') + do + if [[ ! -z "${host_macs_to_hw_iface[${mac_address}]:-}" ]] + then + host_dir=$(mktemp -d) + cp ${d}/* $host_dir + return + fi + done + done + + if [ -z "$host_dir" ] + then + echo "None of host directories are a match for the current host" + exit 0 + fi +} + +function set_logical_nic_mac_mapping() { + # initialize logical_nic_mac_map with mapping file entries + readarray -t lines < "${mapping_file}" + for line in "${lines[@]}" + do + mac=${line%%=*} + nic=${line#*=} + logical_nic_mac_map[$nic]=${mac^^} + done +} + +# Replace logical interface name in nmconnection files with the interface name from the mapping file +# of host's directory. Replacement is done based on mac-address matching +function update_interface_names_by_mapping_file() { + + # iterate over host's nmconnection files and replace logical interface name with host's nic name + for nmconn_file in $(ls -1 ${host_dir}/*.nmconnection) + do + # iterate over mapping to find nmconnection files with logical interface name + for nic in "${!logical_nic_mac_map[@]}" + do + mac=${logical_nic_mac_map[$nic]} + + # the pattern should match '=eth0' (interface name) or '=eth0.' (for vlan devices) + if grep -q -e "=$nic$" -e "=$nic\." "$nmconn_file" + then + # get host interface name + host_iface=${host_macs_to_hw_iface[$mac]} + if [ -z "$host_iface" ] + then + echo "Mapping file contains MAC Address '$mac' (for logical interface name '$nic') that doesn't exist on the host" + continue + fi + + # replace logical interface name with host interface name + sed -i -e "s/=$nic$/=$host_iface/g" -e "s/=$nic\./=$host_iface\./g" $nmconn_file + fi + done + done +} + +function copy_nmconnection_files_to_nm_config_dir() { + for nmconn_file in $(ls -1 ${host_dir}/*.nmconnection) + do + # rename nmconnection files based on the actual interface name + filename=$(basename $nmconn_file) + prefix="${filename%%.*}" + extension="${filename#*.}" + if [ ! -z "${logical_nic_mac_map[$prefix]}" ] + then + dir_path=$(dirname $nmconn_file) + mac_address=${logical_nic_mac_map[$prefix]} + host_iface=${host_macs_to_hw_iface[$mac_address]} + if [ ! -z "$host_iface" ] + then + mv $nmconn_file "${dir_path}/${host_iface}.${extension}" + fi + fi + done + + cp ${host_dir}/*.nmconnection ${ETC_NETWORK_MANAGER}/ +} + +map_host_macs_to_interfaces +find_host_directory_by_mac_address +set_logical_nic_mac_mapping +update_interface_names_by_mapping_file +copy_nmconnection_files_to_nm_config_dir +` diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index 553c265158..eec58b81ad 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -1,23 +1,25 @@ package manifests import ( + "context" "fmt" - "os" "reflect" aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" "github.com/openshift/assisted-service/models" + "github.com/openshift/assisted-service/pkg/staticnetworkconfig" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) -func getNMStateConfig() aiv1beta1.NMStateConfig { +func getNMStateConfig() (aiv1beta1.NMStateConfig, error) { var nmStateConfig aiv1beta1.NMStateConfig if err := GetFileData("nmstateconfig.yaml", &nmStateConfig); err != nil { - fmt.Println(err.Error()) - os.Exit(1) + // This file is optional if DHCP addressing is used + return nmStateConfig, err } - return nmStateConfig + return nmStateConfig, nil } func validateNMStateConfigAndInfraEnv(nmStateConfig aiv1beta1.NMStateConfig, infraEnv aiv1beta1.InfraEnv) error { @@ -50,11 +52,42 @@ func buildMacInterfaceMap(nmStateConfig aiv1beta1.NMStateConfig) models.MacInter return macInterfaceMap } +// Get the NetworkManager configuration files +func GetNMIgnitionFiles(staticNetworkConfig []*models.HostStaticNetworkConfig) ([]staticnetworkconfig.StaticNetworkConfigData, error) { + log := logrus.New() + staticNetworkConfigGenerator := staticnetworkconfig.New(log.WithField("pkg", "manifests"), staticnetworkconfig.Config{2}) + + // Validate the network config + if err := staticNetworkConfigGenerator.ValidateStaticConfigParams(context.Background(), staticNetworkConfig); err != nil { + err = fmt.Errorf("StaticNetwork configuration is not valid: %w", err) + return nil, err + } + + networkConfigStr, err := staticNetworkConfigGenerator.FormatStaticNetworkConfigForDB(staticNetworkConfig) + if err != nil { + err = fmt.Errorf("Error marshalling StaticNetwork configuration: %w", err) + return nil, err + } + + filesList, err := staticNetworkConfigGenerator.GenerateStaticNetworkConfigData(context.Background(), networkConfigStr) + if err != nil { + err = fmt.Errorf("Failed to create StaticNetwork config data: %w", err) + return nil, err + } + + return filesList, err +} + func ProcessNMStateConfig(infraEnv aiv1beta1.InfraEnv) ([]*models.HostStaticNetworkConfig, error) { - nmStateConfig := getNMStateConfig() + nmStateConfig, err := getNMStateConfig() - err := validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) + if err != nil { + fmt.Println("A nmstateconfig file has not been provided, no static addresses set in iso") + return nil, nil + } + + err = validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) if err != nil { return nil, err } From 9b169d41b76cc3a06a54d7f7d776bd363f0278d3 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Thu, 7 Apr 2022 20:45:35 -0400 Subject: [PATCH 049/274] AGENT-39: Read node0 IP from nmstateconfig Additionally, - Remove unwanted validation between Infraenv and NMStateconfig using labels - Read multiple nmstateconfigs from one yaml file - Remove reading node0 IP from CLI - Define type NMStateConfig --- go.mod | 1 + pkg/agent/build_image.go | 12 +-- pkg/agent/imagebuilder/content.go | 8 +- pkg/agent/imagebuilder/embed_ignition.go | 4 +- pkg/agent/manifests/infraenv.go | 9 +- pkg/agent/manifests/nmstateconfig.go | 113 ++++++++++++++--------- 6 files changed, 81 insertions(+), 66 deletions(-) diff --git a/go.mod b/go.mod index 9417a2c3d0..97fecf6ba4 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/thoas/go-funk v0.9.1 github.com/vincent-petithory/dataurl v1.0.0 + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b k8s.io/api v0.21.1 k8s.io/apimachinery v0.21.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go index 4365463dd3..d413b68535 100644 --- a/pkg/agent/build_image.go +++ b/pkg/agent/build_image.go @@ -1,28 +1,18 @@ package agent import ( - "flag" - "os" - "github.com/openshift-agent-team/fleeting/pkg/agent/imagebuilder" "github.com/openshift-agent-team/fleeting/pkg/agent/isosource" ) func BuildImage() error { - nodeZeroIP := flag.String("node-zero-ip", "", "IP of the node to run OpenShift Assisted Installation Service on. (Required)") - flag.Parse() - - if *nodeZeroIP == "" { - flag.PrintDefaults() - os.Exit(1) - } baseImage, err := isosource.EnsureIso() if err != nil { return err } - err = imagebuilder.BuildImage(baseImage, *nodeZeroIP) + err = imagebuilder.BuildImage(baseImage) if err != nil { return err } diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 48350b54d9..a65eb68f46 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -36,8 +36,9 @@ type ConfigBuilder struct { staticNetworkConfig []*models.HostStaticNetworkConfig } -func New(nodeZeroIP string) *ConfigBuilder { +func New() *ConfigBuilder { pullSecret := manifests.GetPullSecret() + nodeZeroIP := manifests.GetNodeZeroIP() // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") @@ -50,10 +51,7 @@ func New(nodeZeroIP string) *ConfigBuilder { fmt.Errorf("Error marshalling cluster params into json: %w", err) } - infraEnvParams, err := manifests.CreateInfraEnvParams() - if err != nil { - fmt.Errorf("Error building infra env params: %w", err) - } + infraEnvParams := manifests.CreateInfraEnvParams() infraEnvJSON, err := json.Marshal(infraEnvParams) if err != nil { diff --git a/pkg/agent/imagebuilder/embed_ignition.go b/pkg/agent/imagebuilder/embed_ignition.go index 5567d460d2..d88f19baaf 100644 --- a/pkg/agent/imagebuilder/embed_ignition.go +++ b/pkg/agent/imagebuilder/embed_ignition.go @@ -13,8 +13,8 @@ const ( // BuildImage builds an ISO with ignition content from a base image, and writes // the result to disk. -func BuildImage(baseImage string, nodeZeroIP string) error { - configBuilder := New(nodeZeroIP) +func BuildImage(baseImage string) error { + configBuilder := New() ignition, err := configBuilder.Ignition() if err != nil { return err diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 481793aa9f..6a3dbd003a 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -24,7 +24,7 @@ func getInfraEnv() aiv1beta1.InfraEnv { // createInfraEnvParams body was copied from // https://github.com/openshift/assisted-service/blob/5d4d836747862f43fa2ec882e5871648bd12c780/internal/controller/controllers/infraenv_controller.go#L339 // TODO: Refactor infraenv_controller to have a CreateInfraEnvParams function that can be used in controller and here. -func CreateInfraEnvParams() (*models.InfraEnvCreateParams, error) { +func CreateInfraEnvParams() *models.InfraEnvCreateParams { infraEnv := getInfraEnv() // TODO: Have single source for image version and cpu arch releaseImageVersion := "4.10.0-rc.1" @@ -58,15 +58,12 @@ func CreateInfraEnvParams() (*models.InfraEnvCreateParams, error) { createParams.ClusterID = &tempClusterID createParams.OpenshiftVersion = releaseImageVersion - staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) - if err != nil { - return nil, err - } + staticNetworkConfig := GetStaticNetworkConfig() if len(staticNetworkConfig) > 0 { // TODO: Use logging // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) createParams.StaticNetworkConfig = staticNetworkConfig } - return createParams, nil + return createParams } diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index eec58b81ad..d9f713edce 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -3,42 +3,66 @@ package manifests import ( "context" "fmt" - "reflect" - aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" + "io" + "os" + + yamlV3 "gopkg.in/yaml.v3" + "github.com/openshift/assisted-service/models" "github.com/openshift/assisted-service/pkg/staticnetworkconfig" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) -func getNMStateConfig() (aiv1beta1.NMStateConfig, error) { - var nmStateConfig aiv1beta1.NMStateConfig - if err := GetFileData("nmstateconfig.yaml", &nmStateConfig); err != nil { - // This file is optional if DHCP addressing is used - return nmStateConfig, err - } - - return nmStateConfig, nil +type NMStateConfig struct { + Kind string `yaml:"kind"` + Spec struct { + Config struct { + Interfaces []struct { + IPV4 struct { + Address []struct { + IP string `yaml:"ip,omitempty"` + } `yaml:"address,omitempty"` + } `yaml:"ipv4,omitempty"` + } `yaml:"interfaces,omitempty"` + } `yaml:"config,omitempty"` + Interfaces []struct { + Name string `yaml:"name,omitempty"` + MacAddress string `yaml:"macAddress"` + } `yaml:"interfaces,omitempty"` + } `yaml:"spec,omitempty"` } -func validateNMStateConfigAndInfraEnv(nmStateConfig aiv1beta1.NMStateConfig, infraEnv aiv1beta1.InfraEnv) error { - if len(nmStateConfig.ObjectMeta.Labels) == 0 { - return errors.Errorf("NMStateConfig does not have any labels set") +// Retrieve the all NMStateConfigs from the user provided NMStateConfig yaml file +func getNMStateConfig() []NMStateConfig { + var nmStateConfig []NMStateConfig + f, err := os.Open("./manifests/nmstateconfig.yaml") + if err != nil { + fmt.Println(err.Error()) + os.Exit(1) } - - if len(infraEnv.Spec.NMStateConfigLabelSelector.MatchLabels) == 0 { - return errors.Errorf("Infra env does not have any labels set with NMStateConfigLabelSelector.MatchLabels") + d := yamlV3.NewDecoder(f) + for { + config := new(NMStateConfig) + err := d.Decode(&config) + if config == nil { + continue + } + // break the loop in case of EOF + if errors.Is(err, io.EOF) { + break + } + if err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } + nmStateConfig = append(nmStateConfig, *config) } - - if !reflect.DeepEqual(infraEnv.Spec.NMStateConfigLabelSelector.MatchLabels, nmStateConfig.ObjectMeta.Labels) { - return errors.Errorf("Infra env and NMStateConfig labels do not match") - } - - return nil + return nmStateConfig } -func buildMacInterfaceMap(nmStateConfig aiv1beta1.NMStateConfig) models.MacInterfaceMap { +func buildMacInterfaceMap(nmStateConfig NMStateConfig) models.MacInterfaceMap { macInterfaceMap := make(models.MacInterfaceMap, 0, len(nmStateConfig.Spec.Interfaces)) for _, cfg := range nmStateConfig.Spec.Interfaces { // ToDo: Use logging @@ -78,24 +102,29 @@ func GetNMIgnitionFiles(staticNetworkConfig []*models.HostStaticNetworkConfig) ( return filesList, err } -func ProcessNMStateConfig(infraEnv aiv1beta1.InfraEnv) ([]*models.HostStaticNetworkConfig, error) { - - nmStateConfig, err := getNMStateConfig() - - if err != nil { - fmt.Println("A nmstateconfig file has not been provided, no static addresses set in iso") - return nil, nil - } - - err = validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) - if err != nil { - return nil, err - } - +func GetStaticNetworkConfig() []*models.HostStaticNetworkConfig { var staticNetworkConfig []*models.HostStaticNetworkConfig - staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ - MacInterfaceMap: buildMacInterfaceMap(nmStateConfig), - NetworkYaml: string(nmStateConfig.Spec.NetConfig.Raw), - }) - return staticNetworkConfig, nil + nmStateConfigs := getNMStateConfig() + for _, config := range nmStateConfigs { + networkYaml, err := yamlV3.Marshal(config.Spec.Config) + if err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } + + staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ + MacInterfaceMap: buildMacInterfaceMap(config), + NetworkYaml: string(networkYaml), + }) + + } + + return staticNetworkConfig +} + +// Retrieve the first IP from the user provided NMStateConfig yaml file to set as node0 IP +func GetNodeZeroIP() string { + config := getNMStateConfig() + nodeZeroIP := config[0].Spec.Config.Interfaces[0].IPV4.Address[0].IP + return nodeZeroIP } From c99666249b792fda73ba2894eea03ff970fd563a Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Mon, 11 Apr 2022 17:50:12 -0400 Subject: [PATCH 050/274] Add IPV6 struct definition --- pkg/agent/manifests/nmstateconfig.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index d9f713edce..3ca7bad53c 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -25,6 +25,11 @@ type NMStateConfig struct { IP string `yaml:"ip,omitempty"` } `yaml:"address,omitempty"` } `yaml:"ipv4,omitempty"` + IPV6 struct { + Address []struct { + IP string `yaml:"ip,omitempty"` + } `yaml:"address,omitempty"` + } `yaml:"ipv6,omitempty"` } `yaml:"interfaces,omitempty"` } `yaml:"config,omitempty"` Interfaces []struct { From 7383eddcc1b6a97d67f6e044ffcd04c157462530 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Mon, 11 Apr 2022 18:40:35 -0400 Subject: [PATCH 051/274] Retrieve node0 IP only --- go.mod | 2 +- pkg/agent/imagebuilder/content.go | 5 +- pkg/agent/manifests/infraenv.go | 9 +- pkg/agent/manifests/nmstateconfig.go | 150 +++++++++++++++------------ 4 files changed, 96 insertions(+), 70 deletions(-) diff --git a/go.mod b/go.mod index 97fecf6ba4..265bf3a4b4 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/thoas/go-funk v0.9.1 github.com/vincent-petithory/dataurl v1.0.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/api v0.21.1 k8s.io/apimachinery v0.21.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index a65eb68f46..647c3c8915 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -51,7 +51,10 @@ func New() *ConfigBuilder { fmt.Errorf("Error marshalling cluster params into json: %w", err) } - infraEnvParams := manifests.CreateInfraEnvParams() + infraEnvParams, err := manifests.CreateInfraEnvParams() + if err != nil { + fmt.Errorf("Error building infra env params: %w", err) + } infraEnvJSON, err := json.Marshal(infraEnvParams) if err != nil { diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 6a3dbd003a..481793aa9f 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -24,7 +24,7 @@ func getInfraEnv() aiv1beta1.InfraEnv { // createInfraEnvParams body was copied from // https://github.com/openshift/assisted-service/blob/5d4d836747862f43fa2ec882e5871648bd12c780/internal/controller/controllers/infraenv_controller.go#L339 // TODO: Refactor infraenv_controller to have a CreateInfraEnvParams function that can be used in controller and here. -func CreateInfraEnvParams() *models.InfraEnvCreateParams { +func CreateInfraEnvParams() (*models.InfraEnvCreateParams, error) { infraEnv := getInfraEnv() // TODO: Have single source for image version and cpu arch releaseImageVersion := "4.10.0-rc.1" @@ -58,12 +58,15 @@ func CreateInfraEnvParams() *models.InfraEnvCreateParams { createParams.ClusterID = &tempClusterID createParams.OpenshiftVersion = releaseImageVersion - staticNetworkConfig := GetStaticNetworkConfig() + staticNetworkConfig, err := ProcessNMStateConfig(infraEnv) + if err != nil { + return nil, err + } if len(staticNetworkConfig) > 0 { // TODO: Use logging // fmt.Printf("the amount of nmStateConfigs included in the image is: %d", len(staticNetworkConfig)) createParams.StaticNetworkConfig = staticNetworkConfig } - return createParams + return createParams, nil } diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index 3ca7bad53c..7fe07c787a 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -3,71 +3,60 @@ package manifests import ( "context" "fmt" - - "io" + "net" "os" + "reflect" - yamlV3 "gopkg.in/yaml.v3" - + aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" "github.com/openshift/assisted-service/models" "github.com/openshift/assisted-service/pkg/staticnetworkconfig" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "sigs.k8s.io/yaml" ) type NMStateConfig struct { - Kind string `yaml:"kind"` - Spec struct { - Config struct { - Interfaces []struct { - IPV4 struct { - Address []struct { - IP string `yaml:"ip,omitempty"` - } `yaml:"address,omitempty"` - } `yaml:"ipv4,omitempty"` - IPV6 struct { - Address []struct { - IP string `yaml:"ip,omitempty"` - } `yaml:"address,omitempty"` - } `yaml:"ipv6,omitempty"` - } `yaml:"interfaces,omitempty"` - } `yaml:"config,omitempty"` - Interfaces []struct { - Name string `yaml:"name,omitempty"` - MacAddress string `yaml:"macAddress"` - } `yaml:"interfaces,omitempty"` - } `yaml:"spec,omitempty"` + Interfaces []struct { + IPV4 struct { + Address []struct { + IP string `yaml:"ip,omitempty"` + } `yaml:"address,omitempty"` + } `yaml:"ipv4,omitempty"` + IPV6 struct { + Address []struct { + IP string `yaml:"ip,omitempty"` + } `yaml:"address,omitempty"` + } `yaml:"ipv6,omitempty"` + } `yaml:"interfaces,omitempty"` } -// Retrieve the all NMStateConfigs from the user provided NMStateConfig yaml file -func getNMStateConfig() []NMStateConfig { - var nmStateConfig []NMStateConfig - f, err := os.Open("./manifests/nmstateconfig.yaml") - if err != nil { +func getNMStateConfig() (aiv1beta1.NMStateConfig, error) { + var nmStateConfig aiv1beta1.NMStateConfig + if err := GetFileData("nmstateconfig.yaml", &nmStateConfig); err != nil { fmt.Println(err.Error()) os.Exit(1) } - d := yamlV3.NewDecoder(f) - for { - config := new(NMStateConfig) - err := d.Decode(&config) - if config == nil { - continue - } - // break the loop in case of EOF - if errors.Is(err, io.EOF) { - break - } - if err != nil { - fmt.Println(err.Error()) - os.Exit(1) - } - nmStateConfig = append(nmStateConfig, *config) - } - return nmStateConfig + + return nmStateConfig, nil } -func buildMacInterfaceMap(nmStateConfig NMStateConfig) models.MacInterfaceMap { +func validateNMStateConfigAndInfraEnv(nmStateConfig aiv1beta1.NMStateConfig, infraEnv aiv1beta1.InfraEnv) error { + if len(nmStateConfig.ObjectMeta.Labels) == 0 { + return errors.Errorf("NMStateConfig does not have any labels set") + } + + if len(infraEnv.Spec.NMStateConfigLabelSelector.MatchLabels) == 0 { + return errors.Errorf("Infra env does not have any labels set with NMStateConfigLabelSelector.MatchLabels") + } + + if !reflect.DeepEqual(infraEnv.Spec.NMStateConfigLabelSelector.MatchLabels, nmStateConfig.ObjectMeta.Labels) { + return errors.Errorf("Infra env and NMStateConfig labels do not match") + } + + return nil +} + +func buildMacInterfaceMap(nmStateConfig aiv1beta1.NMStateConfig) models.MacInterfaceMap { macInterfaceMap := make(models.MacInterfaceMap, 0, len(nmStateConfig.Spec.Interfaces)) for _, cfg := range nmStateConfig.Spec.Interfaces { // ToDo: Use logging @@ -107,29 +96,60 @@ func GetNMIgnitionFiles(staticNetworkConfig []*models.HostStaticNetworkConfig) ( return filesList, err } -func GetStaticNetworkConfig() []*models.HostStaticNetworkConfig { - var staticNetworkConfig []*models.HostStaticNetworkConfig - nmStateConfigs := getNMStateConfig() - for _, config := range nmStateConfigs { - networkYaml, err := yamlV3.Marshal(config.Spec.Config) - if err != nil { - fmt.Println(err.Error()) - os.Exit(1) - } +func ProcessNMStateConfig(infraEnv aiv1beta1.InfraEnv) ([]*models.HostStaticNetworkConfig, error) { - staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ - MacInterfaceMap: buildMacInterfaceMap(config), - NetworkYaml: string(networkYaml), - }) + nmStateConfig, err := getNMStateConfig() + if err != nil { + fmt.Println("A nmstateconfig file has not been provided, no static addresses set in iso") + return nil, nil } - return staticNetworkConfig + err = validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) + if err != nil { + return nil, err + } + + var staticNetworkConfig []*models.HostStaticNetworkConfig + staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ + MacInterfaceMap: buildMacInterfaceMap(nmStateConfig), + NetworkYaml: string(nmStateConfig.Spec.NetConfig.Raw), + }) + return staticNetworkConfig, nil } // Retrieve the first IP from the user provided NMStateConfig yaml file to set as node0 IP func GetNodeZeroIP() string { - config := getNMStateConfig() - nodeZeroIP := config[0].Spec.Config.Interfaces[0].IPV4.Address[0].IP + config, err := getNMStateConfig() + if err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } + + var nmconfig NMStateConfig + err = yaml.Unmarshal(config.Spec.NetConfig.Raw, &nmconfig) + if err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } + + var nodeZeroIP string + if nmconfig.Interfaces != nil { + if nmconfig.Interfaces[0].IPV4.Address != nil { + nodeZeroIP = nmconfig.Interfaces[0].IPV4.Address[0].IP + } + if nmconfig.Interfaces[0].IPV6.Address != nil { + nodeZeroIP = nmconfig.Interfaces[0].IPV6.Address[0].IP + + } + if net.ParseIP(nodeZeroIP) == nil { + fmt.Errorf("Invalid YAML - NMStateconfig") + os.Exit(1) + } + } else { + fmt.Errorf("Invalid YAML - NMStateconfig: No valid interfaces set.") + os.Exit(1) + } + return nodeZeroIP } From ec2e2e989b7c12e39f0d624226f0e768e9d29999 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 7 Apr 2022 15:49:12 -0400 Subject: [PATCH 052/274] Make detecting Node0 more robust If the Node0 IP appears on *any* interface, this is node 0. Previously we tried to guess the 'best' IP for the host and only designated it as node 0 if it was also the Node0 IP. Also, we were comparing a URL host (IPv6 addresses wrapped in []) with a raw IP address. --- .../agent/files/usr/local/bin/common.sh.template | 16 ---------------- .../usr/local/bin/set-node-zero.sh.template | 8 ++++---- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/common.sh.template b/data/data/agent/files/usr/local/bin/common.sh.template index 177b8097a1..4be6ed5076 100644 --- a/data/data/agent/files/usr/local/bin/common.sh.template +++ b/data/data/agent/files/usr/local/bin/common.sh.template @@ -1,21 +1,5 @@ #!/bin/bash -get_host() { - local default_gateway - local host_ip - - default_gateway=$(ip -j route show default | jq -r '.[0].gateway') - host_ip=$(ip -j route get "${default_gateway}" | jq -r '.[0].prefsrc') - - local host_fmt="%s" - if [[ ${host_ip} =~ : ]]; then - host_fmt="[%s]" - fi - - # shellcheck disable=SC2059 - printf "${host_fmt}" "${host_ip}" -} - wait_for_assisted_service() { echo "Waiting for assisted-service to be ready" until $(curl --output /dev/null --silent --fail {{.ServiceBaseURL}}/api/assisted-install/v2/infra-envs); do diff --git a/data/data/agent/files/usr/local/bin/set-node-zero.sh.template b/data/data/agent/files/usr/local/bin/set-node-zero.sh.template index 5764adee3d..77ae86cf35 100644 --- a/data/data/agent/files/usr/local/bin/set-node-zero.sh.template +++ b/data/data/agent/files/usr/local/bin/set-node-zero.sh.template @@ -1,11 +1,11 @@ #!/bin/bash -source common.sh +set -e -HOST=$(get_host) -echo Using hostname ${HOST} 1>&2 +IS_NODE_ZERO=$(ip -j address | jq '[.[].addr_info] | flatten | map(.local=="{{.NodeZeroIP}}") | any') -if [[ ${HOST} == {{.NodeZeroIP}} ]] ;then +if [ "${IS_NODE_ZERO}" = "true" ]; then + echo "Node 0 IP {{.NodeZeroIP}} found on this host" 1>&2 NODE0_PATH=/etc/assisted-service/node0 mkdir -p "$(dirname "${NODE0_PATH}")" From b82f3bc4409efdd505f4d165e0848e6c729a6e1a Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 7 Apr 2022 16:26:35 -0400 Subject: [PATCH 053/274] Use URL object for ServiceBaseURL Avoid duplicating data by passing all info about the assisted-service URL around in a single URL object. --- pkg/agent/imagebuilder/content.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 647c3c8915..7207c80efe 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "net" + "net/url" "os" "path" "strings" @@ -25,9 +26,8 @@ const NMCONNECTIONS_DIR = "/etc/assisted/network" // ConfigBuilder builds an Ignition config type ConfigBuilder struct { pullSecret string - serviceBaseURL string + serviceBaseURL url.URL pullSecretToken string - nodeZeroIP string createClusterParamsJSON string createInfraEnvParamsJSON string apiVip string @@ -42,8 +42,11 @@ func New() *ConfigBuilder { // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") - serviceBaseURL := fmt.Sprintf("http://%s/", - net.JoinHostPort(nodeZeroIP, "8090")) + serviceBaseURL := url.URL{ + Scheme: "http", + Host: net.JoinHostPort(nodeZeroIP, "8090"), + Path: "/", + } clusterParams := manifests.CreateClusterParams() clusterJSON, err := json.Marshal(clusterParams) @@ -68,7 +71,6 @@ func New() *ConfigBuilder { pullSecret: pullSecret, serviceBaseURL: serviceBaseURL, pullSecretToken: pullSecretToken, - nodeZeroIP: nodeZeroIP, createClusterParamsJSON: string(clusterJSON), createInfraEnvParamsJSON: string(infraEnvJSON), apiVip: clusterInstall.Spec.APIVIP, @@ -248,9 +250,9 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { func (c ConfigBuilder) templateString(name string, text string) (string, error) { params := map[string]interface{}{ - "ServiceBaseURL": c.serviceBaseURL, + "ServiceBaseURL": c.serviceBaseURL.String(), "PullSecretToken": c.pullSecretToken, - "NodeZeroIP": c.nodeZeroIP, + "NodeZeroIP": c.serviceBaseURL.Hostname(), "ClusterCreateParamsJSON": c.createClusterParamsJSON, "InfraEnvCreateParamsJSON": c.createInfraEnvParamsJSON, "APIVIP": c.apiVip, From 3b416ce3d7a462ee78996fa2e3b6b0966e294cbb Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 7 Apr 2022 16:06:22 -0400 Subject: [PATCH 054/274] Handle an IPv6 address for Node0 Don't assume that we can use an IP address directly in a URL. --- .../files/usr/local/bin/start-cluster-installation.sh.template | 2 +- .../local/share/assisted-service/assisted-service.env.template | 2 +- .../files/usr/local/share/assisted-service/images.env.template | 2 +- pkg/agent/imagebuilder/content.go | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template index 29e0c16fea..0db7e587ef 100644 --- a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template +++ b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template @@ -5,7 +5,7 @@ source common.sh wait_for_assisted_service -BASE_URL="http://{{.NodeZeroIP}}:8090/api/assisted-install/v2" +BASE_URL="http://{{.AssistedServiceHost}}/api/assisted-install/v2" # Get cluster id cluster_id=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].id) diff --git a/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template b/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template index 57d925dc79..4cd4cc4a19 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template +++ b/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template @@ -14,5 +14,5 @@ IPV6_SUPPORT=true NTP_DEFAULT_SERVER= PUBLIC_CONTAINER_REGISTRIES=quay.io RELEASE_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}] -SERVICE_BASE_URL=http://{{.NodeZeroIP}}:8090 +SERVICE_BASE_URL=http://{{.AssistedServiceHost}} STORAGE=filesystem diff --git a/data/data/agent/files/usr/local/share/assisted-service/images.env.template b/data/data/agent/files/usr/local/share/assisted-service/images.env.template index 003a26cb11..4a7e801fd6 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/images.env.template +++ b/data/data/agent/files/usr/local/share/assisted-service/images.env.template @@ -1,3 +1,3 @@ -ASSISTED_SERVICE_HOST={{.NodeZeroIP}}:8090 +ASSISTED_SERVICE_HOST={{.AssistedServiceHost}} ASSISTED_SERVICE_SCHEME=http OS_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}] diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 7207c80efe..e2e0015b13 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -253,6 +253,7 @@ func (c ConfigBuilder) templateString(name string, text string) (string, error) "ServiceBaseURL": c.serviceBaseURL.String(), "PullSecretToken": c.pullSecretToken, "NodeZeroIP": c.serviceBaseURL.Hostname(), + "AssistedServiceHost": c.serviceBaseURL.Host, "ClusterCreateParamsJSON": c.createClusterParamsJSON, "InfraEnvCreateParamsJSON": c.createInfraEnvParamsJSON, "APIVIP": c.apiVip, From 258303c5ead1901f57624fba13b4c147742b96fc Mon Sep 17 00:00:00 2001 From: Bob Fournier Date: Thu, 14 Apr 2022 19:54:05 -0400 Subject: [PATCH 055/274] AGENT-119: Read in multiple NmStateConfig definitions from one yaml file Provides the ability to set static IPs on all hosts. This uses the k8s/apimachinery yaml package as it provides a YAMLtoJSON decoder. --- pkg/agent/manifests/manifests.go | 42 ++++++++++++++++++- pkg/agent/manifests/nmstateconfig.go | 61 +++++++++++++++++++--------- 2 files changed, 82 insertions(+), 21 deletions(-) diff --git a/pkg/agent/manifests/manifests.go b/pkg/agent/manifests/manifests.go index c2951cf2c2..95bb444ea1 100644 --- a/pkg/agent/manifests/manifests.go +++ b/pkg/agent/manifests/manifests.go @@ -1,11 +1,14 @@ package manifests import ( + "bytes" "fmt" + "github.com/pkg/errors" + "io" "os" "path/filepath" - "sigs.k8s.io/yaml" + "k8s.io/apimachinery/pkg/util/yaml" ) // Read a Yaml file and unmarshal the contents @@ -22,3 +25,40 @@ func GetFileData(fileName string, output interface{}) error { return err } + +type DecodeFormat interface { + NewDecodedYaml(decoder *yaml.YAMLToJSONDecoder) (interface{}, error) +} + +// Read a YAML file containing multiple YAML definitions of the same format +// Each specific format must be of type DecodeFormat +func GetFileMultipleYamls(filename string, decoder DecodeFormat) ([]interface{}, error) { + + // TODO - this location must be defined by user input via cobra flags + path := filepath.Join("./manifests", filename) + + contents, err := os.ReadFile(path) + if err != nil { + err = fmt.Errorf("Error reading file %s: %w", path, err) + return nil, err + } + + r := bytes.NewReader(contents) + dec := yaml.NewYAMLToJSONDecoder(r) + + var outputList []interface{} + for { + decodedData, err := decoder.NewDecodedYaml(dec) + if errors.Is(err, io.EOF) { + break + } + if err != nil { + err = fmt.Errorf("Error reading multiple yamls in file %s: %w", path, err) + return nil, err + } + + outputList = append(outputList, decodedData) + } + + return outputList, nil +} diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index 7fe07c787a..f420ff1834 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -12,7 +12,7 @@ import ( "github.com/openshift/assisted-service/pkg/staticnetworkconfig" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "sigs.k8s.io/yaml" + "k8s.io/apimachinery/pkg/util/yaml" ) type NMStateConfig struct { @@ -30,14 +30,31 @@ type NMStateConfig struct { } `yaml:"interfaces,omitempty"` } -func getNMStateConfig() (aiv1beta1.NMStateConfig, error) { - var nmStateConfig aiv1beta1.NMStateConfig - if err := GetFileData("nmstateconfig.yaml", &nmStateConfig); err != nil { - fmt.Println(err.Error()) - os.Exit(1) +type NMStateConfigYamlDecoder int + +func (d *NMStateConfigYamlDecoder) NewDecodedYaml(yamlDecoder *yaml.YAMLToJSONDecoder) (interface{}, error) { + decodedData := new(aiv1beta1.NMStateConfig) + err := yamlDecoder.Decode(&decodedData) + + return decodedData, err +} + +// Get a list of NMStateConfig objects from the manifest file +func getNMStateConfig() ([]aiv1beta1.NMStateConfig, error) { + var decoder NMStateConfigYamlDecoder + yamlList, err := GetFileMultipleYamls("nmstateconfig.yaml", &decoder) + + var nmStateConfigList []aiv1beta1.NMStateConfig + for i := range yamlList { + nmStateConfigList = append(nmStateConfigList, *yamlList[i].(*aiv1beta1.NMStateConfig)) } - return nmStateConfig, nil + if err != nil { + err = fmt.Errorf("Error reading nmstateconfig file %w", err) + return nil, err + } + + return nmStateConfigList, nil } func validateNMStateConfigAndInfraEnv(nmStateConfig aiv1beta1.NMStateConfig, infraEnv aiv1beta1.InfraEnv) error { @@ -98,36 +115,40 @@ func GetNMIgnitionFiles(staticNetworkConfig []*models.HostStaticNetworkConfig) ( func ProcessNMStateConfig(infraEnv aiv1beta1.InfraEnv) ([]*models.HostStaticNetworkConfig, error) { - nmStateConfig, err := getNMStateConfig() + nmStateConfigList, err := getNMStateConfig() if err != nil { - fmt.Println("A nmstateconfig file has not been provided, no static addresses set in iso") - return nil, nil - } - - err = validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) - if err != nil { + err = fmt.Errorf("Error with nmstateconfig file: %w", err) return nil, err } var staticNetworkConfig []*models.HostStaticNetworkConfig - staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ - MacInterfaceMap: buildMacInterfaceMap(nmStateConfig), - NetworkYaml: string(nmStateConfig.Spec.NetConfig.Raw), - }) + for _, nmStateConfig := range nmStateConfigList { + + err = validateNMStateConfigAndInfraEnv(nmStateConfig, infraEnv) + if err != nil { + return nil, err + } + + staticNetworkConfig = append(staticNetworkConfig, &models.HostStaticNetworkConfig{ + MacInterfaceMap: buildMacInterfaceMap(nmStateConfig), + NetworkYaml: string(nmStateConfig.Spec.NetConfig.Raw), + }) + } return staticNetworkConfig, nil } // Retrieve the first IP from the user provided NMStateConfig yaml file to set as node0 IP func GetNodeZeroIP() string { - config, err := getNMStateConfig() + configList, err := getNMStateConfig() if err != nil { fmt.Println(err.Error()) os.Exit(1) } var nmconfig NMStateConfig - err = yaml.Unmarshal(config.Spec.NetConfig.Raw, &nmconfig) + // Use entry for first host + err = yaml.Unmarshal(configList[0].Spec.NetConfig.Raw, &nmconfig) if err != nil { fmt.Println(err.Error()) os.Exit(1) From efae947c8bb12791a9ff393f712e90d2a9d5297c Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Thu, 7 Apr 2022 21:46:06 -0400 Subject: [PATCH 056/274] AGENT-66: Use logging --- pkg/agent/imagebuilder/content.go | 7 ++++--- pkg/agent/manifests/clusterdeployment.go | 8 ++++---- pkg/agent/manifests/infraenv.go | 4 ++-- pkg/agent/manifests/nmstateconfig.go | 4 +--- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 647c3c8915..998630541b 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -18,6 +18,7 @@ import ( "github.com/openshift-agent-team/fleeting/pkg/agent/manifests" "github.com/openshift/assisted-service/models" + "github.com/sirupsen/logrus" ) const NMCONNECTIONS_DIR = "/etc/assisted/network" @@ -48,17 +49,17 @@ func New() *ConfigBuilder { clusterParams := manifests.CreateClusterParams() clusterJSON, err := json.Marshal(clusterParams) if err != nil { - fmt.Errorf("Error marshalling cluster params into json: %w", err) + logrus.Errorf("Error marshalling cluster params into json: %w", err) } infraEnvParams, err := manifests.CreateInfraEnvParams() if err != nil { - fmt.Errorf("Error building infra env params: %w", err) + logrus.Errorf("Error building infra env params: %w", err) } infraEnvJSON, err := json.Marshal(infraEnvParams) if err != nil { - fmt.Errorf("Error marshal infra env params into json: %w", err) + logrus.Errorf("Error marshal infra env params into json: %w", err) } aci := manifests.GetAgentClusterInstall() diff --git a/pkg/agent/manifests/clusterdeployment.go b/pkg/agent/manifests/clusterdeployment.go index 64671800ae..96383b0a68 100644 --- a/pkg/agent/manifests/clusterdeployment.go +++ b/pkg/agent/manifests/clusterdeployment.go @@ -1,13 +1,13 @@ package manifests import ( - "fmt" "os" "github.com/go-openapi/swag" hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1" "github.com/openshift/assisted-service/models" hivev1 "github.com/openshift/hive/apis/hive/v1" + "github.com/sirupsen/logrus" "github.com/thoas/go-funk" corev1 "k8s.io/api/core/v1" ) @@ -15,7 +15,7 @@ import ( func GetPullSecret() string { var secret corev1.Secret if err := GetFileData("pull-secret.yaml", &secret); err != nil { - fmt.Println(err.Error()) + logrus.Println(err.Error()) os.Exit(1) } @@ -26,7 +26,7 @@ func GetPullSecret() string { func getClusterDeployment() hivev1.ClusterDeployment { var cd hivev1.ClusterDeployment if err := GetFileData("cluster-deployment.yaml", &cd); err != nil { - fmt.Println(err.Error()) + logrus.Println(err.Error()) os.Exit(1) } @@ -36,7 +36,7 @@ func getClusterDeployment() hivev1.ClusterDeployment { func GetAgentClusterInstall() hiveext.AgentClusterInstall { var aci hiveext.AgentClusterInstall if err := GetFileData("agent-cluster-install.yaml", &aci); err != nil { - fmt.Println(err.Error()) + logrus.Println(err.Error()) os.Exit(1) } diff --git a/pkg/agent/manifests/infraenv.go b/pkg/agent/manifests/infraenv.go index 481793aa9f..476112a55d 100644 --- a/pkg/agent/manifests/infraenv.go +++ b/pkg/agent/manifests/infraenv.go @@ -1,7 +1,6 @@ package manifests import ( - "fmt" "os" "strings" @@ -9,12 +8,13 @@ import ( "github.com/go-openapi/swag" aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" "github.com/openshift/assisted-service/models" + "github.com/sirupsen/logrus" ) func getInfraEnv() aiv1beta1.InfraEnv { var infraEnv aiv1beta1.InfraEnv if err := GetFileData("infraenv.yaml", &infraEnv); err != nil { - fmt.Println(err.Error()) + logrus.Println(err.Error()) os.Exit(1) } diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index f420ff1834..55d3a610dd 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -76,9 +76,7 @@ func validateNMStateConfigAndInfraEnv(nmStateConfig aiv1beta1.NMStateConfig, inf func buildMacInterfaceMap(nmStateConfig aiv1beta1.NMStateConfig) models.MacInterfaceMap { macInterfaceMap := make(models.MacInterfaceMap, 0, len(nmStateConfig.Spec.Interfaces)) for _, cfg := range nmStateConfig.Spec.Interfaces { - // ToDo: Use logging - // fmt.Println("adding MAC interface map to host static network config - Name: %s, MacAddress: %s ,", - // cfg.Name, cfg.MacAddress) + logrus.Println("adding MAC interface map to host static network config - Name: ", cfg.Name, " MacAddress:", cfg.MacAddress) macInterfaceMap = append(macInterfaceMap, &models.MacInterfaceMapItems0{ MacAddress: cfg.MacAddress, LogicalNicName: cfg.Name, From 35782692c0163d14b91714bc53df8351687363ef Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Wed, 13 Apr 2022 11:24:10 -0400 Subject: [PATCH 057/274] AGENT-118: Unit tests for retrieving node0 IP --- go.mod | 5 +- pkg/agent/imagebuilder/content.go | 5 +- pkg/agent/manifests/nmstateconfig.go | 26 ++++-- pkg/agent/manifests/nmstateconfig_test.go | 102 ++++++++++++++++++++++ 4 files changed, 126 insertions(+), 12 deletions(-) create mode 100644 pkg/agent/manifests/nmstateconfig_test.go diff --git a/go.mod b/go.mod index 265bf3a4b4..f84f3d6bdc 100644 --- a/go.mod +++ b/go.mod @@ -14,13 +14,14 @@ require ( github.com/openshift/hive/apis v0.0.0-20210506000654-5c038fb05190 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 + github.com/stretchr/testify v1.7.0 github.com/thoas/go-funk v0.9.1 github.com/vincent-petithory/dataurl v1.0.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/api v0.21.1 - k8s.io/apimachinery v0.21.1 // indirect + k8s.io/apimachinery v0.21.1 sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect - sigs.k8s.io/yaml v1.3.0 + sigs.k8s.io/yaml v1.3.0 // indirect ) replace ( diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 998630541b..086acf7860 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -39,7 +39,10 @@ type ConfigBuilder struct { func New() *ConfigBuilder { pullSecret := manifests.GetPullSecret() - nodeZeroIP := manifests.GetNodeZeroIP() + + n := manifests.NewNMConfig() + nodeZeroIP := n.GetNodeZeroIP() + // TODO: needs appropriate value if AUTH_TYPE != none pullSecretToken := getEnv("PULL_SECRET_TOKEN", "") diff --git a/pkg/agent/manifests/nmstateconfig.go b/pkg/agent/manifests/nmstateconfig.go index 55d3a610dd..2e95f69ef4 100644 --- a/pkg/agent/manifests/nmstateconfig.go +++ b/pkg/agent/manifests/nmstateconfig.go @@ -15,6 +15,14 @@ import ( "k8s.io/apimachinery/pkg/util/yaml" ) +type NMConfig struct { + nmConfig func() ([]aiv1beta1.NMStateConfig, error) +} + +func NewNMConfig() NMConfig { + return NMConfig{nmConfig: getNMStateConfig} +} + type NMStateConfig struct { Interfaces []struct { IPV4 struct { @@ -137,28 +145,28 @@ func ProcessNMStateConfig(infraEnv aiv1beta1.InfraEnv) ([]*models.HostStaticNetw } // Retrieve the first IP from the user provided NMStateConfig yaml file to set as node0 IP -func GetNodeZeroIP() string { - configList, err := getNMStateConfig() +func (n NMConfig) GetNodeZeroIP() string { + configList, err := n.nmConfig() if err != nil { fmt.Println(err.Error()) os.Exit(1) } - var nmconfig NMStateConfig + var nmStateConfig NMStateConfig // Use entry for first host - err = yaml.Unmarshal(configList[0].Spec.NetConfig.Raw, &nmconfig) + err = yaml.Unmarshal(configList[0].Spec.NetConfig.Raw, &nmStateConfig) if err != nil { fmt.Println(err.Error()) os.Exit(1) } var nodeZeroIP string - if nmconfig.Interfaces != nil { - if nmconfig.Interfaces[0].IPV4.Address != nil { - nodeZeroIP = nmconfig.Interfaces[0].IPV4.Address[0].IP + if nmStateConfig.Interfaces != nil { + if nmStateConfig.Interfaces[0].IPV4.Address != nil { + nodeZeroIP = nmStateConfig.Interfaces[0].IPV4.Address[0].IP } - if nmconfig.Interfaces[0].IPV6.Address != nil { - nodeZeroIP = nmconfig.Interfaces[0].IPV6.Address[0].IP + if nmStateConfig.Interfaces[0].IPV6.Address != nil { + nodeZeroIP = nmStateConfig.Interfaces[0].IPV6.Address[0].IP } if net.ParseIP(nodeZeroIP) == nil { diff --git a/pkg/agent/manifests/nmstateconfig_test.go b/pkg/agent/manifests/nmstateconfig_test.go new file mode 100644 index 0000000000..a3d49be5f5 --- /dev/null +++ b/pkg/agent/manifests/nmstateconfig_test.go @@ -0,0 +1,102 @@ +package manifests + +import ( + "testing" + + aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" + "github.com/stretchr/testify/assert" +) + +func TestGetNodeZeroIP(t *testing.T) { + tests := []struct { + name string + nmConfig []aiv1beta1.NMStateConfig + expectedIP string + }{ + { + name: "Valid NMStateConfig with only one IPV4 IP address", + nmConfig: func() []aiv1beta1.NMStateConfig { + config := GetDefaultConfig() + config[0].Spec.NetConfig.Raw = []byte(` +interfaces: + - ipv4: + address: + - ip: 192.168.122.2 +`) + return config + }(), + expectedIP: "192.168.122.2", + }, + { + name: "Valid NMStateConfig with only one IPV6 IP address", + nmConfig: func() []aiv1beta1.NMStateConfig { + config := GetDefaultConfig() + config[0].Spec.NetConfig.Raw = []byte(` +interfaces: + - ipv6: + address: + - ip: 2600:1700:c1a0:fe10:96e6:f7ff:fe91:2590 +`) + return config + }(), + expectedIP: "2600:1700:c1a0:fe10:96e6:f7ff:fe91:2590", + }, + { + name: "Valid NMStateConfig with multiple interfaces", + nmConfig: func() []aiv1beta1.NMStateConfig { + config := GetDefaultConfig() + config[0].Spec.NetConfig.Raw = []byte(` +interfaces: + - ipv4: + address: + - ip: 192.168.122.2 + - ipv4: + address: + - ip: 192.168.122.3 +`) + return config + }(), + expectedIP: "192.168.122.2", + }, + { + name: "Valid NMStateConfig with multiple IPV4 IP addresses in a single interface", + nmConfig: func() []aiv1beta1.NMStateConfig { + config := GetDefaultConfig() + config[0].Spec.NetConfig.Raw = []byte(` +interfaces: + - ipv4: + address: + - ip: 192.168.122.2 + - ip: 192.168.122.3 +`) + return config + }(), + expectedIP: "192.168.122.2", + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + n := NMConfig{ + nmConfig: func() ([]aiv1beta1.NMStateConfig, error) { + return test.nmConfig, nil + }, + } + nodeZeroIP := n.GetNodeZeroIP() + assert.Equal(t, nodeZeroIP, test.expectedIP) + + }) + } +} + +func GetDefaultConfig() []aiv1beta1.NMStateConfig { + var nmStateConfigList []aiv1beta1.NMStateConfig + data := aiv1beta1.NMStateConfig{ + Spec: aiv1beta1.NMStateConfigSpec{ + NetConfig: aiv1beta1.NetConfig{ + Raw: []byte(""), + }, + }, + } + nmStateConfigList = append(nmStateConfigList, data) + return nmStateConfigList +} From e192c5ae2db6643b94612c8750f584812972179e Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Fri, 22 Apr 2022 10:25:12 -0400 Subject: [PATCH 058/274] Fix format specifiers leading to makefile error --- pkg/agent/imagebuilder/content.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index 086acf7860..0e17d74107 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -52,17 +52,17 @@ func New() *ConfigBuilder { clusterParams := manifests.CreateClusterParams() clusterJSON, err := json.Marshal(clusterParams) if err != nil { - logrus.Errorf("Error marshalling cluster params into json: %w", err) + logrus.Errorf("Error marshalling cluster params into json: %v", err) } infraEnvParams, err := manifests.CreateInfraEnvParams() if err != nil { - logrus.Errorf("Error building infra env params: %w", err) + logrus.Errorf("Error building infra env params: %v", err) } infraEnvJSON, err := json.Marshal(infraEnvParams) if err != nil { - logrus.Errorf("Error marshal infra env params into json: %w", err) + logrus.Errorf("Error marshal infra env params into json: %v", err) } aci := manifests.GetAgentClusterInstall() From 40338f42ad6c436bee78fa8811726f9ea549dd22 Mon Sep 17 00:00:00 2001 From: Andrea Fasano Date: Tue, 26 Apr 2022 07:10:39 -0400 Subject: [PATCH 059/274] agent: create skeleton commands and folders structure for agent-based installer This patch adds the initial project setup for the agent installer, as described in the OpenShift enhancement openshift/enhancements#1067, to be managed by the agent team --- OWNERS_ALIASES | 18 ++++++++ cmd/openshift-install/agent.go | 21 +++++++++ cmd/openshift-install/agent/OWNERS | 7 +++ cmd/openshift-install/agent/create.go | 60 ++++++++++++++++++++++++++ cmd/openshift-install/agent/waitfor.go | 42 ++++++++++++++++++ cmd/openshift-install/main.go | 1 + pkg/agent/OWNERS | 7 +++ pkg/agent/build_image.go | 23 ++++++++++ pkg/agent/create_manifests.go | 12 ++++++ pkg/agent/wait_for.go | 12 ++++++ 10 files changed, 203 insertions(+) create mode 100644 cmd/openshift-install/agent.go create mode 100644 cmd/openshift-install/agent/OWNERS create mode 100644 cmd/openshift-install/agent/create.go create mode 100644 cmd/openshift-install/agent/waitfor.go create mode 100644 pkg/agent/OWNERS create mode 100644 pkg/agent/build_image.go create mode 100644 pkg/agent/create_manifests.go create mode 100644 pkg/agent/wait_for.go diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 482c55619f..93b48cfe09 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -147,3 +147,21 @@ aliases: - jmarrero - aaradhak - ravanelli + agent-reviewers: + - andfasano + - bfournie + - celebdor + - dhellmann + - lranjbar + - pawanpinjarkar + - rwsu + - zaneb + agent-approvers: + - andfasano + - bfournie + - celebdor + - dhellmann + - lranjbar + - pawanpinjarkar + - rwsu + - zaneb \ No newline at end of file diff --git a/cmd/openshift-install/agent.go b/cmd/openshift-install/agent.go new file mode 100644 index 0000000000..a31ac8af00 --- /dev/null +++ b/cmd/openshift-install/agent.go @@ -0,0 +1,21 @@ +package main + +import ( + "github.com/spf13/cobra" + + "github.com/openshift/installer/cmd/openshift-install/agent" +) + +func newAgentCmd() *cobra.Command { + agentCmd := &cobra.Command{ + Use: "agent", + Short: "Commands for supporting cluster installation using agent installer", + RunE: func(cmd *cobra.Command, args []string) error { + return cmd.Help() + }, + } + + agentCmd.AddCommand(agent.NewCreateCmd()) + agentCmd.AddCommand(agent.NewWaitForCmd()) + return agentCmd +} diff --git a/cmd/openshift-install/agent/OWNERS b/cmd/openshift-install/agent/OWNERS new file mode 100644 index 0000000000..51d22e4bb6 --- /dev/null +++ b/cmd/openshift-install/agent/OWNERS @@ -0,0 +1,7 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md +# This file just uses aliases defined in OWNERS_ALIASES. + +approvers: + - agent-approvers +reviewers: + - agent-reviewers \ No newline at end of file diff --git a/cmd/openshift-install/agent/create.go b/cmd/openshift-install/agent/create.go new file mode 100644 index 0000000000..69bb7035f9 --- /dev/null +++ b/cmd/openshift-install/agent/create.go @@ -0,0 +1,60 @@ +package agent + +import ( + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + + agentcmd "github.com/openshift/installer/pkg/agent" +) + +// NewCreateCmd create the agent commands for generating the manifests and the bootable image. +func NewCreateCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "create", + Short: "Commands for generating agent installer based artifacts", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + return cmd.Help() + }, + } + + cmd.AddCommand(newCreateManifestsCmd()) + cmd.AddCommand(newCreateImageCmd()) + return cmd +} + +func newCreateImageCmd() *cobra.Command { + return &cobra.Command{ + Use: "image", + Short: "Generates a bootable image containing all the information needed to deploy a cluster", + Args: cobra.ExactArgs(0), + Run: func(_ *cobra.Command, _ []string) { + err := runCreateImageCmd() + if err != nil { + logrus.Fatal(err) + } + }, + } +} + +func runCreateImageCmd() error { + return agentcmd.BuildImage() +} + +func newCreateManifestsCmd() *cobra.Command { + return &cobra.Command{ + Use: "manifests", + Short: "Generates intermediate files required by the agent installer", + Args: cobra.ExactArgs(0), + Run: func(_ *cobra.Command, _ []string) { + err := runCreateManifestsCmd() + if err != nil { + logrus.Fatal(err) + } + }, + } +} + +func runCreateManifestsCmd() error { + return agentcmd.CreateManifests() +} diff --git a/cmd/openshift-install/agent/waitfor.go b/cmd/openshift-install/agent/waitfor.go new file mode 100644 index 0000000000..bf82d8b19e --- /dev/null +++ b/cmd/openshift-install/agent/waitfor.go @@ -0,0 +1,42 @@ +package agent + +import ( + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + + agentcmd "github.com/openshift/installer/pkg/agent" +) + +// NewWaitForCmd create the commands for waiting the completion of the agent based cluster installation. +func NewWaitForCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "wait-for", + Short: "Wait for install-time events", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + return cmd.Help() + }, + } + + cmd.AddCommand(newWaitForInstallCompleteCmd()) + return cmd +} + +func newWaitForInstallCompleteCmd() *cobra.Command { + return &cobra.Command{ + Use: "install-complete", + Short: "Wait until the cluster is ready", + Args: cobra.ExactArgs(0), + Run: func(_ *cobra.Command, _ []string) { + err := runWaitForInstallCompleteCmd() + if err != nil { + logrus.Fatal(err) + } + }, + } + +} + +func runWaitForInstallCompleteCmd() error { + return agentcmd.WaitFor() +} diff --git a/cmd/openshift-install/main.go b/cmd/openshift-install/main.go index 44988a5a9d..40fe6d9669 100644 --- a/cmd/openshift-install/main.go +++ b/cmd/openshift-install/main.go @@ -53,6 +53,7 @@ func installerMain() { newCompletionCmd(), newMigrateCmd(), newExplainCmd(), + newAgentCmd(), } { rootCmd.AddCommand(subCmd) } diff --git a/pkg/agent/OWNERS b/pkg/agent/OWNERS new file mode 100644 index 0000000000..51d22e4bb6 --- /dev/null +++ b/pkg/agent/OWNERS @@ -0,0 +1,7 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md +# This file just uses aliases defined in OWNERS_ALIASES. + +approvers: + - agent-approvers +reviewers: + - agent-reviewers \ No newline at end of file diff --git a/pkg/agent/build_image.go b/pkg/agent/build_image.go new file mode 100644 index 0000000000..986f619dab --- /dev/null +++ b/pkg/agent/build_image.go @@ -0,0 +1,23 @@ +package agent + +import ( + "github.com/sirupsen/logrus" +) + +// BuildImage builds the image required by the agent installer. +func BuildImage() error { + + // baseImage, err := isosource.EnsureIso() + // if err != nil { + // return err + // } + + // err = imagebuilder.BuildImage(baseImage) + // if err != nil { + // return err + // } + + logrus.Info("BuildImage command") + + return nil +} diff --git a/pkg/agent/create_manifests.go b/pkg/agent/create_manifests.go new file mode 100644 index 0000000000..9bfa306c0e --- /dev/null +++ b/pkg/agent/create_manifests.go @@ -0,0 +1,12 @@ +package agent + +import ( + "github.com/sirupsen/logrus" +) + +// CreateManifests generates the intermediate files required by the agent installer. +func CreateManifests() error { + logrus.Info("Create manifests command") + + return nil +} diff --git a/pkg/agent/wait_for.go b/pkg/agent/wait_for.go new file mode 100644 index 0000000000..1cc734604a --- /dev/null +++ b/pkg/agent/wait_for.go @@ -0,0 +1,12 @@ +package agent + +import ( + "github.com/sirupsen/logrus" +) + +// WaitFor wait for the installation complete triggered by the agent installer. +func WaitFor() error { + logrus.Info("WaitFor command") + + return nil +} From 08fb960631073f94398048b59fff2022f9921a5b Mon Sep 17 00:00:00 2001 From: Andrea Fasano Date: Wed, 27 Apr 2022 12:38:45 -0400 Subject: [PATCH 060/274] agent: adding OWNERS for agent data and asset folders --- data/data/agent/OWNERS | 7 +++++++ pkg/asset/agent/OWNERS | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 data/data/agent/OWNERS create mode 100644 pkg/asset/agent/OWNERS diff --git a/data/data/agent/OWNERS b/data/data/agent/OWNERS new file mode 100644 index 0000000000..51d22e4bb6 --- /dev/null +++ b/data/data/agent/OWNERS @@ -0,0 +1,7 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md +# This file just uses aliases defined in OWNERS_ALIASES. + +approvers: + - agent-approvers +reviewers: + - agent-reviewers \ No newline at end of file diff --git a/pkg/asset/agent/OWNERS b/pkg/asset/agent/OWNERS new file mode 100644 index 0000000000..51d22e4bb6 --- /dev/null +++ b/pkg/asset/agent/OWNERS @@ -0,0 +1,7 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md +# This file just uses aliases defined in OWNERS_ALIASES. + +approvers: + - agent-approvers +reviewers: + - agent-reviewers \ No newline at end of file From 40159d195f5cef016bb88fc858549a9e4697c5fd Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 7 Apr 2022 16:34:42 -0400 Subject: [PATCH 061/274] Don't hard-code protocol Allow us to switch between http/https in a single place. --- .../files/usr/local/bin/start-cluster-installation.sh.template | 2 +- .../local/share/assisted-service/assisted-service.env.template | 2 +- .../files/usr/local/share/assisted-service/images.env.template | 2 +- pkg/agent/imagebuilder/content.go | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template index 0db7e587ef..dc31d08441 100644 --- a/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template +++ b/data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template @@ -5,7 +5,7 @@ source common.sh wait_for_assisted_service -BASE_URL="http://{{.AssistedServiceHost}}/api/assisted-install/v2" +BASE_URL="{{.ServiceBaseURL}}api/assisted-install/v2" # Get cluster id cluster_id=$(curl -s -S "${BASE_URL}/clusters" | jq -r .[].id) diff --git a/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template b/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template index 4cd4cc4a19..7d2072ce7e 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template +++ b/data/data/agent/files/usr/local/share/assisted-service/assisted-service.env.template @@ -14,5 +14,5 @@ IPV6_SUPPORT=true NTP_DEFAULT_SERVER= PUBLIC_CONTAINER_REGISTRIES=quay.io RELEASE_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"quay.io/openshift-release-dev/ocp-release:4.10.0-rc.1-x86_64","version":"4.10.0-rc.1"}] -SERVICE_BASE_URL=http://{{.AssistedServiceHost}} +SERVICE_BASE_URL={{.ServiceBaseURL}} STORAGE=filesystem diff --git a/data/data/agent/files/usr/local/share/assisted-service/images.env.template b/data/data/agent/files/usr/local/share/assisted-service/images.env.template index 4a7e801fd6..35fb40374a 100644 --- a/data/data/agent/files/usr/local/share/assisted-service/images.env.template +++ b/data/data/agent/files/usr/local/share/assisted-service/images.env.template @@ -1,3 +1,3 @@ ASSISTED_SERVICE_HOST={{.AssistedServiceHost}} -ASSISTED_SERVICE_SCHEME=http +ASSISTED_SERVICE_SCHEME={{.ServiceProtocol}} OS_IMAGES=[{"openshift_version":"4.10","cpu_architecture":"x86_64","url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso","rootfs_url":"https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.10.0-rc.1/rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img","version":"410.84.202201251210-0"}] diff --git a/pkg/agent/imagebuilder/content.go b/pkg/agent/imagebuilder/content.go index e2e0015b13..ff71e34a26 100644 --- a/pkg/agent/imagebuilder/content.go +++ b/pkg/agent/imagebuilder/content.go @@ -250,6 +250,7 @@ func (c ConfigBuilder) getUnits() ([]igntypes.Unit, error) { func (c ConfigBuilder) templateString(name string, text string) (string, error) { params := map[string]interface{}{ + "ServiceProtocol": c.serviceBaseURL.Scheme, "ServiceBaseURL": c.serviceBaseURL.String(), "PullSecretToken": c.pullSecretToken, "NodeZeroIP": c.serviceBaseURL.Hostname(), From fcba8e9247091fc92dcdc7ec9ef0ff196a9d3d6b Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 25 Apr 2022 20:21:49 -0400 Subject: [PATCH 062/274] Update dependencies go mod tidy && go mod vendor --- go.mod | 43 +- go.sum | 414 +- .../cavaliercoder/go-cpio/.gitignore | 3 + .../cavaliercoder/go-cpio/.travis.yml | 10 + .../github.com/cavaliercoder/go-cpio/LICENSE | 26 + .../github.com/cavaliercoder/go-cpio/Makefile | 18 + .../cavaliercoder/go-cpio/README.md | 62 + .../github.com/cavaliercoder/go-cpio/cpio.go | 8 + .../cavaliercoder/go-cpio/fileinfo.go | 75 + .../github.com/cavaliercoder/go-cpio/fuzz.go | 35 + .../github.com/cavaliercoder/go-cpio/hash.go | 45 + .../cavaliercoder/go-cpio/header.go | 153 + .../cavaliercoder/go-cpio/reader.go | 72 + .../github.com/cavaliercoder/go-cpio/svr4.go | 152 + .../cavaliercoder/go-cpio/writer.go | 128 + .../github.com/cespare/xxhash/v2/.travis.yml | 8 - vendor/github.com/cespare/xxhash/v2/README.md | 6 +- vendor/github.com/cespare/xxhash/v2/xxhash.go | 1 - .../cespare/xxhash/v2/xxhash_amd64.s | 62 +- .../cespare/xxhash/v2/xxhash_unsafe.go | 55 +- .../v2/config/shared/errors/errors.go | 6 +- .../coreos/ignition/v2/config/util/config.go | 45 + .../coreos/ignition/v2/config/util/helpers.go | 8 + .../ignition/v2/config/util/reflection.go | 36 + .../ignition/v2/config/v3_2/types/custom.go | 4 - .../ignition/v2/config/v3_2/types/disk.go | 3 +- .../ignition/v2/config/v3_2/types/file.go | 3 +- .../v2/config/v3_2/types/filesystem.go | 2 +- .../ignition/v2/config/v3_2/types/luks.go | 2 +- .../ignition/v2/config/v3_2/types/node.go | 3 +- .../v2/config/v3_2/types/partition.go | 5 +- .../ignition/v2/config/v3_2/types/raid.go | 3 + .../ignition/v2/config/v3_2/types/storage.go | 3 +- .../ignition/v2/config/v3_2/types/unit.go | 4 +- .../github.com/coreos/vcontext/path/path.go | 9 + .../coreos/vcontext/report/report.go | 2 +- vendor/github.com/diskfs/go-diskfs/.gitignore | 1 + vendor/github.com/diskfs/go-diskfs/LICENSE | 21 + vendor/github.com/diskfs/go-diskfs/Makefile | 78 + vendor/github.com/diskfs/go-diskfs/README.md | 158 + .../github.com/diskfs/go-diskfs/disk/disk.go | 246 + .../diskfs/go-diskfs/disk/disk_unix.go | 26 + .../diskfs/go-diskfs/disk/disk_windows.go | 10 + vendor/github.com/diskfs/go-diskfs/diskfs.go | 312 + .../diskfs/go-diskfs/diskfs_unix.go | 28 + .../diskfs/go-diskfs/diskfs_windows.go | 11 + .../go-diskfs/filesystem/fat32/directory.go | 94 + .../filesystem/fat32/directoryentry.go | 502 + .../diskfs/go-diskfs/filesystem/fat32/doc.go | 9 + .../go-diskfs/filesystem/fat32/dos20bpb.go | 55 + .../go-diskfs/filesystem/fat32/dos331bpb.go | 63 + .../go-diskfs/filesystem/fat32/dos71bpb.go | 184 + .../go-diskfs/filesystem/fat32/fat32.go | 927 + .../diskfs/go-diskfs/filesystem/fat32/file.go | 202 + .../go-diskfs/filesystem/fat32/fileinfo.go | 56 + .../filesystem/fat32/fsinfosector.go | 81 + .../filesystem/fat32/msdosbootsector.go | 101 + .../go-diskfs/filesystem/fat32/table.go | 86 + .../diskfs/go-diskfs/filesystem/fat32/util.go | 44 + .../diskfs/go-diskfs/filesystem/file.go | 11 + .../diskfs/go-diskfs/filesystem/filesystem.go | 34 + .../go-diskfs/filesystem/iso9660/directory.go | 53 + .../filesystem/iso9660/directoryentry.go | 600 + .../directoryentrysystemuseextension.go | 558 + .../go-diskfs/filesystem/iso9660/doc.go | 10 + .../go-diskfs/filesystem/iso9660/eltorito.go | 184 + .../go-diskfs/filesystem/iso9660/file.go | 95 + .../go-diskfs/filesystem/iso9660/finalize.go | 896 + .../go-diskfs/filesystem/iso9660/iso9660.go | 496 + .../go-diskfs/filesystem/iso9660/pathtable.go | 159 + .../go-diskfs/filesystem/iso9660/rockridge.go | 1156 + .../filesystem/iso9660/statt_others.go | 18 + .../filesystem/iso9660/statt_windows.go | 7 + .../go-diskfs/filesystem/iso9660/util.go | 80 + .../filesystem/iso9660/volume_descriptor.go | 502 + .../filesystem/squashfs/compressor.go | 351 + .../filesystem/squashfs/directory.go | 192 + .../filesystem/squashfs/directoryentry.go | 115 + .../go-diskfs/filesystem/squashfs/doc.go | 6 + .../go-diskfs/filesystem/squashfs/file.go | 141 + .../go-diskfs/filesystem/squashfs/finalize.go | 1495 ++ .../filesystem/squashfs/finalize_unix.go | 30 + .../filesystem/squashfs/finalize_windows.go | 14 + .../filesystem/squashfs/finalizefileinfo.go | 79 + .../go-diskfs/filesystem/squashfs/fragment.go | 51 + .../go-diskfs/filesystem/squashfs/inode.go | 905 + .../filesystem/squashfs/metadatablock.go | 129 + .../go-diskfs/filesystem/squashfs/squashfs.go | 770 + .../filesystem/squashfs/superblock.go | 229 + .../go-diskfs/filesystem/squashfs/uidgid.go | 15 + .../go-diskfs/filesystem/squashfs/util.go | 43 + .../go-diskfs/filesystem/squashfs/xattr.go | 80 + .../diskfs/go-diskfs/partition/gpt/common.go | 17 + .../diskfs/go-diskfs/partition/gpt/doc.go | 26 + .../go-diskfs/partition/gpt/partiton.go | 280 + .../diskfs/go-diskfs/partition/gpt/table.go | 527 + .../diskfs/go-diskfs/partition/gpt/types.go | 28 + .../diskfs/go-diskfs/partition/mbr/doc.go | 26 + .../go-diskfs/partition/mbr/partiton.go | 203 + .../diskfs/go-diskfs/partition/mbr/table.go | 184 + .../diskfs/go-diskfs/partition/mbr/types.go | 33 + .../go-diskfs/partition/part/partition.go | 15 + .../diskfs/go-diskfs/partition/partition.go | 26 + .../diskfs/go-diskfs/partition/table.go | 13 + .../github.com/diskfs/go-diskfs/util/file.go | 13 + .../diskfs/go-diskfs/util/version.go | 6 + vendor/github.com/google/uuid/null.go | 118 + vendor/github.com/google/uuid/uuid.go | 45 +- vendor/github.com/google/uuid/version4.go | 27 +- vendor/github.com/hashicorp/errwrap/LICENSE | 354 + vendor/github.com/hashicorp/errwrap/README.md | 89 + .../github.com/hashicorp/errwrap/errwrap.go | 169 + .../hashicorp/go-multierror/LICENSE | 353 + .../hashicorp/go-multierror/Makefile | 31 + .../hashicorp/go-multierror/README.md | 150 + .../hashicorp/go-multierror/append.go | 43 + .../hashicorp/go-multierror/flatten.go | 26 + .../hashicorp/go-multierror/format.go | 27 + .../hashicorp/go-multierror/group.go | 38 + .../hashicorp/go-multierror/multierror.go | 121 + .../hashicorp/go-multierror/prefix.go | 37 + .../hashicorp/go-multierror/sort.go | 16 + vendor/github.com/jinzhu/inflection/LICENSE | 21 + vendor/github.com/jinzhu/inflection/README.md | 55 + .../jinzhu/inflection/inflections.go | 273 + .../github.com/jinzhu/inflection/wercker.yml | 23 + vendor/github.com/jinzhu/now/Guardfile | 3 + vendor/github.com/jinzhu/now/License | 21 + vendor/github.com/jinzhu/now/README.md | 131 + vendor/github.com/jinzhu/now/main.go | 194 + vendor/github.com/jinzhu/now/now.go | 212 + vendor/github.com/jinzhu/now/time.go | 9 + vendor/github.com/jinzhu/now/wercker.yml | 23 + .../image-spec/specs-go/v1/index.go | 3 + .../image-spec/specs-go/v1/manifest.go | 3 + .../image-spec/specs-go/v1/mediatype.go | 9 - .../image-spec/specs-go/version.go | 4 +- .../openshift/assisted-image-service/LICENSE | 201 + .../pkg/isoeditor/ignition.go | 41 + .../pkg/isoeditor/initramfs.go | 26 + .../pkg/isoeditor/isoutil.go | 267 + .../pkg/isoeditor/mock_editor.go | 48 + .../pkg/isoeditor/rhcos.go | 147 + .../pkg/isoeditor/stream.go | 66 + .../pkg/overlay/overlay.go | 157 + .../openshift/assisted-service/LICENSE | 201 + .../api/common/common_types.go | 18 + .../api/common/zz_generated.deepcopy.go | 86 + .../v1beta1/agentclusterinstall_types.go | 379 + .../v1beta1/groupversion_info.go | 41 + .../v1beta1/zz_generated.deepcopy.go | 384 + .../api/v1beta1/agent_types.go | 285 + .../api/v1beta1/agentserviceconfig_types.go | 172 + .../api/v1beta1/groupversion_info.go | 41 + .../api/v1beta1/infraenv_types.go | 156 + .../api/v1beta1/nmstate_config_types.go | 86 + .../api/v1beta1/nmstate_util.go | 36 + .../api/v1beta1/zz_generated.deepcopy.go | 872 + .../models/add_hosts_cluster_create_params.go | 127 + .../models/api_vip_connectivity_request.go | 80 + .../models/api_vip_connectivity_response.go | 53 + .../models/bind_host_params.go | 76 + .../openshift/assisted-service/models/boot.go | 53 + .../assisted-service/models/cluster.go | 1418 ++ .../models/cluster_create_params.go | 768 + .../models/cluster_default_config.go | 125 + .../models/cluster_host_requirements.go | 229 + .../cluster_host_requirements_details.go | 68 + .../models/cluster_host_requirements_list.go | 73 + .../assisted-service/models/cluster_list.go | 73 + .../models/cluster_network.go | 146 + .../models/cluster_progress_info.go | 59 + .../models/cluster_update_params.go | 1299 ++ .../models/cluster_validation_id.go | 125 + .../models/completion_params.go | 74 + .../models/connectivity_check_host.go | 137 + .../models/connectivity_check_nic.go | 56 + .../models/connectivity_check_params.go | 73 + .../models/connectivity_remote_host.go | 194 + .../models/connectivity_report.go | 116 + .../models/container_image_availability.go | 112 + .../container_image_availability_request.go | 74 + .../container_image_availability_response.go | 119 + .../container_image_availability_result.go | 74 + .../openshift/assisted-service/models/cpu.go | 62 + .../models/create_manifest_params.go | 144 + .../assisted-service/models/credentials.go | 56 + .../models/dhcp_allocation_request.go | 121 + .../models/dhcp_allocation_response.go | 104 + .../models/discovery_ignition_params.go | 50 + .../openshift/assisted-service/models/disk.go | 234 + .../models/disk_config_params.go | 118 + .../models/disk_encryption.go | 165 + .../assisted-service/models/disk_info.go | 128 + .../assisted-service/models/disk_role.go | 74 + .../assisted-service/models/disk_speed.go | 56 + .../models/disk_speed_check_request.go | 71 + .../models/disk_speed_check_response.go | 53 + .../models/domain_resolution_request.go | 175 + .../models/domain_resolution_response.go | 221 + .../assisted-service/models/error.go | 182 + .../assisted-service/models/event.go | 288 + .../assisted-service/models/event_list.go | 73 + .../models/feature_support_level.go | 308 + .../models/feature_support_levels.go | 73 + .../models/free_addresses_list.go | 43 + .../models/free_addresses_request.go | 43 + .../models/free_network_addresses.go | 98 + .../models/free_networks_addresses.go | 73 + .../openshift/assisted-service/models/gpu.go | 62 + .../openshift/assisted-service/models/host.go | 784 + .../models/host_create_params.go | 79 + .../models/host_ignition_params.go | 50 + .../assisted-service/models/host_list.go | 73 + .../assisted-service/models/host_network.go | 81 + .../assisted-service/models/host_progress.go | 103 + .../models/host_progress_info.go | 147 + .../models/host_registration_response.go | 204 + .../assisted-service/models/host_role.go | 80 + .../models/host_role_update_params.go | 77 + .../assisted-service/models/host_stage.go | 104 + .../models/host_static_network_config.go | 103 + .../models/host_type_hardware_requirements.go | 107 + ...host_type_hardware_requirements_wrapper.go | 150 + .../models/host_update_params.go | 180 + .../models/host_validation_id.go | 155 + .../models/ignition_endpoint.go | 53 + .../models/image_create_params.go | 161 + .../assisted-service/models/image_info.go | 174 + .../assisted-service/models/image_type.go | 74 + .../models/import_cluster_params.go | 113 + .../assisted-service/models/infra_env.go | 404 + .../models/infra_env_create_params.go | 274 + .../models/infra_env_image_url.go | 77 + .../assisted-service/models/infra_env_list.go | 73 + .../models/infra_env_update_params.go | 216 + .../assisted-service/models/infra_error.go | 98 + .../models/ingress_cert_params.go | 27 + .../models/installer_args_params.go | 51 + .../assisted-service/models/interface.go | 83 + .../assisted-service/models/inventory.go | 538 + .../assisted-service/models/io_perf.go | 50 + .../models/l2_connectivity.go | 62 + .../models/l3_connectivity.go | 62 + .../models/list_managed_domains.go | 73 + .../assisted-service/models/list_manifests.go | 73 + .../assisted-service/models/list_versions.go | 105 + .../models/logs_progress_params.go | 111 + .../assisted-service/models/logs_state.go | 83 + .../assisted-service/models/logs_type.go | 80 + .../models/mac_interface_map.go | 136 + .../models/machine_network.go | 121 + .../assisted-service/models/managed_domain.go | 105 + .../assisted-service/models/manifest.go | 108 + .../assisted-service/models/memory.go | 106 + .../assisted-service/models/memory_method.go | 77 + .../models/monitored_operator.go | 201 + .../models/monitored_operators_list.go | 73 + .../assisted-service/models/ntp_source.go | 103 + .../models/ntp_synchronization_request.go | 71 + .../models/ntp_synchronization_response.go | 116 + .../models/openshift_version.go | 132 + .../models/openshift_versions.go | 62 + .../models/operator_create_params.go | 53 + .../models/operator_hardware_requirements.go | 110 + .../models/operator_host_requirements.go | 107 + .../models/operator_monitor_report.go | 106 + .../models/operator_properties.go | 73 + .../models/operator_property.go | 126 + .../models/operator_status.go | 77 + .../assisted-service/models/operator_type.go | 74 + .../assisted-service/models/os_image.go | 139 + .../assisted-service/models/os_images.go | 73 + .../assisted-service/models/ovirt_platform.go | 149 + .../assisted-service/models/platform.go | 157 + .../assisted-service/models/platform_type.go | 80 + .../models/preflight_hardware_requirements.go | 162 + .../assisted-service/models/presigned.go | 71 + .../assisted-service/models/proxy.go | 60 + .../assisted-service/models/release_image.go | 179 + .../assisted-service/models/release_images.go | 73 + .../assisted-service/models/route.go | 59 + .../models/service_network.go | 121 + .../assisted-service/models/source_state.go | 86 + .../openshift/assisted-service/models/step.go | 109 + .../assisted-service/models/step_reply.go | 112 + .../assisted-service/models/step_type.go | 104 + .../assisted-service/models/steps.go | 171 + .../assisted-service/models/steps_reply.go | 73 + .../assisted-service/models/subnet.go | 38 + .../assisted-service/models/system_vendor.go | 59 + .../assisted-service/models/usage.go | 56 + .../models/v2_cluster_update_params.go | 720 + .../models/versioned_host_requirements.go | 199 + .../assisted-service/models/versions.go | 27 + .../assisted-service/pkg/executer/executer.go | 62 + .../pkg/executer/mock_executer.go | 93 + .../pkg/staticnetworkconfig/generator.go | 246 + .../pkg/staticnetworkconfig/mock_generator.go | 80 + .../openshift/custom-resource-status/LICENSE | 201 + .../conditions/v1/conditions.go | 104 + .../conditions/v1/doc.go | 9 + .../conditions/v1/types.go | 51 + .../conditions/v1/zz_generated.deepcopy.go | 23 + vendor/github.com/openshift/hive/apis/LICENSE | 190 + .../openshift/hive/apis/hive/v1/agent/doc.go | 4 + .../hive/apis/hive/v1/agent/platform.go | 12 + .../hive/v1/agent/zz_generated.deepcopy.go | 22 + .../openshift/hive/apis/hive/v1/aws/doc.go | 3 + .../hive/apis/hive/v1/aws/machinepool.go | 44 + .../hive/apis/hive/v1/aws/platform.go | 69 + .../apis/hive/v1/aws/zz_generated.deepcopy.go | 194 + .../openshift/hive/apis/hive/v1/azure/doc.go | 4 + .../hive/apis/hive/v1/azure/machinepool.go | 41 + .../hive/apis/hive/v1/azure/metadata.go | 6 + .../hive/apis/hive/v1/azure/platform.go | 28 + .../hive/v1/azure/zz_generated.deepcopy.go | 76 + .../hive/apis/hive/v1/baremetal/doc.go | 4 + .../hive/apis/hive/v1/baremetal/platform.go | 11 + .../v1/baremetal/zz_generated.deepcopy.go | 22 + .../hive/apis/hive/v1/checkpoint_types.go | 55 + .../hive/apis/hive/v1/clusterclaim_types.go | 105 + .../apis/hive/v1/clusterdeployment_types.go | 646 + .../apis/hive/v1/clusterdeprovision_types.go | 174 + .../apis/hive/v1/clusterimageset_types.go | 46 + .../apis/hive/v1/clusterinstall_conditions.go | 46 + .../hive/apis/hive/v1/clusterpool_types.go | 166 + .../apis/hive/v1/clusterprovision_types.go | 142 + .../apis/hive/v1/clusterrelocate_types.go | 56 + .../hive/apis/hive/v1/clusterstate_types.go | 59 + .../hive/apis/hive/v1/dnszone_types.go | 210 + .../openshift/hive/apis/hive/v1/doc.go | 7 + .../hive/apis/hive/v1/gcp/clouduid.go | 13 + .../openshift/hive/apis/hive/v1/gcp/doc.go | 4 + .../hive/apis/hive/v1/gcp/machinepools.go | 74 + .../hive/apis/hive/v1/gcp/metadata.go | 7 + .../hive/apis/hive/v1/gcp/platform.go | 16 + .../apis/hive/v1/gcp/zz_generated.deepcopy.go | 118 + .../hive/apis/hive/v1/hiveconfig_types.go | 491 + .../hive/apis/hive/v1/machinepool_types.go | 200 + .../hive/v1/machinepoolnamelease_types.go | 46 + .../hive/apis/hive/v1/metaruntimeobject.go | 12 + .../hive/apis/hive/v1/openstack/doc.go | 4 + .../apis/hive/v1/openstack/machinepools.go | 46 + .../hive/apis/hive/v1/openstack/platform.go | 42 + .../v1/openstack/zz_generated.deepcopy.go | 68 + .../openshift/hive/apis/hive/v1/ovirt/doc.go | 4 + .../hive/apis/hive/v1/ovirt/machinepool.go | 61 + .../hive/apis/hive/v1/ovirt/platform.go | 22 + .../hive/v1/ovirt/zz_generated.deepcopy.go | 81 + .../openshift/hive/apis/hive/v1/register.go | 36 + .../hive/v1/syncidentityprovider_types.go | 98 + .../hive/apis/hive/v1/syncset_types.go | 326 + .../hive/apis/hive/v1/vsphere/doc.go | 3 + .../hive/apis/hive/v1/vsphere/machinepools.go | 24 + .../hive/apis/hive/v1/vsphere/platform.go | 35 + .../hive/v1/vsphere/zz_generated.deepcopy.go | 56 + .../apis/hive/v1/zz_generated.deepcopy.go | 3611 +++ .../openshift/hive/apis/scheme/scheme.go | 97 + vendor/github.com/ovirt/go-ovirt/CHANGES.adoc | 11 +- .../github.com/ovirt/go-ovirt/connection.go | 171 +- vendor/github.com/ovirt/go-ovirt/error.go | 73 +- vendor/github.com/ovirt/go-ovirt/helper.go | 8 +- vendor/github.com/ovirt/go-ovirt/readers.go | 269 + vendor/github.com/ovirt/go-ovirt/services.go | 5827 +++-- vendor/github.com/ovirt/go-ovirt/types.go | 18585 ++++++++++++++++ vendor/github.com/ovirt/go-ovirt/version.go | 2 +- vendor/github.com/ovirt/go-ovirt/writers.go | 100 + vendor/github.com/pierrec/lz4/.gitignore | 34 + vendor/github.com/pierrec/lz4/.travis.yml | 24 + vendor/github.com/pierrec/lz4/LICENSE | 28 + vendor/github.com/pierrec/lz4/README.md | 106 + vendor/github.com/pierrec/lz4/block.go | 387 + vendor/github.com/pierrec/lz4/debug.go | 23 + vendor/github.com/pierrec/lz4/debug_stub.go | 7 + vendor/github.com/pierrec/lz4/decode_amd64.go | 8 + vendor/github.com/pierrec/lz4/decode_amd64.s | 375 + vendor/github.com/pierrec/lz4/decode_other.go | 98 + vendor/github.com/pierrec/lz4/errors.go | 30 + .../pierrec/lz4/internal/xxh32/xxh32zero.go | 223 + vendor/github.com/pierrec/lz4/lz4.go | 66 + vendor/github.com/pierrec/lz4/lz4_go1.10.go | 29 + .../github.com/pierrec/lz4/lz4_notgo1.10.go | 29 + vendor/github.com/pierrec/lz4/reader.go | 335 + vendor/github.com/pierrec/lz4/writer.go | 275 + vendor/github.com/pkg/xattr/.gitignore | 29 + vendor/github.com/pkg/xattr/.travis.sh | 17 + vendor/github.com/pkg/xattr/.travis.yml | 26 + vendor/github.com/pkg/xattr/LICENSE | 25 + vendor/github.com/pkg/xattr/README.md | 46 + vendor/github.com/pkg/xattr/xattr.go | 234 + vendor/github.com/pkg/xattr/xattr_bsd.go | 197 + vendor/github.com/pkg/xattr/xattr_darwin.go | 86 + vendor/github.com/pkg/xattr/xattr_linux.go | 81 + .../github.com/pkg/xattr/xattr_unsupported.go | 60 + .../client_golang/prometheus/README.md | 2 +- .../prometheus/build_info_collector.go | 38 + .../client_golang/prometheus/collector.go | 8 + .../collectors/dbstats_collector_go115.go | 1 + .../collectors/dbstats_collector_pre_go115.go | 1 + .../client_golang/prometheus/counter.go | 8 +- .../client_golang/prometheus/go_collector.go | 494 +- .../prometheus/go_collector_go116.go | 107 + .../prometheus/go_collector_go117.go | 408 + .../client_golang/prometheus/histogram.go | 28 + .../prometheus/internal/go_runtime_metrics.go | 142 + .../prometheus/process_collector_other.go | 1 + .../prometheus/promhttp/instrument_client.go | 28 +- .../prometheus/promhttp/instrument_server.go | 111 +- .../prometheus/promhttp/option.go | 31 + .../client_golang/prometheus/value.go | 6 +- .../prometheus/common/expfmt/encode.go | 2 +- .../prometheus/common/expfmt/text_parse.go | 2 +- vendor/github.com/prometheus/procfs/Makefile | 2 + .../prometheus/procfs/Makefile.common | 15 +- vendor/github.com/prometheus/procfs/README.md | 4 +- .../github.com/prometheus/procfs/cmdline.go | 30 + vendor/github.com/prometheus/procfs/doc.go | 2 +- .../prometheus/procfs/fixtures.ttar | 1178 +- vendor/github.com/prometheus/procfs/mdstat.go | 105 +- .../prometheus/procfs/net_ip_socket.go | 10 +- .../github.com/prometheus/procfs/netstat.go | 68 + .../prometheus/procfs/proc_cgroup.go | 2 +- .../github.com/prometheus/procfs/proc_stat.go | 32 +- .../github.com/prometheus/procfs/zoneinfo.go | 1 - vendor/github.com/thoas/go-funk/.gitignore | 27 + vendor/github.com/thoas/go-funk/.travis.yml | 7 + vendor/github.com/thoas/go-funk/CHANGELOG.md | 29 + vendor/github.com/thoas/go-funk/LICENSE | 21 + vendor/github.com/thoas/go-funk/Makefile | 11 + vendor/github.com/thoas/go-funk/README.rst | 835 + vendor/github.com/thoas/go-funk/assign.go | 129 + vendor/github.com/thoas/go-funk/builder.go | 110 + .../github.com/thoas/go-funk/chain_builder.go | 142 + vendor/github.com/thoas/go-funk/compact.go | 50 + vendor/github.com/thoas/go-funk/fill.go | 34 + vendor/github.com/thoas/go-funk/helpers.go | 317 + .../github.com/thoas/go-funk/intersection.go | 253 + vendor/github.com/thoas/go-funk/join.go | 111 + .../thoas/go-funk/join_primitives.go | 373 + .../github.com/thoas/go-funk/lazy_builder.go | 117 + vendor/github.com/thoas/go-funk/map.go | 74 + vendor/github.com/thoas/go-funk/max.go | 178 + vendor/github.com/thoas/go-funk/min.go | 177 + vendor/github.com/thoas/go-funk/operation.go | 69 + vendor/github.com/thoas/go-funk/options.go | 24 + .../github.com/thoas/go-funk/permutation.go | 29 + vendor/github.com/thoas/go-funk/predicate.go | 47 + vendor/github.com/thoas/go-funk/presence.go | 207 + vendor/github.com/thoas/go-funk/reduce.go | 87 + vendor/github.com/thoas/go-funk/retrieve.go | 104 + vendor/github.com/thoas/go-funk/scan.go | 192 + vendor/github.com/thoas/go-funk/short_if.go | 8 + vendor/github.com/thoas/go-funk/subset.go | 41 + .../github.com/thoas/go-funk/subtraction.go | 87 + vendor/github.com/thoas/go-funk/transform.go | 555 + vendor/github.com/thoas/go-funk/typesafe.go | 1161 + vendor/github.com/thoas/go-funk/utils.go | 103 + vendor/github.com/thoas/go-funk/without.go | 19 + vendor/github.com/thoas/go-funk/zip.go | 44 + vendor/github.com/ulikunitz/xz/LICENSE | 2 +- vendor/github.com/ulikunitz/xz/SECURITY.md | 10 + vendor/github.com/ulikunitz/xz/TODO.md | 116 +- vendor/github.com/ulikunitz/xz/bits.go | 2 +- vendor/github.com/ulikunitz/xz/crc.go | 2 +- vendor/github.com/ulikunitz/xz/format.go | 31 +- .../ulikunitz/xz/internal/hash/cyclic_poly.go | 2 +- .../ulikunitz/xz/internal/hash/doc.go | 2 +- .../ulikunitz/xz/internal/hash/rabin_karp.go | 2 +- .../ulikunitz/xz/internal/hash/roller.go | 2 +- .../ulikunitz/xz/internal/xlog/xlog.go | 2 +- .../github.com/ulikunitz/xz/lzma/bintree.go | 7 +- vendor/github.com/ulikunitz/xz/lzma/bitops.go | 4 +- .../github.com/ulikunitz/xz/lzma/breader.go | 2 +- vendor/github.com/ulikunitz/xz/lzma/buffer.go | 2 +- .../ulikunitz/xz/lzma/bytewriter.go | 2 +- .../github.com/ulikunitz/xz/lzma/decoder.go | 4 +- .../ulikunitz/xz/lzma/decoderdict.go | 9 +- .../ulikunitz/xz/lzma/directcodec.go | 13 +- .../github.com/ulikunitz/xz/lzma/distcodec.go | 18 +- .../github.com/ulikunitz/xz/lzma/encoder.go | 2 +- .../ulikunitz/xz/lzma/encoderdict.go | 4 +- .../github.com/ulikunitz/xz/lzma/hashtable.go | 2 +- vendor/github.com/ulikunitz/xz/lzma/header.go | 2 +- .../github.com/ulikunitz/xz/lzma/header2.go | 4 +- .../ulikunitz/xz/lzma/lengthcodec.go | 15 +- .../ulikunitz/xz/lzma/literalcodec.go | 9 +- .../ulikunitz/xz/lzma/matchalgorithm.go | 2 +- .../github.com/ulikunitz/xz/lzma/operation.go | 27 +- vendor/github.com/ulikunitz/xz/lzma/prob.go | 2 +- .../ulikunitz/xz/lzma/properties.go | 2 +- .../ulikunitz/xz/lzma/rangecodec.go | 28 +- vendor/github.com/ulikunitz/xz/lzma/reader.go | 2 +- .../github.com/ulikunitz/xz/lzma/reader2.go | 3 +- vendor/github.com/ulikunitz/xz/lzma/state.go | 8 +- .../ulikunitz/xz/lzma/treecodecs.go | 2 +- vendor/github.com/ulikunitz/xz/lzma/writer.go | 2 +- .../github.com/ulikunitz/xz/lzma/writer2.go | 2 +- vendor/github.com/ulikunitz/xz/lzmafilter.go | 2 +- vendor/github.com/ulikunitz/xz/none-check.go | 2 +- vendor/github.com/ulikunitz/xz/reader.go | 24 +- vendor/github.com/ulikunitz/xz/writer.go | 6 +- vendor/golang.org/x/sync/AUTHORS | 3 + vendor/golang.org/x/sync/CONTRIBUTORS | 3 + vendor/golang.org/x/sync/LICENSE | 27 + vendor/golang.org/x/sync/PATENTS | 22 + .../golang.org/x/sync/semaphore/semaphore.go | 136 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 23 +- .../x/sys/unix/zerrors_linux_386.go | 3 + .../x/sys/unix/zerrors_linux_amd64.go | 3 + .../x/sys/unix/zerrors_linux_arm.go | 3 + .../x/sys/unix/zerrors_linux_arm64.go | 3 + .../x/sys/unix/zerrors_linux_mips.go | 3 + .../x/sys/unix/zerrors_linux_mips64.go | 3 + .../x/sys/unix/zerrors_linux_mips64le.go | 3 + .../x/sys/unix/zerrors_linux_mipsle.go | 3 + .../x/sys/unix/zerrors_linux_ppc.go | 3 + .../x/sys/unix/zerrors_linux_ppc64.go | 3 + .../x/sys/unix/zerrors_linux_ppc64le.go | 3 + .../x/sys/unix/zerrors_linux_riscv64.go | 3 + .../x/sys/unix/zerrors_linux_s390x.go | 3 + .../x/sys/unix/zerrors_linux_sparc64.go | 3 + .../x/sys/unix/zsysnum_linux_386.go | 1 + .../x/sys/unix/zsysnum_linux_amd64.go | 1 + .../x/sys/unix/zsysnum_linux_arm.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/zsysnum_linux_ppc.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 1 + .../x/sys/unix/zsysnum_linux_riscv64.go | 1 + .../x/sys/unix/zsysnum_linux_s390x.go | 1 + .../x/sys/unix/zsysnum_linux_sparc64.go | 1 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 32 +- .../x/sys/windows/syscall_windows.go | 2 + .../golang.org/x/sys/windows/types_windows.go | 2 + .../x/sys/windows/zsyscall_windows.go | 14 + vendor/gopkg.in/djherbis/times.v1/.travis.sh | 28 + vendor/gopkg.in/djherbis/times.v1/.travis.yml | 19 + vendor/gopkg.in/djherbis/times.v1/LICENSE | 22 + vendor/gopkg.in/djherbis/times.v1/README.md | 64 + .../djherbis/times.v1/ctime_windows.go | 149 + .../djherbis/times.v1/js.cover.dockerfile | 9 + vendor/gopkg.in/djherbis/times.v1/js.cover.sh | 7 + vendor/gopkg.in/djherbis/times.v1/times.go | 74 + .../djherbis/times.v1/times_darwin.go | 40 + .../djherbis/times.v1/times_dragonfly.go | 39 + .../djherbis/times.v1/times_freebsd.go | 40 + vendor/gopkg.in/djherbis/times.v1/times_js.go | 41 + .../gopkg.in/djherbis/times.v1/times_linux.go | 39 + .../gopkg.in/djherbis/times.v1/times_nacl.go | 39 + .../djherbis/times.v1/times_netbsd.go | 40 + .../djherbis/times.v1/times_openbsd.go | 39 + .../gopkg.in/djherbis/times.v1/times_plan9.go | 34 + .../djherbis/times.v1/times_solaris.go | 39 + .../djherbis/times.v1/times_windows.go | 36 + .../djherbis/times.v1/use_generic_stat.go | 15 + vendor/gopkg.in/ini.v1/.editorconfig | 12 + vendor/gopkg.in/ini.v1/.gitignore | 1 + vendor/gopkg.in/ini.v1/file.go | 23 +- vendor/gopkg.in/ini.v1/key.go | 19 +- vendor/gorm.io/gorm/.gitignore | 5 + vendor/gorm.io/gorm/License | 21 + vendor/gorm.io/gorm/README.md | 42 + vendor/gorm.io/gorm/association.go | 513 + vendor/gorm.io/gorm/callbacks.go | 331 + vendor/gorm.io/gorm/chainable_api.go | 305 + vendor/gorm.io/gorm/clause/clause.go | 88 + vendor/gorm.io/gorm/clause/delete.go | 23 + vendor/gorm.io/gorm/clause/expression.go | 375 + vendor/gorm.io/gorm/clause/from.go | 37 + vendor/gorm.io/gorm/clause/group_by.go | 48 + vendor/gorm.io/gorm/clause/insert.go | 39 + vendor/gorm.io/gorm/clause/joins.go | 47 + vendor/gorm.io/gorm/clause/limit.go | 48 + vendor/gorm.io/gorm/clause/locking.go | 31 + vendor/gorm.io/gorm/clause/on_conflict.go | 59 + vendor/gorm.io/gorm/clause/order_by.go | 54 + vendor/gorm.io/gorm/clause/returning.go | 34 + vendor/gorm.io/gorm/clause/select.go | 59 + vendor/gorm.io/gorm/clause/set.go | 60 + vendor/gorm.io/gorm/clause/update.go | 38 + vendor/gorm.io/gorm/clause/values.go | 45 + vendor/gorm.io/gorm/clause/where.go | 177 + vendor/gorm.io/gorm/clause/with.go | 4 + vendor/gorm.io/gorm/errors.go | 42 + vendor/gorm.io/gorm/finisher_api.go | 640 + vendor/gorm.io/gorm/gorm.go | 458 + vendor/gorm.io/gorm/interfaces.go | 63 + vendor/gorm.io/gorm/logger/logger.go | 190 + vendor/gorm.io/gorm/logger/sql.go | 133 + vendor/gorm.io/gorm/migrator.go | 82 + vendor/gorm.io/gorm/model.go | 15 + vendor/gorm.io/gorm/prepare_stmt.go | 172 + vendor/gorm.io/gorm/scan.go | 287 + vendor/gorm.io/gorm/schema/check.go | 37 + vendor/gorm.io/gorm/schema/field.go | 840 + vendor/gorm.io/gorm/schema/index.go | 141 + vendor/gorm.io/gorm/schema/interfaces.go | 25 + vendor/gorm.io/gorm/schema/naming.go | 176 + vendor/gorm.io/gorm/schema/relationship.go | 633 + vendor/gorm.io/gorm/schema/schema.go | 323 + vendor/gorm.io/gorm/schema/utils.go | 198 + vendor/gorm.io/gorm/soft_delete.go | 164 + vendor/gorm.io/gorm/statement.go | 701 + vendor/gorm.io/gorm/utils/utils.go | 125 + vendor/modules.txt | 115 +- 610 files changed, 93523 insertions(+), 3293 deletions(-) create mode 100644 vendor/github.com/cavaliercoder/go-cpio/.gitignore create mode 100644 vendor/github.com/cavaliercoder/go-cpio/.travis.yml create mode 100644 vendor/github.com/cavaliercoder/go-cpio/LICENSE create mode 100644 vendor/github.com/cavaliercoder/go-cpio/Makefile create mode 100644 vendor/github.com/cavaliercoder/go-cpio/README.md create mode 100644 vendor/github.com/cavaliercoder/go-cpio/cpio.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/fileinfo.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/fuzz.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/hash.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/header.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/reader.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/svr4.go create mode 100644 vendor/github.com/cavaliercoder/go-cpio/writer.go delete mode 100644 vendor/github.com/cespare/xxhash/v2/.travis.yml create mode 100644 vendor/github.com/coreos/ignition/v2/config/util/config.go create mode 100644 vendor/github.com/diskfs/go-diskfs/.gitignore create mode 100644 vendor/github.com/diskfs/go-diskfs/LICENSE create mode 100644 vendor/github.com/diskfs/go-diskfs/Makefile create mode 100644 vendor/github.com/diskfs/go-diskfs/README.md create mode 100644 vendor/github.com/diskfs/go-diskfs/disk/disk.go create mode 100644 vendor/github.com/diskfs/go-diskfs/disk/disk_unix.go create mode 100644 vendor/github.com/diskfs/go-diskfs/disk/disk_windows.go create mode 100644 vendor/github.com/diskfs/go-diskfs/diskfs.go create mode 100644 vendor/github.com/diskfs/go-diskfs/diskfs_unix.go create mode 100644 vendor/github.com/diskfs/go-diskfs/diskfs_windows.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/directory.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/directoryentry.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/doc.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/dos20bpb.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/dos331bpb.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/dos71bpb.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/fat32.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/file.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/fileinfo.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/fsinfosector.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/msdosbootsector.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/table.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/fat32/util.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/file.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/filesystem.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/directory.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/directoryentry.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/directoryentrysystemuseextension.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/doc.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/eltorito.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/file.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/finalize.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/iso9660.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/pathtable.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/rockridge.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/statt_others.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/statt_windows.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/util.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/iso9660/volume_descriptor.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/compressor.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/directory.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/directoryentry.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/doc.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/file.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/finalize.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/finalize_unix.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/finalize_windows.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/finalizefileinfo.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/fragment.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/inode.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/metadatablock.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/squashfs.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/superblock.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/uidgid.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/util.go create mode 100644 vendor/github.com/diskfs/go-diskfs/filesystem/squashfs/xattr.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/gpt/common.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/gpt/doc.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/gpt/partiton.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/gpt/table.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/gpt/types.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/mbr/doc.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/mbr/partiton.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/mbr/table.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/mbr/types.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/part/partition.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/partition.go create mode 100644 vendor/github.com/diskfs/go-diskfs/partition/table.go create mode 100644 vendor/github.com/diskfs/go-diskfs/util/file.go create mode 100644 vendor/github.com/diskfs/go-diskfs/util/version.go create mode 100644 vendor/github.com/google/uuid/null.go create mode 100644 vendor/github.com/hashicorp/errwrap/LICENSE create mode 100644 vendor/github.com/hashicorp/errwrap/README.md create mode 100644 vendor/github.com/hashicorp/errwrap/errwrap.go create mode 100644 vendor/github.com/hashicorp/go-multierror/LICENSE create mode 100644 vendor/github.com/hashicorp/go-multierror/Makefile create mode 100644 vendor/github.com/hashicorp/go-multierror/README.md create mode 100644 vendor/github.com/hashicorp/go-multierror/append.go create mode 100644 vendor/github.com/hashicorp/go-multierror/flatten.go create mode 100644 vendor/github.com/hashicorp/go-multierror/format.go create mode 100644 vendor/github.com/hashicorp/go-multierror/group.go create mode 100644 vendor/github.com/hashicorp/go-multierror/multierror.go create mode 100644 vendor/github.com/hashicorp/go-multierror/prefix.go create mode 100644 vendor/github.com/hashicorp/go-multierror/sort.go create mode 100644 vendor/github.com/jinzhu/inflection/LICENSE create mode 100644 vendor/github.com/jinzhu/inflection/README.md create mode 100644 vendor/github.com/jinzhu/inflection/inflections.go create mode 100644 vendor/github.com/jinzhu/inflection/wercker.yml create mode 100644 vendor/github.com/jinzhu/now/Guardfile create mode 100644 vendor/github.com/jinzhu/now/License create mode 100644 vendor/github.com/jinzhu/now/README.md create mode 100644 vendor/github.com/jinzhu/now/main.go create mode 100644 vendor/github.com/jinzhu/now/now.go create mode 100644 vendor/github.com/jinzhu/now/time.go create mode 100644 vendor/github.com/jinzhu/now/wercker.yml create mode 100644 vendor/github.com/openshift/assisted-image-service/LICENSE create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/isoeditor/ignition.go create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/isoeditor/initramfs.go create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/isoeditor/isoutil.go create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/isoeditor/mock_editor.go create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/isoeditor/rhcos.go create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/isoeditor/stream.go create mode 100644 vendor/github.com/openshift/assisted-image-service/pkg/overlay/overlay.go create mode 100644 vendor/github.com/openshift/assisted-service/LICENSE create mode 100644 vendor/github.com/openshift/assisted-service/api/common/common_types.go create mode 100644 vendor/github.com/openshift/assisted-service/api/common/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go create mode 100644 vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/groupversion_info.go create mode 100644 vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/agent_types.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/agentserviceconfig_types.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/groupversion_info.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/infraenv_types.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/nmstate_config_types.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/nmstate_util.go create mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/assisted-service/models/add_hosts_cluster_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/api_vip_connectivity_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/api_vip_connectivity_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/bind_host_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/boot.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_default_config.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_host_requirements.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_host_requirements_details.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_host_requirements_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_network.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_progress_info.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_update_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go create mode 100644 vendor/github.com/openshift/assisted-service/models/completion_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/connectivity_check_host.go create mode 100644 vendor/github.com/openshift/assisted-service/models/connectivity_check_nic.go create mode 100644 vendor/github.com/openshift/assisted-service/models/connectivity_check_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/connectivity_remote_host.go create mode 100644 vendor/github.com/openshift/assisted-service/models/connectivity_report.go create mode 100644 vendor/github.com/openshift/assisted-service/models/container_image_availability.go create mode 100644 vendor/github.com/openshift/assisted-service/models/container_image_availability_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/container_image_availability_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/container_image_availability_result.go create mode 100644 vendor/github.com/openshift/assisted-service/models/cpu.go create mode 100644 vendor/github.com/openshift/assisted-service/models/create_manifest_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/credentials.go create mode 100644 vendor/github.com/openshift/assisted-service/models/dhcp_allocation_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/dhcp_allocation_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/discovery_ignition_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_config_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_encryption.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_info.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_role.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_speed.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_speed_check_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/disk_speed_check_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/domain_resolution_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/domain_resolution_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/error.go create mode 100644 vendor/github.com/openshift/assisted-service/models/event.go create mode 100644 vendor/github.com/openshift/assisted-service/models/event_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/feature_support_level.go create mode 100644 vendor/github.com/openshift/assisted-service/models/feature_support_levels.go create mode 100644 vendor/github.com/openshift/assisted-service/models/free_addresses_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/free_addresses_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/free_network_addresses.go create mode 100644 vendor/github.com/openshift/assisted-service/models/free_networks_addresses.go create mode 100644 vendor/github.com/openshift/assisted-service/models/gpu.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_ignition_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_network.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_progress.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_progress_info.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_registration_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_role.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_role_update_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_stage.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_static_network_config.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_type_hardware_requirements.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_type_hardware_requirements_wrapper.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_update_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/host_validation_id.go create mode 100644 vendor/github.com/openshift/assisted-service/models/ignition_endpoint.go create mode 100644 vendor/github.com/openshift/assisted-service/models/image_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/image_info.go create mode 100644 vendor/github.com/openshift/assisted-service/models/image_type.go create mode 100644 vendor/github.com/openshift/assisted-service/models/import_cluster_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/infra_env.go create mode 100644 vendor/github.com/openshift/assisted-service/models/infra_env_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/infra_env_image_url.go create mode 100644 vendor/github.com/openshift/assisted-service/models/infra_env_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/infra_env_update_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/infra_error.go create mode 100644 vendor/github.com/openshift/assisted-service/models/ingress_cert_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/installer_args_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/interface.go create mode 100644 vendor/github.com/openshift/assisted-service/models/inventory.go create mode 100644 vendor/github.com/openshift/assisted-service/models/io_perf.go create mode 100644 vendor/github.com/openshift/assisted-service/models/l2_connectivity.go create mode 100644 vendor/github.com/openshift/assisted-service/models/l3_connectivity.go create mode 100644 vendor/github.com/openshift/assisted-service/models/list_managed_domains.go create mode 100644 vendor/github.com/openshift/assisted-service/models/list_manifests.go create mode 100644 vendor/github.com/openshift/assisted-service/models/list_versions.go create mode 100644 vendor/github.com/openshift/assisted-service/models/logs_progress_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/logs_state.go create mode 100644 vendor/github.com/openshift/assisted-service/models/logs_type.go create mode 100644 vendor/github.com/openshift/assisted-service/models/mac_interface_map.go create mode 100644 vendor/github.com/openshift/assisted-service/models/machine_network.go create mode 100644 vendor/github.com/openshift/assisted-service/models/managed_domain.go create mode 100644 vendor/github.com/openshift/assisted-service/models/manifest.go create mode 100644 vendor/github.com/openshift/assisted-service/models/memory.go create mode 100644 vendor/github.com/openshift/assisted-service/models/memory_method.go create mode 100644 vendor/github.com/openshift/assisted-service/models/monitored_operator.go create mode 100644 vendor/github.com/openshift/assisted-service/models/monitored_operators_list.go create mode 100644 vendor/github.com/openshift/assisted-service/models/ntp_source.go create mode 100644 vendor/github.com/openshift/assisted-service/models/ntp_synchronization_request.go create mode 100644 vendor/github.com/openshift/assisted-service/models/ntp_synchronization_response.go create mode 100644 vendor/github.com/openshift/assisted-service/models/openshift_version.go create mode 100644 vendor/github.com/openshift/assisted-service/models/openshift_versions.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_hardware_requirements.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_host_requirements.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_monitor_report.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_properties.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_property.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_status.go create mode 100644 vendor/github.com/openshift/assisted-service/models/operator_type.go create mode 100644 vendor/github.com/openshift/assisted-service/models/os_image.go create mode 100644 vendor/github.com/openshift/assisted-service/models/os_images.go create mode 100644 vendor/github.com/openshift/assisted-service/models/ovirt_platform.go create mode 100644 vendor/github.com/openshift/assisted-service/models/platform.go create mode 100644 vendor/github.com/openshift/assisted-service/models/platform_type.go create mode 100644 vendor/github.com/openshift/assisted-service/models/preflight_hardware_requirements.go create mode 100644 vendor/github.com/openshift/assisted-service/models/presigned.go create mode 100644 vendor/github.com/openshift/assisted-service/models/proxy.go create mode 100644 vendor/github.com/openshift/assisted-service/models/release_image.go create mode 100644 vendor/github.com/openshift/assisted-service/models/release_images.go create mode 100644 vendor/github.com/openshift/assisted-service/models/route.go create mode 100644 vendor/github.com/openshift/assisted-service/models/service_network.go create mode 100644 vendor/github.com/openshift/assisted-service/models/source_state.go create mode 100644 vendor/github.com/openshift/assisted-service/models/step.go create mode 100644 vendor/github.com/openshift/assisted-service/models/step_reply.go create mode 100644 vendor/github.com/openshift/assisted-service/models/step_type.go create mode 100644 vendor/github.com/openshift/assisted-service/models/steps.go create mode 100644 vendor/github.com/openshift/assisted-service/models/steps_reply.go create mode 100644 vendor/github.com/openshift/assisted-service/models/subnet.go create mode 100644 vendor/github.com/openshift/assisted-service/models/system_vendor.go create mode 100644 vendor/github.com/openshift/assisted-service/models/usage.go create mode 100644 vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/versioned_host_requirements.go create mode 100644 vendor/github.com/openshift/assisted-service/models/versions.go create mode 100644 vendor/github.com/openshift/assisted-service/pkg/executer/executer.go create mode 100644 vendor/github.com/openshift/assisted-service/pkg/executer/mock_executer.go create mode 100644 vendor/github.com/openshift/assisted-service/pkg/staticnetworkconfig/generator.go create mode 100644 vendor/github.com/openshift/assisted-service/pkg/staticnetworkconfig/mock_generator.go create mode 100644 vendor/github.com/openshift/custom-resource-status/LICENSE create mode 100644 vendor/github.com/openshift/custom-resource-status/conditions/v1/conditions.go create mode 100644 vendor/github.com/openshift/custom-resource-status/conditions/v1/doc.go create mode 100644 vendor/github.com/openshift/custom-resource-status/conditions/v1/types.go create mode 100644 vendor/github.com/openshift/custom-resource-status/conditions/v1/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/LICENSE create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/agent/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/agent/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/agent/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/aws/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/aws/machinepool.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/aws/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/aws/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/azure/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/azure/machinepool.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/azure/metadata.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/azure/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/azure/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/baremetal/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/baremetal/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/baremetal/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/checkpoint_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterclaim_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterdeployment_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterdeprovision_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterimageset_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterinstall_conditions.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterpool_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterprovision_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterrelocate_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/clusterstate_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/dnszone_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/gcp/clouduid.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/gcp/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/gcp/machinepools.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/gcp/metadata.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/gcp/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/gcp/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/hiveconfig_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/machinepool_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/machinepoolnamelease_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/metaruntimeobject.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/openstack/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/openstack/machinepools.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/openstack/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/openstack/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/machinepool.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/register.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/syncidentityprovider_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/syncset_types.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/vsphere/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/vsphere/machinepools.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/vsphere/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/vsphere/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/scheme/scheme.go create mode 100644 vendor/github.com/pierrec/lz4/.gitignore create mode 100644 vendor/github.com/pierrec/lz4/.travis.yml create mode 100644 vendor/github.com/pierrec/lz4/LICENSE create mode 100644 vendor/github.com/pierrec/lz4/README.md create mode 100644 vendor/github.com/pierrec/lz4/block.go create mode 100644 vendor/github.com/pierrec/lz4/debug.go create mode 100644 vendor/github.com/pierrec/lz4/debug_stub.go create mode 100644 vendor/github.com/pierrec/lz4/decode_amd64.go create mode 100644 vendor/github.com/pierrec/lz4/decode_amd64.s create mode 100644 vendor/github.com/pierrec/lz4/decode_other.go create mode 100644 vendor/github.com/pierrec/lz4/errors.go create mode 100644 vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go create mode 100644 vendor/github.com/pierrec/lz4/lz4.go create mode 100644 vendor/github.com/pierrec/lz4/lz4_go1.10.go create mode 100644 vendor/github.com/pierrec/lz4/lz4_notgo1.10.go create mode 100644 vendor/github.com/pierrec/lz4/reader.go create mode 100644 vendor/github.com/pierrec/lz4/writer.go create mode 100644 vendor/github.com/pkg/xattr/.gitignore create mode 100644 vendor/github.com/pkg/xattr/.travis.sh create mode 100644 vendor/github.com/pkg/xattr/.travis.yml create mode 100644 vendor/github.com/pkg/xattr/LICENSE create mode 100644 vendor/github.com/pkg/xattr/README.md create mode 100644 vendor/github.com/pkg/xattr/xattr.go create mode 100644 vendor/github.com/pkg/xattr/xattr_bsd.go create mode 100644 vendor/github.com/pkg/xattr/xattr_darwin.go create mode 100644 vendor/github.com/pkg/xattr/xattr_linux.go create mode 100644 vendor/github.com/pkg/xattr/xattr_unsupported.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/build_info_collector.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/go_collector_go116.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/go_collector_go117.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/option.go create mode 100644 vendor/github.com/prometheus/procfs/cmdline.go create mode 100644 vendor/github.com/prometheus/procfs/netstat.go create mode 100644 vendor/github.com/thoas/go-funk/.gitignore create mode 100644 vendor/github.com/thoas/go-funk/.travis.yml create mode 100644 vendor/github.com/thoas/go-funk/CHANGELOG.md create mode 100644 vendor/github.com/thoas/go-funk/LICENSE create mode 100644 vendor/github.com/thoas/go-funk/Makefile create mode 100644 vendor/github.com/thoas/go-funk/README.rst create mode 100644 vendor/github.com/thoas/go-funk/assign.go create mode 100644 vendor/github.com/thoas/go-funk/builder.go create mode 100644 vendor/github.com/thoas/go-funk/chain_builder.go create mode 100644 vendor/github.com/thoas/go-funk/compact.go create mode 100644 vendor/github.com/thoas/go-funk/fill.go create mode 100644 vendor/github.com/thoas/go-funk/helpers.go create mode 100644 vendor/github.com/thoas/go-funk/intersection.go create mode 100644 vendor/github.com/thoas/go-funk/join.go create mode 100644 vendor/github.com/thoas/go-funk/join_primitives.go create mode 100644 vendor/github.com/thoas/go-funk/lazy_builder.go create mode 100644 vendor/github.com/thoas/go-funk/map.go create mode 100644 vendor/github.com/thoas/go-funk/max.go create mode 100644 vendor/github.com/thoas/go-funk/min.go create mode 100644 vendor/github.com/thoas/go-funk/operation.go create mode 100644 vendor/github.com/thoas/go-funk/options.go create mode 100644 vendor/github.com/thoas/go-funk/permutation.go create mode 100644 vendor/github.com/thoas/go-funk/predicate.go create mode 100644 vendor/github.com/thoas/go-funk/presence.go create mode 100644 vendor/github.com/thoas/go-funk/reduce.go create mode 100644 vendor/github.com/thoas/go-funk/retrieve.go create mode 100644 vendor/github.com/thoas/go-funk/scan.go create mode 100644 vendor/github.com/thoas/go-funk/short_if.go create mode 100644 vendor/github.com/thoas/go-funk/subset.go create mode 100644 vendor/github.com/thoas/go-funk/subtraction.go create mode 100644 vendor/github.com/thoas/go-funk/transform.go create mode 100644 vendor/github.com/thoas/go-funk/typesafe.go create mode 100644 vendor/github.com/thoas/go-funk/utils.go create mode 100644 vendor/github.com/thoas/go-funk/without.go create mode 100644 vendor/github.com/thoas/go-funk/zip.go create mode 100644 vendor/github.com/ulikunitz/xz/SECURITY.md create mode 100644 vendor/golang.org/x/sync/AUTHORS create mode 100644 vendor/golang.org/x/sync/CONTRIBUTORS create mode 100644 vendor/golang.org/x/sync/LICENSE create mode 100644 vendor/golang.org/x/sync/PATENTS create mode 100644 vendor/golang.org/x/sync/semaphore/semaphore.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/.travis.sh create mode 100644 vendor/gopkg.in/djherbis/times.v1/.travis.yml create mode 100644 vendor/gopkg.in/djherbis/times.v1/LICENSE create mode 100644 vendor/gopkg.in/djherbis/times.v1/README.md create mode 100644 vendor/gopkg.in/djherbis/times.v1/ctime_windows.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/js.cover.dockerfile create mode 100644 vendor/gopkg.in/djherbis/times.v1/js.cover.sh create mode 100644 vendor/gopkg.in/djherbis/times.v1/times.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_darwin.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_dragonfly.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_freebsd.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_js.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_linux.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_nacl.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_netbsd.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_openbsd.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_plan9.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_solaris.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/times_windows.go create mode 100644 vendor/gopkg.in/djherbis/times.v1/use_generic_stat.go create mode 100644 vendor/gopkg.in/ini.v1/.editorconfig create mode 100644 vendor/gorm.io/gorm/.gitignore create mode 100644 vendor/gorm.io/gorm/License create mode 100644 vendor/gorm.io/gorm/README.md create mode 100644 vendor/gorm.io/gorm/association.go create mode 100644 vendor/gorm.io/gorm/callbacks.go create mode 100644 vendor/gorm.io/gorm/chainable_api.go create mode 100644 vendor/gorm.io/gorm/clause/clause.go create mode 100644 vendor/gorm.io/gorm/clause/delete.go create mode 100644 vendor/gorm.io/gorm/clause/expression.go create mode 100644 vendor/gorm.io/gorm/clause/from.go create mode 100644 vendor/gorm.io/gorm/clause/group_by.go create mode 100644 vendor/gorm.io/gorm/clause/insert.go create mode 100644 vendor/gorm.io/gorm/clause/joins.go create mode 100644 vendor/gorm.io/gorm/clause/limit.go create mode 100644 vendor/gorm.io/gorm/clause/locking.go create mode 100644 vendor/gorm.io/gorm/clause/on_conflict.go create mode 100644 vendor/gorm.io/gorm/clause/order_by.go create mode 100644 vendor/gorm.io/gorm/clause/returning.go create mode 100644 vendor/gorm.io/gorm/clause/select.go create mode 100644 vendor/gorm.io/gorm/clause/set.go create mode 100644 vendor/gorm.io/gorm/clause/update.go create mode 100644 vendor/gorm.io/gorm/clause/values.go create mode 100644 vendor/gorm.io/gorm/clause/where.go create mode 100644 vendor/gorm.io/gorm/clause/with.go create mode 100644 vendor/gorm.io/gorm/errors.go create mode 100644 vendor/gorm.io/gorm/finisher_api.go create mode 100644 vendor/gorm.io/gorm/gorm.go create mode 100644 vendor/gorm.io/gorm/interfaces.go create mode 100644 vendor/gorm.io/gorm/logger/logger.go create mode 100644 vendor/gorm.io/gorm/logger/sql.go create mode 100644 vendor/gorm.io/gorm/migrator.go create mode 100644 vendor/gorm.io/gorm/model.go create mode 100644 vendor/gorm.io/gorm/prepare_stmt.go create mode 100644 vendor/gorm.io/gorm/scan.go create mode 100644 vendor/gorm.io/gorm/schema/check.go create mode 100644 vendor/gorm.io/gorm/schema/field.go create mode 100644 vendor/gorm.io/gorm/schema/index.go create mode 100644 vendor/gorm.io/gorm/schema/interfaces.go create mode 100644 vendor/gorm.io/gorm/schema/naming.go create mode 100644 vendor/gorm.io/gorm/schema/relationship.go create mode 100644 vendor/gorm.io/gorm/schema/schema.go create mode 100644 vendor/gorm.io/gorm/schema/utils.go create mode 100644 vendor/gorm.io/gorm/soft_delete.go create mode 100644 vendor/gorm.io/gorm/statement.go create mode 100644 vendor/gorm.io/gorm/utils/utils.go diff --git a/go.mod b/go.mod index d812551cca..08092cb4c7 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/aws/aws-sdk-go v1.43.19 github.com/clarketm/json v1.14.1 github.com/containers/image v3.0.2+incompatible - github.com/coreos/ignition/v2 v2.9.0 + github.com/coreos/ignition/v2 v2.13.0 github.com/coreos/stream-metadata-go v0.1.8 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/go-openapi/strfmt v0.21.2 @@ -32,7 +32,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 github.com/google/go-cmp v0.5.7 - github.com/google/uuid v1.2.0 + github.com/google/uuid v1.3.0 github.com/gophercloud/gophercloud v0.24.0 github.com/gophercloud/utils v0.0.0-20220307143606-8e7800759d16 github.com/h2non/filetype v1.0.12 @@ -42,7 +42,7 @@ require ( github.com/metal3-io/baremetal-operator v0.0.0-20220128094204-28771f489634 github.com/metal3-io/baremetal-operator/apis v0.0.0 github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.0.0 - github.com/openshift/api v0.0.0-20220404140913-04e1813ebb11 + github.com/openshift/api v3.9.1-0.20191111211345-a27ff30ebf09+incompatible github.com/openshift/assisted-image-service v0.0.0-20220307202600-054a1afa8d28 github.com/openshift/assisted-service v1.0.10-0.20220223093655-7ada9949bf1d github.com/openshift/client-go v0.0.0-20211209144617-7385dd6338e3 @@ -56,30 +56,30 @@ require ( github.com/openshift/machine-api-provider-nutanix v0.0.0-20220217170301-9c5eed11237a github.com/openshift/machine-api-provider-powervs v0.0.0-20220303154846-89bb5bec120e github.com/openshift/machine-config-operator v0.0.0 - github.com/ovirt/go-ovirt v0.0.0-20210308100159-ac0bcbc88d7c + github.com/ovirt/go-ovirt v0.0.0-20210809163552-d4276e35d3db github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.10.1 - github.com/prometheus/client_golang v1.11.0 - github.com/prometheus/common v0.28.0 + github.com/prometheus/client_golang v1.12.1 + github.com/prometheus/common v0.32.1 github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.2.1 github.com/stretchr/testify v1.7.0 github.com/terraform-providers/terraform-provider-nutanix v1.1.0 github.com/thoas/go-funk v0.9.1 - github.com/ulikunitz/xz v0.5.8 - github.com/vincent-petithory/dataurl v0.0.0-20191104211930-d1553a71de50 + github.com/ulikunitz/xz v0.5.10 + github.com/vincent-petithory/dataurl v1.0.0 github.com/vmware/govmomi v0.24.0 golang.org/x/crypto v0.0.0-20211202192323-5770296d904e golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e + golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 google.golang.org/api v0.44.0 google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 google.golang.org/grpc v1.40.0 - gopkg.in/ini.v1 v1.66.2 + gopkg.in/ini.v1 v1.66.4 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.0 k8s.io/apiextensions-apiserver v0.23.0 @@ -133,12 +133,14 @@ require ( github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.3.2 // indirect - github.com/coreos/vcontext v0.0.0-20201120045928-b0e13dab675c // indirect + github.com/coreos/vcontext v0.0.0-20211021162308-f1dbbca7bef4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dimchansky/utfbom v1.1.0 // indirect + github.com/diskfs/go-diskfs v1.2.1-0.20210727185522-a769efacd235 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.12.0 // indirect github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect @@ -151,8 +153,6 @@ require ( github.com/go-openapi/loads v0.21.1 // indirect github.com/go-openapi/runtime v0.23.0 // indirect github.com/go-openapi/spec v0.20.4 // indirect - github.com/go-openapi/strfmt v0.21.2 // indirect - github.com/go-openapi/swag v0.21.1 // indirect github.com/go-openapi/validate v0.20.3 // indirect github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect @@ -163,7 +163,9 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/googleapis/gax-go/v2 v2.0.5 // indirect github.com/googleapis/gnostic v0.5.5 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-version v1.4.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect @@ -171,6 +173,8 @@ require ( github.com/hashicorp/terraform-plugin-sdk v1.7.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -188,13 +192,18 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect github.com/openshift/cluster-api v0.0.0-20190805113604-f8de78af80fc // indirect + github.com/openshift/custom-resource-status v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pierrec/lz4 v2.3.0+incompatible // indirect + github.com/pkg/xattr v0.4.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect - github.com/satori/go.uuid v1.2.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + gopkg.in/djherbis/times.v1 v1.2.0 // indirect + gorm.io/gorm v1.22.3 // indirect ) // OpenShift Forks diff --git a/go.sum b/go.sum index 840f0860df..4499a710fa 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +4d63.com/gochecknoinits v0.0.0-20200108094044-eb73b47b9fc4/go.mod h1:4o1i5aXtIF5tJFt3UD1knCVmWOXg7fLYdHVu6jeNcnM= +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -41,6 +43,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.9.0/go.mod h1:m+/etGaqZbylxaNT876QGXqEHp4PR2Rq5GMqICWb9bU= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= +contrib.go.opencensus.io/exporter/prometheus v0.2.0/go.mod h1:TYmVAyE8Tn1lyPcltF5IYYfWp2KHu7lQGIZnj8iZMys= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= @@ -55,6 +59,7 @@ github.com/Azure/azure-sdk-for-go v51.2.0+incompatible h1:qQNk//OOHK0GZcgMMgdJ4t github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -123,22 +128,27 @@ github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YH github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.20.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= @@ -165,12 +175,15 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1264 h1:67Ky9Wy6qmYRBrS9DRxlXRYgosNnb/4uEDLu2H554JU= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1264/go.mod h1:9CMdKNL3ynIGPpfTcdwTvIm8SGuAZYYC4jFVSSvE1YQ= github.com/aliyun/aliyun-oss-go-sdk v2.1.8+incompatible h1:hLUNPbx10wawWW7DeNExvTrlb90db3UnnNTFKHZEFhE= github.com/aliyun/aliyun-oss-go-sdk v2.1.8+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f/go.mod h1:k8feO4+kXDxro6ErPXBRTJ/ro2mf0SsFG8s7doP9kJE= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -209,11 +222,13 @@ github.com/aws/aws-sdk-go v1.19.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.30.28/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.43.19 h1:n7YAreaCpcstusW7F0+XiocZxh7rwmcAPO4HTEPJ6mE= github.com/aws/aws-sdk-go v1.43.19/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= @@ -224,27 +239,41 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e h1:hHg27A0RSSp2Om9lubZpiMgVbvn39bsUmW9U5h0twqc= +github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20180905225744-ee1a9a0726d2/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/checkpoint-restore/go-criu/v4 v4.0.2/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200507155900-a9f01edf17e3/go.mod h1:XT+cAw5wfvsodedcijoh1l9cf7v1x9FlFB/3VmF/O8s= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/clarketm/json v1.14.1 h1:43bkbTTKKdDx7crs3WHzkrnH6S1EvAF1VZrdFGMmmz4= github.com/clarketm/json v1.14.1/go.mod h1:ynr2LRfb0fQU34l07csRNBTcivjySLLiY1YzQqKVfdo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -253,6 +282,7 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= @@ -260,10 +290,14 @@ github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u9 github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe h1:PEmIrUvwG9Yyv+0WKZqjXfSFDeZjs/q15g0m08BYS9k= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= @@ -271,9 +305,12 @@ github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kw github.com/containers/image v3.0.2+incompatible h1:B1lqAE8MUPCrsBLE86J0gnXleeRq8zJnQryhiiGQNyE= github.com/containers/image v3.0.2+incompatible/go.mod h1:8Vtij257IWSanUQKe1tAeNOm2sRVkSqQTVQ1IlwI3+M= github.com/containers/image/v5 v5.5.1/go.mod h1:4PyNYR0nwlGq/ybVJD9hWlhmIsNra4Q8uOQX2s6E2uM= +github.com/containers/image/v5 v5.7.0/go.mod h1:8aOy+YaItukxghRORkvhq5ibWttHErzDLy6egrKfKos= github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.0.2/go.mod h1:nsOhbP19flrX6rE7ieGFvBlr7modwmNjsqWarIUce4M= +github.com/containers/ocicrypt v1.0.3/go.mod h1:CUBa+8MRNL/VkpxYIpaMtgn1WgXGyvPQj8jcy0EVG6g= github.com/containers/storage v1.20.2/go.mod h1:oOB9Ie8OVPojvoaKWEGSEtHbXUAs+tSyr7RO7ZGteMc= +github.com/containers/storage v1.23.6/go.mod h1:haFs0HRowKwyzvWEx9EgI3WsL8XCSnBDb5f8P5CAxJY= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/container-linux-config-transpiler v0.9.0/go.mod h1:SlcxXZQ2c42knj8pezMiQsM1f+ADxFMjGetuMKR/YSQ= @@ -282,7 +319,7 @@ github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/fcct v0.5.0/go.mod h1:cbE+j77YSQwFB2fozWVB3qsI2Pi3YiVEbDz/b6Yywdo= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-json v0.0.0-20170920214419-6a2fe990e083/go.mod h1:FmxyHfvrCFfCsXRylD4QQRlQmvzl+DG6iTHyEEykPfU= +github.com/coreos/go-json v0.0.0-20211020211907-c63f628265de/go.mod h1:lryFBkhadOfv8Jue2Vr/f/Yviw8h1DQPQojbXqEChY0= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= @@ -303,8 +340,8 @@ github.com/coreos/ignition v0.35.0 h1:UFodoYq1mOPrbEjtxIsZbThcDyQwAI1owczRDqWmKk github.com/coreos/ignition v0.35.0/go.mod h1:WJQapxzEn9DE0ryxsGvm8QnBajm/XsS/PkrDqSpz+bA= github.com/coreos/ignition/v2 v2.1.1/go.mod h1:RqmqU64zxarUJa3l4cHtbhcSwfQLpUhv0WVziZwoXvE= github.com/coreos/ignition/v2 v2.3.0/go.mod h1:85dmM/CERMZXNrJsXqtNLIxR/dn8G9qlL1CmEjCugp0= -github.com/coreos/ignition/v2 v2.9.0 h1:Zl5N08OyqlECB8BrBlMDp3Jf1ShwVTtREPcUq/YO034= -github.com/coreos/ignition/v2 v2.9.0/go.mod h1:A5lFFzA2/zvZQPVEvI1lR5WPLWRb7KZ7Q1QOeUMtcAc= +github.com/coreos/ignition/v2 v2.13.0 h1:1ouW+d0nOuPUbLjxxOCnC+dWQxynr8Mt5exqJoCD7b4= +github.com/coreos/ignition/v2 v2.13.0/go.mod h1:HO1HWYWcvAIbHu6xewoKxPGBTyZ32FLwGIuipw5d63o= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -312,8 +349,8 @@ github.com/coreos/stream-metadata-go v0.1.8 h1:EbLlLia+Ekuqgh8nF4NNFs0jUqmhUbN4m github.com/coreos/stream-metadata-go v0.1.8/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko= github.com/coreos/vcontext v0.0.0-20190529201340-22b159166068/go.mod h1:E+6hug9bFSe0KZ2ZAzr8M9F5JlArJjv5D1JS7KSkPKE= github.com/coreos/vcontext v0.0.0-20191017033345-260217907eb5/go.mod h1:E+6hug9bFSe0KZ2ZAzr8M9F5JlArJjv5D1JS7KSkPKE= -github.com/coreos/vcontext v0.0.0-20201120045928-b0e13dab675c h1:jA28WeORitsxGFVWhyWB06sAG2HbLHPQuHwDydhU2CQ= -github.com/coreos/vcontext v0.0.0-20201120045928-b0e13dab675c/go.mod h1:z4pMVvaUrxs98RROlIYdAQCKhEicjnTirOaVyDRH5h8= +github.com/coreos/vcontext v0.0.0-20211021162308-f1dbbca7bef4 h1:pfSsrvbjUFGINaPGy0mm2QKQKTdq7IcbUa+nQwsz2UM= +github.com/coreos/vcontext v0.0.0-20211021162308-f1dbbca7bef4/go.mod h1:HckqHnP/HI41vS0bfVjJ20u6jD0biI5+68QwZm5Xb9U= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -321,6 +358,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/danielerez/go-dns-client v0.0.0-20200630114514-0b60d1703f0b/go.mod h1:2l39JZ3DOxVtByPDmp0Zhh4xS7603UHmeRtLCKzqQdQ= github.com/dave/dst v0.26.2/go.mod h1:UMDJuIRPfyUCC78eFuB+SV/WI8oDeyFDvM/JR6NI3IU= github.com/dave/gopackages v0.0.0-20170318123100-46e7023ec56e/go.mod h1:i00+b/gKdIDIxuLDFob7ustLAVqhsZRk2qVZrArELGQ= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -332,20 +371,31 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/diskfs/go-diskfs v1.1.2-0.20210216073915-ba492710e2d8/go.mod h1:ZTeTbzixuyfnZW5y5qKMtjV2o+GLLHo1KfMhotJI4Rk= +github.com/diskfs/go-diskfs v1.2.1-0.20210727185522-a769efacd235 h1:+NFKI4ptfB3AKeut6a538wanUHOKEMwZfznBZZ6a5Qc= +github.com/diskfs/go-diskfs v1.2.1-0.20210727185522-a769efacd235/go.mod h1:IoDpuEbpS+D+yCGdoOm6GNfyTeEws77ALvcMQFxmenw= +github.com/docker/cli v20.10.11+incompatible h1:tXU1ezXcruZQRrMP8RN2z9N91h+6egZTS1gsPsKantc= +github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20180920194744-16128bbac47f/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.0.0-20190731215715-7f13a5c99f4b/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= @@ -358,6 +408,10 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-licenser v0.3.1/go.mod h1:D8eNQk70FOCVBl3smCGQt/lv7meBeQno2eI1S5apiHQ= +github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= @@ -366,6 +420,8 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.10.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.12.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.14.2+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -377,6 +433,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -393,6 +450,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/filanov/stateswitch v0.0.0-20200714113403-51a42a34c604/go.mod h1:GYnXtGE0e/uuFBz4CbjJL0JmP3DWwzGtcpjZYYC9ikc= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.1+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -400,6 +458,9 @@ github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNy github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= +github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= @@ -414,11 +475,14 @@ github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2H github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= +github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= @@ -433,6 +497,7 @@ github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gormigrate/gormigrate/v2 v2.0.0/go.mod h1:YuVJ+D/dNt4HWrThTBnjgZuRbt7AuwINeg4q52ZE3Jw= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -583,6 +648,7 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -638,7 +704,10 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -647,14 +716,20 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259/go.mod h1:9Qcha0gTWLw//0VNka1Cbnjvg3pNKGFdAm7E9sBabxE= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -765,20 +840,25 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v0.0.0-20170306145142-6a5e28554805/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -798,7 +878,9 @@ github.com/gophercloud/utils v0.0.0-20210720165645-8a3ad2ad9e70/go.mod h1:wx8HMD github.com/gophercloud/utils v0.0.0-20220307143606-8e7800759d16 h1:slt/exMiitZNY+5OrKJ6ZvSogqN+SyzeYzAtyI6db9A= github.com/gophercloud/utils v0.0.0-20220307143606-8e7800759d16/go.mod h1:qOGlfG6OIJ193/c3Xt/XjOfHataNZdQcVgiu93LxBUM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20190601041439-ed7b1b5ee0f8/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v0.0.0-20191024121256-f395758b854c/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -824,6 +906,7 @@ github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBt github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -837,6 +920,8 @@ github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrj github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= @@ -852,6 +937,7 @@ github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -889,6 +975,7 @@ github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -902,12 +989,92 @@ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= +github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.6.4/go.mod h1:w2pne1C2tZgP+TvjqLpOigGzNqjBgQW9dUw/4Chex78= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.10.1 h1:DzdIHIjG1AxGwoEEqS+mGsURyjt4enSmqzACXvVzOT8= +github.com/jackc/pgconn v1.10.1/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.0.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.2.0 h1:r7JypeP2D3onoQTCxWdTpCtJ4D+qpKr0TxvoyMhZ5ns= +github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= +github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= +github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= +github.com/jackc/pgtype v1.4.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= +github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= +github.com/jackc/pgtype v1.8.0/go.mod h1:PqDKcEBtllAtk/2p6z6SHdXW5UB+MhE75tUol2OKexE= +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= +github.com/jackc/pgtype v1.9.0 h1:/SH1RxEtltvJgsDqp3TbiTFApD3mey3iygpuEGeuBXk= +github.com/jackc/pgtype v1.9.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= +github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= +github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= +github.com/jackc/pgx/v4 v4.8.1/go.mod h1:4HOLxrl8wToZJReD04/yB20GDwf4KBYETvlHciCnwW0= +github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= +github.com/jackc/pgx/v4 v4.12.0/go.mod h1:fE547h6VulLPA3kySjfnSG/e2D861g/50JlVUa/ub60= +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= +github.com/jackc/pgx/v4 v4.14.0 h1:TgdrmgnM7VY72EuSQzBbBd4JA1RLqJolrw9nQVZABVc= +github.com/jackc/pgx/v4 v4.14.0/go.mod h1:jT3ibf/A0ZVCp89rtCIN0zCJxcE74ypROmHEZYsG/j8= +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.2.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jcchavezs/porto v0.1.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jgautheron/goconst v0.0.0-20170703170152-9740945f5dcb/go.mod h1:82TxjOpWQiPmywlbIaB2ZkqJoSYJdLGPgAJDvM3PbKc= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= +github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= +github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -917,6 +1084,7 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -940,12 +1108,15 @@ github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVY github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kdomanski/iso9660 v0.2.1 h1:IepyfCeEqx77rZeOM4XZgWB4XJWEF7Jp+1ehMTrSElg= github.com/kdomanski/iso9660 v0.2.1/go.mod h1:LY50s7BlG+ES6V99oxYGd0ub9giLrKdHZb3LLOweBj0= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= @@ -959,10 +1130,12 @@ github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -985,11 +1158,19 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubernetes-sigs/kube-storage-version-migrator v0.0.0-20191127225502-51849bc15f17/go.mod h1:enH0BVV+4+DAgWdwSlMefG8bBzTfVMTr1lApzdLZ/cc= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.1.16/go.mod h1:awO+5TzAjvL8XpibdsfXxPgHr+orhtXZJZIQCVjogKI= +github.com/labstack/echo/v4 v4.1.17/go.mod h1:Tn2yRQL/UclUalpb5rPdXDevbkJ+lp/2svdyFBg6CHQ= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libvirt/libvirt-go v4.10.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE= github.com/libvirt/libvirt-go v5.10.0+incompatible h1:01fwkdUHH2hk4YyFNCr48OvSGqXYLzp9cofUpeyeLNc= github.com/libvirt/libvirt-go v5.10.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE= @@ -1024,12 +1205,16 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1038,13 +1223,18 @@ github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= +github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mibk/dupl v1.0.0/go.mod h1:pCr4pNxxIbFGvtyCOi0c7LVjmV6duhKWV+ex5vh38ME= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/microcosm-cc/bluemonday v1.0.15/go.mod h1:ZLvAzeakRwrGnzQEvstVzVt3ZpqOF2+sdFr0Om+ce30= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1075,10 +1265,15 @@ github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/moby v20.10.12+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/moby/sys/mountinfo v0.3.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -1093,6 +1288,8 @@ github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtrmac/gpgme v0.1.2/go.mod h1:GYYHnGSuS7HK3zVS2n3y73y0okK/BeKzwnn5jgiVFNI= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1128,6 +1325,7 @@ github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FW github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= @@ -1140,9 +1338,11 @@ github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvw github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= @@ -1154,44 +1354,38 @@ github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je4 github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.0 h1:ngbYoRctxjl8SiF7XgP0NxBFbfHcg3wfHMMaFHWwMTM= +github.com/onsi/gomega v1.18.0/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 h1:yN8BPXVwMBAm3Cuvh1L5XE8XpvYRMdsVLd82ILprhUU= github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.0.0-20191031171055-b133feaeeb2e/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc90/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc91/go.mod h1:3Sm6Dt7OT8z88EbdQqqcRN2oCT54jbi72tT/HqgflT8= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= github.com/opencontainers/selinux v1.5.2/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= -github.com/openshift/api v0.0.0-20200326152221-912866ddb162/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= -github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= -github.com/openshift/api v0.0.0-20200424083944-0422dc17083e/go.mod h1:VnbEzX8SAaRj7Yfl836NykdQIlbEjfL6/CD+AaJQg5Q= -github.com/openshift/api v0.0.0-20200827090112-c05698d102cf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8= -github.com/openshift/api v0.0.0-20200829102639-8a3a835f1acf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8= -github.com/openshift/api v0.0.0-20200901182017-7ac89ba6b971/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8= -github.com/openshift/api v0.0.0-20201214114959-164a2fb63b5f/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= -github.com/openshift/api v0.0.0-20201216151826-78a19e96f9eb/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= -github.com/openshift/api v0.0.0-20210331162552-3e31249e6a55/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210331193751-3acddb19d360/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210409143810-a99ffa1cac67/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210412212256-79bd8cfbbd59/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210416115537-a60c0dc032fd/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210730095913-85e1d547cdee/go.mod h1:ntkQrC1Z6AxxkhDlVpDVjkD+pzdwVUalWyfH40rSyyM= -github.com/openshift/api v0.0.0-20210816181336-8ff39b776da3/go.mod h1:x81TFA31x1OMT9SYWukQqJ/KbmeveRN6fo+XeGRK8g0= -github.com/openshift/api v0.0.0-20211025104849-a11323ccb6ea/go.mod h1:RsQCVJu4qhUawxxDP7pGlwU3IA4F01wYm3qKEu29Su8= -github.com/openshift/api v0.0.0-20211108165917-be1be0e89115/go.mod h1:RsQCVJu4qhUawxxDP7pGlwU3IA4F01wYm3qKEu29Su8= -github.com/openshift/api v0.0.0-20211209135129-c58d9f695577/go.mod h1:DoslCwtqUpr3d/gsbq4ZlkaMEdYqKxuypsDjorcHhME= -github.com/openshift/api v0.0.0-20211215120111-7c47a5f63470/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= -github.com/openshift/api v0.0.0-20211217221424-8779abfbd571/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= -github.com/openshift/api v0.0.0-20220204103739-31ffd77a8f02/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/openshift-online/ocm-sdk-go v0.1.205/go.mod h1:iOhkt/6nFp9v7hasdmGbYlR/YKeUoaZKq5ZBrtyKwKg= github.com/openshift/api v0.0.0-20220404140913-04e1813ebb11 h1:lNq43y5YhxBTf+AD7CpHEKiW7hi/4OQ1VlOPH3CpoMg= github.com/openshift/api v0.0.0-20220404140913-04e1813ebb11/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= +github.com/openshift/assisted-image-service v0.0.0-20220307202600-054a1afa8d28 h1:TOB7zzhxIfUBJG0RXoU0LGRj3p9AzEKEVUaNJNKhFNA= +github.com/openshift/assisted-image-service v0.0.0-20220307202600-054a1afa8d28/go.mod h1:bH4+AsmPy8mQQvtgedBm2Crs93TDWeXEMlIPrlEMpjA= +github.com/openshift/assisted-service v1.0.10-0.20220223093655-7ada9949bf1d h1:n5eonnzsP0tD9EEF4uiu9D+ayTRamid11snRUc+BmfU= +github.com/openshift/assisted-service v1.0.10-0.20220223093655-7ada9949bf1d/go.mod h1:4CDUwTbuv+XO0JAdnXi0+lFIwLzLwxrQMmT+WaIn264= github.com/openshift/baremetal-operator v0.0.0-20220128094204-28771f489634 h1:HMxwhxQKSamgM3RpvbUwUKrnD39fEAWrEYaueTHVRmY= github.com/openshift/baremetal-operator v0.0.0-20220128094204-28771f489634/go.mod h1:fKoRJ8B07os5e+LFLvhFSS2g8nTODZW/J5jKw4dsQ18= github.com/openshift/baremetal-operator/apis v0.0.0-20220128094204-28771f489634 h1:TfLz0GbuVWt0bKNK+71JeYHIAemjcnE1fAVgqMgw2Ac= @@ -1208,6 +1402,7 @@ github.com/openshift/build-machinery-go v0.0.0-20210806203541-4ea9b6da3a37/go.mo github.com/openshift/build-machinery-go v0.0.0-20211213093930-7e33a7eb4ce3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0/go.mod h1:uUQ4LClRO+fg5MF/P6QxjMCb1C9f7Oh4RKepftDnEJE= github.com/openshift/client-go v0.0.0-20200827190008-3062137373b5/go.mod h1:5rGmrkQ8DJEUXA+AR3rEjfH+HFyg4/apY9iCQFgvPfE= +github.com/openshift/client-go v0.0.0-20201020074620-f8fd44879f7c/go.mod h1:yZ3u8vgWC19I9gbDMRk8//9JwG/0Sth6v7C+m6R8HXs= github.com/openshift/client-go v0.0.0-20201214125552-e615e336eb49/go.mod h1:9/jG4I6sh+5QublJpZZ4Zs/P4/QCXMsQQ/K/058bSB8= github.com/openshift/client-go v0.0.0-20210331195552-cf6c2669e01f/go.mod h1:hHaRJ6vp2MRd/CpuZ1oJkqnMGy5eEnoAkQmKPZKcUPI= github.com/openshift/client-go v0.0.0-20210409155308-a8e62c60e930/go.mod h1:uBPbAyIbjMuhPQy4NgF8q1alNGX2qA8bXIkAycsSDc0= @@ -1240,6 +1435,11 @@ github.com/openshift/cluster-api-provider-openstack v0.0.0-20211111204942-611d32 github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20220323121149-e3f2850dd519 h1:foU7/s6DQczTFdZ/8H++pUC2Pzygqdz5ZgqUakksR5w= github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20220323121149-e3f2850dd519/go.mod h1:C7unCUThP8eqT4xQfbvg3oIDn2S9TYtb0wbBoH/SR2U= github.com/openshift/cluster-autoscaler-operator v0.0.0-20190521201101-62768a6ba480/go.mod h1:/XmV44Fh28Vo3Ye93qFrxAbcFJ/Uy+7LPD+jGjmfJYc= +github.com/openshift/custom-resource-status v1.1.0 h1:EjSh0f3vF6eaS3zAToVHUXcS7N2jVEosUFJ0sRKvmZ0= +github.com/openshift/custom-resource-status v1.1.0/go.mod h1:GDjWl0tX6FNIj82vIxeudWeSx2Ff6nDZ8uJn0ohUFvo= +github.com/openshift/generic-admission-server v1.14.1-0.20210422140326-da96454c926d/go.mod h1:m+wYlVQdnPe8JGqoKVpCYnFRIVraqC1SrUowQXh6XlA= +github.com/openshift/hive/apis v0.0.0-20210506000654-5c038fb05190 h1:8eShHtqtKwgJWdJh/H0ytAsAblDCA1bAjvokIfuU2jM= +github.com/openshift/hive/apis v0.0.0-20210506000654-5c038fb05190/go.mod h1:Ujw9ImzSYvo9VlUX6Gjy7zPFP7xYUAU50tdf1wPpN6c= github.com/openshift/library-go v0.0.0-20191003152030-97c62d8a2901/go.mod h1:NBttNjZpWwup/nthuLbPAPSYC8Qyo+BBK5bCtFoyYjo= github.com/openshift/library-go v0.0.0-20200512120242-21a1ff978534/go.mod h1:2kWwXTkpoQJUN3jZ3QW88EIY1hdRMqxgRs2hheEW/pg= github.com/openshift/library-go v0.0.0-20200831114015-2ab0c61c15de/go.mod h1:6vwp+YhYOIlj8MpkQKkebTTSn2TuYyvgiAFQ206jIEQ= @@ -1279,11 +1479,17 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/operator-framework/operator-sdk v0.5.1-0.20190301204940-c2efe6f74e7b/go.mod h1:iVyukRkam5JZa8AnjYf+/G3rk7JI1+M6GsU0sq0B9NA= +github.com/ory/dockertest/v3 v3.8.1 h1:vU/8d1We4qIad2YM0kOwRVtnyue7ExvacPiw1yDm17g= +github.com/ory/dockertest/v3 v3.8.1/go.mod h1:wSRQ3wmkz+uSARYMk7kVJFDBGm8x5gSxIhI7NDc+BAQ= github.com/ostreedev/ostree-go v0.0.0-20190702140239-759a8c1ac913/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc= -github.com/ovirt/go-ovirt v0.0.0-20210308100159-ac0bcbc88d7c h1:2SbYZedeIawU8sGFnohfrdEcEMBA4V8SDouG6hly+H4= github.com/ovirt/go-ovirt v0.0.0-20210308100159-ac0bcbc88d7c/go.mod h1:fLDxPk1Sf64DBYtwIYxrnx3gPZ1q0xPdWdI1y9vxUaw= +github.com/ovirt/go-ovirt v0.0.0-20210809163552-d4276e35d3db h1:ahvAlEurj4TF1SExDJHNeqknQC8lAwnZEPLyZJuRyd0= +github.com/ovirt/go-ovirt v0.0.0-20210809163552-d4276e35d3db/go.mod h1:Zkdj9/rW6eyuw0uOeEns6O3pP5G2ak+bI/tgkQ/tEZI= +github.com/ovirt/go-ovirt-client v0.7.1/go.mod h1:LvCGQgqp9TmreCfbYXkVxDVNgmZ9/6e2fWtO58IH+oc= +github.com/ovirt/go-ovirt-client-log/v2 v2.1.0/go.mod h1:mDoU3KIwftpsgZGzXGk5d2UEJYTY0bYMfg/GwPapXL0= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= @@ -1292,14 +1498,18 @@ github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.3.0+incompatible h1:CZzRn4Ut9GbUkHlQ7jqBXeZQV41ZSKWFc302ZU6lUTk= +github.com/pierrec/lz4 v2.3.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pin/tftp v2.1.0+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1307,6 +1517,8 @@ github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6J github.com/pkg/profile v1.3.0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/xattr v0.4.1 h1:dhclzL6EqOXNaPDWqoeb9tIxATfBSmjqL0b4DpSjwRw= +github.com/pkg/xattr v0.4.1/go.mod h1:W2cGD0TBEus7MkUgv0tNZ9JutLtVO3cXu+IBRuHqnFs= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1316,6 +1528,7 @@ github.com/ppc64le-cloud/powervs-utils v0.0.0-20210415051532-4cdd6a79c8fa/go.mod github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.49.0/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -1324,11 +1537,14 @@ github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1344,26 +1560,33 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/statsd_exporter v0.15.0/go.mod h1:Dv8HnkoLQkeEjkIE4/2ndAA7WL1zHKK7WMqFQqu72rw= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1375,16 +1598,22 @@ github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYe github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.0.2/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do= github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -1394,6 +1623,9 @@ github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= @@ -1420,6 +1652,7 @@ github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYED github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -1429,6 +1662,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/slok/go-http-metrics v0.8.0/go.mod h1:f22ekj0Ht4taz2clntVmLRSK4D+feX33zkdDW0Eytvk= +github.com/slok/go-http-metrics v0.9.0/go.mod h1:VCio4Xl8m11JM/0Sl9265RdKyiMypzMo3w1M8xcZGtk= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1446,6 +1681,7 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= @@ -1458,6 +1694,7 @@ github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1: github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1486,11 +1723,16 @@ github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stripe/safesql v0.2.0/go.mod h1:q7b2n0JmzM1mVGfcYpanfVb2j23cXZeWFxcILPn3JV4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tetafro/godot v0.2.5/go.mod h1:pT6/T8+h6//L/LwQcFc4C0xpfy1euZwzS1sHdrFCms0= +github.com/thedevsaddam/retry v0.0.0-20200324223450-9769a859cc6d/go.mod h1:2rz2mY+1qEXG47loLDkV+ZJHGFwmhax5rOTpP+5aR80= +github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= +github.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= @@ -1499,31 +1741,42 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9/go.mod h1:q+QjxYvZ+fpjMXqs+XEriussHjSYqeXVnAdSV1tkMYk= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= +github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.0.1/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g= github.com/vbauerster/mpb/v5 v5.2.2/go.mod h1:W5Fvgw4dm3/0NhqzV8j6EacfuTe5SvnzBRwiXxDR9ww= +github.com/vbauerster/mpb/v5 v5.3.0/go.mod h1:4yTkvAb8Cm4eylAp6t0JRq6pXDkFJ4krUlDqWYkakAs= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vincent-petithory/dataurl v0.0.0-20160330182126-9a301d65acbb/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= -github.com/vincent-petithory/dataurl v0.0.0-20191104211930-d1553a71de50 h1:uxE3GYdXIOfhMv3unJKETJEhw78gvzuQqRX/rVirc2A= -github.com/vincent-petithory/dataurl v0.0.0-20191104211930-d1553a71de50/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= +github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= +github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -1534,6 +1787,7 @@ github.com/vmware/govmomi v0.24.0 h1:G7YFF6unMTG3OY25Dh278fsomVTKs46m2ENlEFSbmbs github.com/vmware/govmomi v0.24.0/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc= github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk= github.com/vmware/vmw-ovflib v0.0.0-20170608004843-1f217b9dc714/go.mod h1:jiPk45kn7klhByRvUq5i2vo1RtHKBHj+iWGFpxbXuuI= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -1543,8 +1797,11 @@ github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhe github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190809123943-df4f5c81cb3b/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= @@ -1566,6 +1823,11 @@ github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0 github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +go.elastic.co/apm v1.15.0/go.mod h1:dylGv2HKR0tiCV+wliJz1KHtDyuD8SPe69oV7VyK6WY= +go.elastic.co/apm/module/apmhttp v1.15.0/go.mod h1:NruY6Jq8ALLzWUVUQ7t4wIzn+onKoiP5woJJdTV7GMg= +go.elastic.co/apm/module/apmlogrus v1.15.0/go.mod h1:mvs7soORJBrUyqNgj+9/5f8Z8//W1L849RkCF7Thhu0= +go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1595,6 +1857,7 @@ go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R7 go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.8.3 h1:TDKlTkGDKm9kkJVUOAXDK5/fkqKHJVwYQSpoRfB43R4= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1649,8 +1912,10 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20191010144846-132d2879e1e9/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200104003542-c7e774b10ea0/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +goji.io v2.0.2+incompatible/go.mod h1:sbqFwrtqZACxLBTQcdgVjFh54yGVCvwq8+w49MVMMIk= golang.org/x/arch v0.0.0-20180920145803-b19384d3c130/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1661,6 +1926,8 @@ golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1671,20 +1938,29 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1730,6 +2006,7 @@ golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1833,6 +2110,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1841,6 +2119,7 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181021155630-eda9bb28ed51/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1864,11 +2143,13 @@ golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1876,9 +2157,12 @@ golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1894,7 +2178,9 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1905,8 +2191,11 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1939,8 +2228,9 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1994,6 +2284,7 @@ golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -2006,6 +2297,7 @@ golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190909030654-5b82db07426d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2024,8 +2316,8 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200102200121-6de373a2766c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2068,6 +2360,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2230,6 +2524,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/djherbis/times.v1 v1.2.0 h1:UCvDKl1L/fmBygl2Y7hubXCnY7t4Yj46ZrBFNUipFbM= +gopkg.in/djherbis/times.v1 v1.2.0/go.mod h1:AQlg6unIsrsCEdQYhTzERy542dz6SFdQFZFv6mUY0P8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -2239,17 +2535,20 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8 gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.0/go.mod h1:tm33zBoOwxjYHZIE+OV8bxTWFMJLrconzFMd38aARFk= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -2274,6 +2573,16 @@ gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.0.1/go.mod h1:KtqSthtg55lFp3S5kUXqlGaelnWpKitn4k1xZTnoiPw= +gorm.io/driver/postgres v1.0.0/go.mod h1:wtMFcOzmuA5QigNsgEIb7O5lhvH1tHAF1RbWmLWV4to= +gorm.io/driver/postgres v1.2.3 h1:f4t0TmNMy9gh3TU2PX+EppoA6YsgFnyq8Ojtddb42To= +gorm.io/driver/postgres v1.2.3/go.mod h1:pJV6RgYQPG47aM1f0QeOzFH9HxQc8JcmAgjRCgS0wjs= +gorm.io/driver/sqlite v1.1.1/go.mod h1:hm2olEcl8Tmsc6eZyxYSeznnsDaMqamBvEXLNtBg4cI= +gorm.io/driver/sqlserver v1.0.2/go.mod h1:gb0Y9QePGgqjzrVyTQUZeh9zkd5v0iz71cM1B4ZycEY= +gorm.io/gorm v1.9.19/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= +gorm.io/gorm v1.20.0/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= +gorm.io/gorm v1.22.3 h1:/JS6z+GStEQvJNW3t1FTwJwG/gZ+A7crFdRqtvG5ehA= +gorm.io/gorm v1.22.3/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= @@ -2286,17 +2595,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= +k8s.io/api v0.0.0-20190725062911-6607c48751ae/go.mod h1:1O0xzX/RAtnm7l+5VEUxZ1ysO2ghatfq/OZED4zM9kA= k8s.io/api v0.18.0-beta.2/go.mod h1:2oeNnWEqcSmaM/ibSh3t7xcIqbkGXhzZdn4ezV9T4m0= k8s.io/api v0.18.0-rc.1/go.mod h1:ZOh6SbHjOYyaMLlWmB2+UOQKEWDpCnVEVpEyt7S2J9s= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.19.5/go.mod h1:yGZReuNa0vj56op6eT+NLrXJne0R0u9ktexZ8jdJzpc= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= k8s.io/api v0.21.0-rc.0/go.mod h1:Dkc/ZauWJrgZhjOjeBgW89xZQiTBJA2RaBKYHXPsi2Y= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/api v0.21.4/go.mod h1:fTVGP+M4D8+00FN2cMnJqk/eb/GH53bvmNs2SVTmpFk= @@ -2308,12 +2622,14 @@ k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= k8s.io/apiextensions-apiserver v0.18.0-beta.2/go.mod h1:Hnrg5jx8/PbxRbUoqDGxtQkULjwx8FDW4WYJaKNK+fk= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apiextensions-apiserver v0.18.3/go.mod h1:TMsNGs7DYpMXd+8MOCX8KzPOCx8fnZMoIGB24m03+JE= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apiextensions-apiserver v0.19.0/go.mod h1:znfQxNpjqz/ZehvbfMg5N6fvBJW5Lqu5HVLTJQdP4Fs= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= k8s.io/apiextensions-apiserver v0.20.0/go.mod h1:ZH+C33L2Bh1LY1+HphoRmN1IQVLTShVcTojivK3N9xg= k8s.io/apiextensions-apiserver v0.21.0-rc.0/go.mod h1:ItIoMBJU1gy93Qwr/B2699r4b0VmZqAOU+15BvozxMY= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= +k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA= k8s.io/apiextensions-apiserver v0.21.2/go.mod h1:+Axoz5/l3AYpGLlhJDfcVQzCerVYq3K3CvDMvw6X1RA= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apiextensions-apiserver v0.21.4/go.mod h1:OoC8LhI9LnV+wKjZkXIBbLUwtnOGJiTRE33qctH5CIk= @@ -2321,13 +2637,16 @@ k8s.io/apiextensions-apiserver v0.22.0-rc.0/go.mod h1:KSr+2VJ6ye8Fy50q7xHZ/Tw8vr k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/apimachinery v0.0.0-20190719140911-bfcf53abc9f8/go.mod h1:sBJWIJZfxLhp7mRsRyuAE/NfKTr3kXGR1iaqg8O0gJo= k8s.io/apimachinery v0.18.0-beta.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.0-rc.1/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.19.5/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.21.0-rc.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= @@ -2342,12 +2661,14 @@ k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apiserver v0.18.0-beta.2/go.mod h1:bnblMkMoCFnIfVnVftd0SXJPzyvrk3RtaqSbblphF/A= k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= +k8s.io/apiserver v0.18.3/go.mod h1:tHQRmthRPLUtwqsOnJJMoI8SW3lnoReZeE861lH8vUw= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/apiserver v0.19.0/go.mod h1:XvzqavYj73931x7FLtyagh8WibHpePJ1QwWrSJs2CLk= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= k8s.io/apiserver v0.20.0/go.mod h1:6gRIWiOkvGvQt12WTYmsiYoUyYW0FXSiMdNl4m+sxY8= k8s.io/apiserver v0.21.0-rc.0/go.mod h1:QlW7+1CZTZtAcKvJ34/n4DIb8sC93FeQpkd1KSU+Sok= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= +k8s.io/apiserver v0.21.1/go.mod h1:nLLYZvMWn35glJ4/FZRhzLG/3MPxAaZTgV4FJZdr+tY= k8s.io/apiserver v0.21.2/go.mod h1:lN4yBoGyiNT7SC1dmNk0ue6a5Wi6O3SWOIw91TsucQw= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= k8s.io/apiserver v0.21.4/go.mod h1:SErUuFBBPZUcD2nsUU8hItxoYheqyYr2o/pCINEPW8g= @@ -2363,17 +2684,20 @@ k8s.io/cli-runtime v0.23.0/go.mod h1:B5N3YH0KP1iKr6gEuJ/RRmGjO0mJQ/f/JrsmEiPQAlU k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/cluster-bootstrap v0.0.0-20190202014938-c9acc0c1bea2/go.mod h1:iBSm2nwo3OaiuW8VDvc3ySDXK5SKfUrxwPvBloKG7zg= +k8s.io/code-generator v0.0.0-20190717022600-77f3a1fe56bb/go.mod h1:cDx5jQmWH25Ff74daM7NVYty9JWw9dvIS9zT9eIubCY= k8s.io/code-generator v0.0.0-20191003035328-700b1226c0bd/go.mod h1:HC9p4y3SBN+txSs8x57qmNPXFZ/CxdCHiDTNnocCSEw= k8s.io/code-generator v0.18.0-beta.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.0-rc.1/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/code-generator v0.21.0-rc.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/code-generator v0.21.2/go.mod h1:8mXJDCB7HcRo1xiEQstcguZkbxZaqeUOrO9SsicWs3U= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.21.4/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= @@ -2384,12 +2708,15 @@ k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9Mvo k8s.io/component-base v0.18.0-beta.2/go.mod h1:HVk5FpRnyzQ/MjBr9//e/yEBjTVa2qjGXCTuUzcD7ks= k8s.io/component-base v0.18.0-rc.1/go.mod h1:NNlRaxZEdLqTs2+6yXiU2SHl8gKsbcy19Ii+Sfq53RM= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= +k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= +k8s.io/component-base v0.19.5/go.mod h1:5N/uv5A7fyr0d+t/b1HynXKkUVPEhc8ljkMaBJv4Tp8= k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA= k8s.io/component-base v0.21.0-rc.0/go.mod h1:XlP0bM7QJFWRGZYPc5NmphkvsYQ+o7804HWH3GTGjDY= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= +k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA= k8s.io/component-base v0.21.2/go.mod h1:9lvmIThzdlrJj5Hp8Z/TOgIkdfsNARQ1pT+3PByuiuc= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= k8s.io/component-base v0.21.4/go.mod h1:ZKG0eHVX+tUDcaoIGpU3Vtk4TIjMddN9uhEWDmW6Nyg= @@ -2412,6 +2739,7 @@ k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAE k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -2431,6 +2759,7 @@ k8s.io/kube-aggregator v0.22.0-rc.0/go.mod h1:g0xtiBSsbMKvewN7xR/Icib4TrHxtvrJcH k8s.io/kube-aggregator v0.23.0/go.mod h1:b1vpoaTWKZjCzvbe1KXFw3vPbISrghJsg7/RI8oZUME= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= @@ -2496,6 +2825,7 @@ sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526h sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= sigs.k8s.io/controller-runtime v0.9.0-alpha.1.0.20210413130450-7ef2da0bc161/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= sigs.k8s.io/controller-runtime v0.9.0-beta.1.0.20210512131817-ce2f0c92d77e/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= +sigs.k8s.io/controller-runtime v0.9.0/go.mod h1:TgkfvrhhEw3PlI0BRL/5xM+89y3/yc0ZDfdbTl84si8= sigs.k8s.io/controller-runtime v0.9.3/go.mod h1:TxzMCHyEUpaeuOiZx/bIdc2T81vfs/aKdvJt9wuu0zk= sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= sigs.k8s.io/controller-runtime v0.9.7/go.mod h1:nExcHcQ2zvLMeoO9K7rOesGCmgu32srN5SENvpAEbGA= diff --git a/vendor/github.com/cavaliercoder/go-cpio/.gitignore b/vendor/github.com/cavaliercoder/go-cpio/.gitignore new file mode 100644 index 0000000000..b6a80842d4 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/.gitignore @@ -0,0 +1,3 @@ +.fuzz/ +*.zip + diff --git a/vendor/github.com/cavaliercoder/go-cpio/.travis.yml b/vendor/github.com/cavaliercoder/go-cpio/.travis.yml new file mode 100644 index 0000000000..580243c933 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/.travis.yml @@ -0,0 +1,10 @@ +language: go + +go: + - 1.4.3 + - 1.5.4 + - 1.6.4 + - 1.7.6 + - 1.8.3 + +script: make check diff --git a/vendor/github.com/cavaliercoder/go-cpio/LICENSE b/vendor/github.com/cavaliercoder/go-cpio/LICENSE new file mode 100644 index 0000000000..7f377a1b68 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2017 Ryan Armstrong. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/cavaliercoder/go-cpio/Makefile b/vendor/github.com/cavaliercoder/go-cpio/Makefile new file mode 100644 index 0000000000..8294588313 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/Makefile @@ -0,0 +1,18 @@ +PACKAGE = github.com/cavaliercoder/go-cpio + +all: check + +check: + go test -v + +cpio-fuzz.zip: *.go + go-fuzz-build $(PACKAGE) + +fuzz: cpio-fuzz.zip + go-fuzz -bin=./cpio-fuzz.zip -workdir=.fuzz/ + +clean-fuzz: + rm -rf cpio-fuzz.zip .fuzz/crashers/* .fuzz/suppressions/* + + +.PHONY: all check diff --git a/vendor/github.com/cavaliercoder/go-cpio/README.md b/vendor/github.com/cavaliercoder/go-cpio/README.md new file mode 100644 index 0000000000..0a322ed9a0 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/README.md @@ -0,0 +1,62 @@ +# go-cpio [![GoDoc](https://godoc.org/github.com/cavaliercoder/go-cpio?status.svg)](https://godoc.org/github.com/cavaliercoder/go-cpio) [![Build Status](https://travis-ci.org/cavaliercoder/go-cpio.svg?branch=master)](https://travis-ci.org/cavaliercoder/go-cpio) [![Go Report Card](https://goreportcard.com/badge/github.com/cavaliercoder/go-cpio)](https://goreportcard.com/report/github.com/cavaliercoder/go-cpio) + +This package provides a Go native implementation of the CPIO archive file +format. + +Currently, only the SVR4 (New ASCII) format is supported, both with and without +checksums. + +```go +// Create a buffer to write our archive to. +buf := new(bytes.Buffer) + +// Create a new cpio archive. +w := cpio.NewWriter(buf) + +// Add some files to the archive. +var files = []struct { + Name, Body string +}{ + {"readme.txt", "This archive contains some text files."}, + {"gopher.txt", "Gopher names:\nGeorge\nGeoffrey\nGonzo"}, + {"todo.txt", "Get animal handling license."}, +} +for _, file := range files { + hdr := &cpio.Header{ + Name: file.Name, + Mode: 0600, + Size: int64(len(file.Body)), + } + if err := w.WriteHeader(hdr); err != nil { + log.Fatalln(err) + } + if _, err := w.Write([]byte(file.Body)); err != nil { + log.Fatalln(err) + } +} +// Make sure to check the error on Close. +if err := w.Close(); err != nil { + log.Fatalln(err) +} + +// Open the cpio archive for reading. +b := bytes.NewReader(buf.Bytes()) +r := cpio.NewReader(b) + +// Iterate through the files in the archive. +for { + hdr, err := r.Next() + if err == io.EOF { + // end of cpio archive + break + } + if err != nil { + log.Fatalln(err) + } + fmt.Printf("Contents of %s:\n", hdr.Name) + if _, err := io.Copy(os.Stdout, r); err != nil { + log.Fatalln(err) + } + fmt.Println() +} +``` diff --git a/vendor/github.com/cavaliercoder/go-cpio/cpio.go b/vendor/github.com/cavaliercoder/go-cpio/cpio.go new file mode 100644 index 0000000000..beebf39f55 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/cpio.go @@ -0,0 +1,8 @@ +/* +Package cpio implements access to CPIO archives. Currently, only the SVR4 (New +ASCII) format is supported, both with and without checksums. + +References: + https://www.freebsd.org/cgi/man.cgi?query=cpio&sektion=5 +*/ +package cpio diff --git a/vendor/github.com/cavaliercoder/go-cpio/fileinfo.go b/vendor/github.com/cavaliercoder/go-cpio/fileinfo.go new file mode 100644 index 0000000000..55adab3321 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/fileinfo.go @@ -0,0 +1,75 @@ +package cpio + +import ( + "os" + "path" + "time" +) + +// headerFileInfo implements os.FileInfo. +type headerFileInfo struct { + h *Header +} + +// Name returns the base name of the file. +func (fi headerFileInfo) Name() string { + if fi.IsDir() { + return path.Base(path.Clean(fi.h.Name)) + } + return path.Base(fi.h.Name) +} + +func (fi headerFileInfo) Size() int64 { return fi.h.Size } +func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() } +func (fi headerFileInfo) ModTime() time.Time { return fi.h.ModTime } +func (fi headerFileInfo) Sys() interface{} { return fi.h } + +func (fi headerFileInfo) Mode() (mode os.FileMode) { + // Set file permission bits. + mode = os.FileMode(fi.h.Mode).Perm() + + // Set setuid, setgid and sticky bits. + if fi.h.Mode&ModeSetuid != 0 { + // setuid + mode |= os.ModeSetuid + } + if fi.h.Mode&ModeSetgid != 0 { + // setgid + mode |= os.ModeSetgid + } + if fi.h.Mode&ModeSticky != 0 { + // sticky + mode |= os.ModeSticky + } + + // Set file mode bits. + // clear perm, setuid, setgid and sticky bits. + m := os.FileMode(fi.h.Mode) & 0170000 + if m == ModeDir { + // directory + mode |= os.ModeDir + } + if m == ModeNamedPipe { + // named pipe (FIFO) + mode |= os.ModeNamedPipe + } + if m == ModeSymlink { + // symbolic link + mode |= os.ModeSymlink + } + if m == ModeDevice { + // device file + mode |= os.ModeDevice + } + if m == ModeCharDevice { + // Unix character device + mode |= os.ModeDevice + mode |= os.ModeCharDevice + } + if m == ModeSocket { + // Unix domain socket + mode |= os.ModeSocket + } + + return mode +} diff --git a/vendor/github.com/cavaliercoder/go-cpio/fuzz.go b/vendor/github.com/cavaliercoder/go-cpio/fuzz.go new file mode 100644 index 0000000000..7d13d4cb02 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/fuzz.go @@ -0,0 +1,35 @@ +// +build gofuzz + +package cpio + +import "bytes" +import "io" + +// Fuzz tests the parsing and error handling of random byte arrays using +// https://github.com/dvyukov/go-fuzz. +func Fuzz(data []byte) int { + r := NewReader(bytes.NewReader(data)) + h := NewHash() + for { + hdr, err := r.Next() + if err != nil { + if hdr != nil { + panic("hdr != nil on error") + } + if err == io.EOF { + // everything worked with random input... interesting + return 1 + } + // error returned for random input. Good! + return -1 + } + + // hash file + h.Reset() + io.CopyN(h, r, hdr.Size) + h.Sum32() + + // convert file header + FileInfoHeader(hdr.FileInfo()) + } +} diff --git a/vendor/github.com/cavaliercoder/go-cpio/hash.go b/vendor/github.com/cavaliercoder/go-cpio/hash.go new file mode 100644 index 0000000000..5eae7e8bd6 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/hash.go @@ -0,0 +1,45 @@ +package cpio + +import ( + "encoding/binary" + "hash" +) + +type digest struct { + sum uint32 +} + +// NewHash returns a new hash.Hash32 computing the SVR4 checksum. +func NewHash() hash.Hash32 { + return &digest{} +} + +func (d *digest) Write(p []byte) (n int, err error) { + for _, b := range p { + d.sum += uint32(b & 0xFF) + } + + return len(p), nil +} + +func (d *digest) Sum(b []byte) []byte { + out := [4]byte{} + binary.LittleEndian.PutUint32(out[:], d.sum) + return append(b, out[:]...) +} + +func (d *digest) Sum32() uint32 { + return d.sum +} + +func (d *digest) Reset() { + d.sum = 0 +} + +func (d *digest) Size() int { + return 4 +} + +func (d *digest) BlockSize() int { + return 1 +} diff --git a/vendor/github.com/cavaliercoder/go-cpio/header.go b/vendor/github.com/cavaliercoder/go-cpio/header.go new file mode 100644 index 0000000000..cba24e3c37 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/header.go @@ -0,0 +1,153 @@ +package cpio + +import ( + "errors" + "fmt" + "os" + "time" +) + +// Mode constants from the cpio spec. +const ( + ModeSetuid = 04000 // Set uid + ModeSetgid = 02000 // Set gid + ModeSticky = 01000 // Save text (sticky bit) + ModeDir = 040000 // Directory + ModeNamedPipe = 010000 // FIFO + ModeRegular = 0100000 // Regular file + ModeSymlink = 0120000 // Symbolic link + ModeDevice = 060000 // Block special file + ModeCharDevice = 020000 // Character special file + ModeSocket = 0140000 // Socket + + ModeType = 0170000 // Mask for the type bits + ModePerm = 0777 // Unix permission bits +) + +const ( + // headerEOF is the value of the filename of the last header in a CPIO archive. + headerEOF = "TRAILER!!!" +) + +var ( + ErrHeader = errors.New("cpio: invalid cpio header") +) + +// A FileMode represents a file's mode and permission bits. +type FileMode int64 + +func (m FileMode) String() string { + return fmt.Sprintf("%#o", m) +} + +// IsDir reports whether m describes a directory. That is, it tests for the +// ModeDir bit being set in m. +func (m FileMode) IsDir() bool { + return m&ModeDir != 0 +} + +// IsRegular reports whether m describes a regular file. That is, it tests for +// the ModeRegular bit being set in m. +func (m FileMode) IsRegular() bool { + return m&^ModePerm == ModeRegular +} + +// Perm returns the Unix permission bits in m. +func (m FileMode) Perm() FileMode { + return m & ModePerm +} + +// Checksum is the sum of all bytes in the file data. This sum is computed +// treating all bytes as unsigned values and using unsigned arithmetic. Only +// the least-significant 32 bits of the sum are stored. Use NewHash to compute +// the actual checksum of an archived file. +type Checksum uint32 + +func (c Checksum) String() string { + return fmt.Sprintf("%08X", uint32(c)) +} + +// A Header represents a single header in a CPIO archive. +type Header struct { + DeviceID int + Inode int64 // inode number + Mode FileMode // permission and mode bits + UID int // user id of the owner + GID int // group id of the owner + Links int // number of inbound links + ModTime time.Time // modified time + Size int64 // size in bytes + Name string // filename + Linkname string // target name of link + Checksum Checksum // computed checksum + + pad int64 // bytes to pad before next header +} + +// FileInfo returns an os.FileInfo for the Header. +func (h *Header) FileInfo() os.FileInfo { + return headerFileInfo{h} +} + +// FileInfoHeader creates a partially-populated Header from fi. +// If fi describes a symlink, FileInfoHeader records link as the link target. +// If fi describes a directory, a slash is appended to the name. +// Because os.FileInfo's Name method returns only the base name of +// the file it describes, it may be necessary to modify the Name field +// of the returned header to provide the full path name of the file. +func FileInfoHeader(fi os.FileInfo, link string) (*Header, error) { + if fi == nil { + return nil, errors.New("cpio: FileInfo is nil") + } + + if sys, ok := fi.Sys().(*Header); ok { + // This FileInfo came from a Header (not the OS). Return a copy of the + // original Header. + h := &Header{} + *h = *sys + return h, nil + } + + fm := fi.Mode() + h := &Header{ + Name: fi.Name(), + Mode: FileMode(fi.Mode().Perm()), // or'd with Mode* constants later + ModTime: fi.ModTime(), + Size: fi.Size(), + } + + switch { + case fm.IsRegular(): + h.Mode |= ModeRegular + case fi.IsDir(): + h.Mode |= ModeDir + h.Name += "/" + h.Size = 0 + case fm&os.ModeSymlink != 0: + h.Mode |= ModeSymlink + h.Linkname = link + case fm&os.ModeDevice != 0: + if fm&os.ModeCharDevice != 0 { + h.Mode |= ModeCharDevice + } else { + h.Mode |= ModeDevice + } + case fm&os.ModeNamedPipe != 0: + h.Mode |= ModeNamedPipe + case fm&os.ModeSocket != 0: + h.Mode |= ModeSocket + default: + return nil, fmt.Errorf("cpio: unknown file mode %v", fm) + } + if fm&os.ModeSetuid != 0 { + h.Mode |= ModeSetuid + } + if fm&os.ModeSetgid != 0 { + h.Mode |= ModeSetgid + } + if fm&os.ModeSticky != 0 { + h.Mode |= ModeSticky + } + + return h, nil +} diff --git a/vendor/github.com/cavaliercoder/go-cpio/reader.go b/vendor/github.com/cavaliercoder/go-cpio/reader.go new file mode 100644 index 0000000000..81912b6658 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/reader.go @@ -0,0 +1,72 @@ +package cpio + +import ( + "io" + "io/ioutil" +) + +// A Reader provides sequential access to the contents of a CPIO archive. A CPIO +// archive consists of a sequence of files. The Next method advances to the next +// file in the archive (including the first), and then it can be treated as an +// io.Reader to access the file's data. +type Reader struct { + r io.Reader // underlying file reader + hdr *Header // current Header + eof int64 // bytes until the end of the current file +} + +// NewReader creates a new Reader reading from r. +func NewReader(r io.Reader) *Reader { + return &Reader{ + r: r, + } +} + +// Read reads from the current entry in the CPIO archive. It returns 0, io.EOF +// when it reaches the end of that entry, until Next is called to advance to the +// next entry. +func (r *Reader) Read(p []byte) (n int, err error) { + if r.hdr == nil || r.eof == 0 { + return 0, io.EOF + } + rn := len(p) + if r.eof < int64(rn) { + rn = int(r.eof) + } + n, err = r.r.Read(p[0:rn]) + r.eof -= int64(n) + return +} + +// Next advances to the next entry in the CPIO archive. +// io.EOF is returned at the end of the input. +func (r *Reader) Next() (*Header, error) { + if r.hdr == nil { + return r.next() + } + skp := r.eof + r.hdr.pad + if skp > 0 { + _, err := io.CopyN(ioutil.Discard, r.r, skp) + if err != nil { + return nil, err + } + } + return r.next() +} + +func (r *Reader) next() (*Header, error) { + r.eof = 0 + hdr, err := readHeader(r.r) + if err != nil { + return nil, err + } + r.hdr = hdr + r.eof = hdr.Size + return hdr, nil +} + +// ReadHeader creates a new Header, reading from r. +func readHeader(r io.Reader) (*Header, error) { + // currently only SVR4 format is supported + return readSVR4Header(r) +} diff --git a/vendor/github.com/cavaliercoder/go-cpio/svr4.go b/vendor/github.com/cavaliercoder/go-cpio/svr4.go new file mode 100644 index 0000000000..f965554789 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/svr4.go @@ -0,0 +1,152 @@ +package cpio + +import ( + "bytes" + "fmt" + "io" + "strconv" + "time" +) + +const ( + svr4MaxNameSize = 4096 // MAX_PATH + svr4MaxFileSize = 4294967295 +) + +var svr4Magic = []byte{0x30, 0x37, 0x30, 0x37, 0x30, 0x31} // 070701 + +func readHex(s string) int64 { + // errors are ignored and 0 returned + i, _ := strconv.ParseInt(s, 16, 64) + return i +} + +func writeHex(b []byte, i int64) { + // i needs to be in range of uint32 + copy(b, fmt.Sprintf("%08X", i)) +} + +func readSVR4Header(r io.Reader) (*Header, error) { + var buf [110]byte + if _, err := io.ReadFull(r, buf[:]); err != nil { + return nil, err + } + + // TODO: check endianness + + // check magic + hasCRC := false + if !bytes.HasPrefix(buf[:], svr4Magic[:5]) { + return nil, ErrHeader + } + if buf[5] == 0x32 { // '2' + hasCRC = true + } else if buf[5] != 0x31 { // '1' + return nil, ErrHeader + } + + asc := string(buf[:]) + hdr := &Header{} + + hdr.Inode = readHex(asc[6:14]) + hdr.Mode = FileMode(readHex(asc[14:22])) + hdr.UID = int(readHex(asc[22:30])) + hdr.GID = int(readHex(asc[30:38])) + hdr.Links = int(readHex(asc[38:46])) + hdr.ModTime = time.Unix(readHex(asc[46:54]), 0) + hdr.Size = readHex(asc[54:62]) + if hdr.Size > svr4MaxFileSize { + return nil, ErrHeader + } + nameSize := readHex(asc[94:102]) + if nameSize < 1 || nameSize > svr4MaxNameSize { + return nil, ErrHeader + } + hdr.Checksum = Checksum(readHex(asc[102:110])) + if !hasCRC && hdr.Checksum != 0 { + return nil, ErrHeader + } + + name := make([]byte, nameSize) + if _, err := io.ReadFull(r, name); err != nil { + return nil, err + } + hdr.Name = string(name[:nameSize-1]) + if hdr.Name == headerEOF { + return nil, io.EOF + } + + // store padding between end of file and next header + hdr.pad = (4 - (hdr.Size % 4)) % 4 + + // skip to end of header/start of file + pad := (4 - (len(buf)+len(name))%4) % 4 + if pad > 0 { + if _, err := io.ReadFull(r, buf[:pad]); err != nil { + return nil, err + } + } + + // read link name + if hdr.Mode&^ModePerm == ModeSymlink { + if hdr.Size < 1 || hdr.Size > svr4MaxNameSize { + return nil, ErrHeader + } + b := make([]byte, hdr.Size) + if _, err := io.ReadFull(r, b); err != nil { + return nil, err + } + hdr.Linkname = string(b) + hdr.Size = 0 + } + + return hdr, nil +} + +func writeSVR4Header(w io.Writer, hdr *Header) (pad int64, err error) { + var hdrBuf [110]byte + for i := 0; i < len(hdrBuf); i++ { + hdrBuf[i] = '0' + } + magic := svr4Magic + if hdr.Checksum != 0 { + magic[5] = 0x32 + } + copy(hdrBuf[:], magic) + writeHex(hdrBuf[6:14], hdr.Inode) + writeHex(hdrBuf[14:22], int64(hdr.Mode)) + writeHex(hdrBuf[22:30], int64(hdr.UID)) + writeHex(hdrBuf[30:38], int64(hdr.GID)) + writeHex(hdrBuf[38:46], int64(hdr.Links)) + if !hdr.ModTime.IsZero() { + writeHex(hdrBuf[46:54], hdr.ModTime.Unix()) + } + writeHex(hdrBuf[54:62], hdr.Size) + writeHex(hdrBuf[94:102], int64(len(hdr.Name)+1)) + if hdr.Checksum != 0 { + writeHex(hdrBuf[102:110], int64(hdr.Checksum)) + } + + // write header + _, err = w.Write(hdrBuf[:]) + if err != nil { + return + } + + // write filename + _, err = io.WriteString(w, hdr.Name+"\x00") + if err != nil { + return + } + + // pad to end of filename + npad := (4 - ((len(hdrBuf) + len(hdr.Name) + 1) % 4)) % 4 + _, err = w.Write(zeroBlock[:npad]) + if err != nil { + return + } + + // compute padding to end of file + pad = (4 - (hdr.Size % 4)) % 4 + return +} diff --git a/vendor/github.com/cavaliercoder/go-cpio/writer.go b/vendor/github.com/cavaliercoder/go-cpio/writer.go new file mode 100644 index 0000000000..e8ed127792 --- /dev/null +++ b/vendor/github.com/cavaliercoder/go-cpio/writer.go @@ -0,0 +1,128 @@ +package cpio + +import ( + "errors" + "fmt" + "io" +) + +var ( + ErrWriteTooLong = errors.New("cpio: write too long") + ErrWriteAfterClose = errors.New("cpio: write after close") +) + +var trailer = &Header{ + Name: string(headerEOF), + Links: 1, +} + +var zeroBlock [4]byte + +// A Writer provides sequential writing of a CPIO archive. A CPIO archive +// consists of a sequence of files. Call WriteHeader to begin a new file, and +// then call Write to supply that file's data, writing at most hdr.Size bytes in +// total. +type Writer struct { + w io.Writer + nb int64 // number of unwritten bytes for current file entry + pad int64 // amount of padding to write after current file entry + inode int64 + err error + closed bool +} + +// NewWriter creates a new Writer writing to w. +func NewWriter(w io.Writer) *Writer { + return &Writer{w: w} +} + +// Flush finishes writing the current file (optional). +func (w *Writer) Flush() error { + if w.nb > 0 { + w.err = fmt.Errorf("cpio: missed writing %d bytes", w.nb) + return w.err + } + _, w.err = w.w.Write(zeroBlock[:w.pad]) + if w.err != nil { + return w.err + } + w.nb = 0 + w.pad = 0 + return w.err +} + +// WriteHeader writes hdr and prepares to accept the file's contents. +// WriteHeader calls Flush if it is not the first header. Calling after a Close +// will return ErrWriteAfterClose. +func (w *Writer) WriteHeader(hdr *Header) (err error) { + if w.closed { + return ErrWriteAfterClose + } + if w.err == nil { + w.Flush() + } + if w.err != nil { + return w.err + } + + if hdr.Name != headerEOF { + // TODO: should we be mutating hdr here? + // ensure all inodes are unique + w.inode++ + if hdr.Inode == 0 { + hdr.Inode = w.inode + } + + // ensure file type is set + if hdr.Mode&^ModePerm == 0 { + hdr.Mode |= ModeRegular + } + + // ensure regular files have at least 1 inbound link + if hdr.Links < 1 && hdr.Mode.IsRegular() { + hdr.Links = 1 + } + } + + w.nb = hdr.Size + w.pad, w.err = writeSVR4Header(w.w, hdr) + return +} + +// Write writes to the current entry in the CPIO archive. Write returns the +// error ErrWriteTooLong if more than hdr.Size bytes are written after +// WriteHeader. +func (w *Writer) Write(p []byte) (n int, err error) { + if w.closed { + err = ErrWriteAfterClose + return + } + overwrite := false + if int64(len(p)) > w.nb { + p = p[0:w.nb] + overwrite = true + } + n, err = w.w.Write(p) + w.nb -= int64(n) + if err == nil && overwrite { + err = ErrWriteTooLong + return + } + w.err = err + return +} + +// Close closes the CPIO archive, flushing any unwritten data to the underlying +// writer. +func (w *Writer) Close() error { + if w.err != nil || w.closed { + return w.err + } + w.err = w.WriteHeader(trailer) + if w.err != nil { + return w.err + } + w.Flush() + w.closed = true + return w.err +} diff --git a/vendor/github.com/cespare/xxhash/v2/.travis.yml b/vendor/github.com/cespare/xxhash/v2/.travis.yml deleted file mode 100644 index c516ea88da..0000000000 --- a/vendor/github.com/cespare/xxhash/v2/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go -go: - - "1.x" - - master -env: - - TAGS="" - - TAGS="-tags purego" -script: go test $TAGS -v ./... diff --git a/vendor/github.com/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md index 2fd8693c21..792b4a60b3 100644 --- a/vendor/github.com/cespare/xxhash/v2/README.md +++ b/vendor/github.com/cespare/xxhash/v2/README.md @@ -1,7 +1,7 @@ # xxhash -[![GoDoc](https://godoc.org/github.com/cespare/xxhash?status.svg)](https://godoc.org/github.com/cespare/xxhash) -[![Build Status](https://travis-ci.org/cespare/xxhash.svg?branch=master)](https://travis-ci.org/cespare/xxhash) +[![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2) +[![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml) xxhash is a Go implementation of the 64-bit [xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a @@ -64,4 +64,6 @@ $ go test -benchtime 10s -bench '/xxhash,direct,bytes' - [InfluxDB](https://github.com/influxdata/influxdb) - [Prometheus](https://github.com/prometheus/prometheus) +- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) - [FreeCache](https://github.com/coocood/freecache) +- [FastCache](https://github.com/VictoriaMetrics/fastcache) diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go index db0b35fbe3..15c835d541 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash.go @@ -193,7 +193,6 @@ func (d *Digest) UnmarshalBinary(b []byte) error { b, d.v4 = consumeUint64(b) b, d.total = consumeUint64(b) copy(d.mem[:], b) - b = b[len(d.mem):] d.n = int(d.total % uint64(len(d.mem))) return nil } diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s index d580e32aed..be8db5bf79 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s @@ -6,7 +6,7 @@ // Register allocation: // AX h -// CX pointer to advance through b +// SI pointer to advance through b // DX n // BX loop end // R8 v1, k1 @@ -16,39 +16,39 @@ // R12 tmp // R13 prime1v // R14 prime2v -// R15 prime4v +// DI prime4v -// round reads from and advances the buffer pointer in CX. +// round reads from and advances the buffer pointer in SI. // It assumes that R13 has prime1v and R14 has prime2v. #define round(r) \ - MOVQ (CX), R12 \ - ADDQ $8, CX \ + MOVQ (SI), R12 \ + ADDQ $8, SI \ IMULQ R14, R12 \ ADDQ R12, r \ ROLQ $31, r \ IMULQ R13, r // mergeRound applies a merge round on the two registers acc and val. -// It assumes that R13 has prime1v, R14 has prime2v, and R15 has prime4v. +// It assumes that R13 has prime1v, R14 has prime2v, and DI has prime4v. #define mergeRound(acc, val) \ IMULQ R14, val \ ROLQ $31, val \ IMULQ R13, val \ XORQ val, acc \ IMULQ R13, acc \ - ADDQ R15, acc + ADDQ DI, acc // func Sum64(b []byte) uint64 TEXT ·Sum64(SB), NOSPLIT, $0-32 // Load fixed primes. MOVQ ·prime1v(SB), R13 MOVQ ·prime2v(SB), R14 - MOVQ ·prime4v(SB), R15 + MOVQ ·prime4v(SB), DI // Load slice. - MOVQ b_base+0(FP), CX + MOVQ b_base+0(FP), SI MOVQ b_len+8(FP), DX - LEAQ (CX)(DX*1), BX + LEAQ (SI)(DX*1), BX // The first loop limit will be len(b)-32. SUBQ $32, BX @@ -65,14 +65,14 @@ TEXT ·Sum64(SB), NOSPLIT, $0-32 XORQ R11, R11 SUBQ R13, R11 - // Loop until CX > BX. + // Loop until SI > BX. blockLoop: round(R8) round(R9) round(R10) round(R11) - CMPQ CX, BX + CMPQ SI, BX JLE blockLoop MOVQ R8, AX @@ -100,16 +100,16 @@ noBlocks: afterBlocks: ADDQ DX, AX - // Right now BX has len(b)-32, and we want to loop until CX > len(b)-8. + // Right now BX has len(b)-32, and we want to loop until SI > len(b)-8. ADDQ $24, BX - CMPQ CX, BX + CMPQ SI, BX JG fourByte wordLoop: // Calculate k1. - MOVQ (CX), R8 - ADDQ $8, CX + MOVQ (SI), R8 + ADDQ $8, SI IMULQ R14, R8 ROLQ $31, R8 IMULQ R13, R8 @@ -117,18 +117,18 @@ wordLoop: XORQ R8, AX ROLQ $27, AX IMULQ R13, AX - ADDQ R15, AX + ADDQ DI, AX - CMPQ CX, BX + CMPQ SI, BX JLE wordLoop fourByte: ADDQ $4, BX - CMPQ CX, BX + CMPQ SI, BX JG singles - MOVL (CX), R8 - ADDQ $4, CX + MOVL (SI), R8 + ADDQ $4, SI IMULQ R13, R8 XORQ R8, AX @@ -138,19 +138,19 @@ fourByte: singles: ADDQ $4, BX - CMPQ CX, BX + CMPQ SI, BX JGE finalize singlesLoop: - MOVBQZX (CX), R12 - ADDQ $1, CX + MOVBQZX (SI), R12 + ADDQ $1, SI IMULQ ·prime5v(SB), R12 XORQ R12, AX ROLQ $11, AX IMULQ R13, AX - CMPQ CX, BX + CMPQ SI, BX JL singlesLoop finalize: @@ -179,9 +179,9 @@ TEXT ·writeBlocks(SB), NOSPLIT, $0-40 MOVQ ·prime2v(SB), R14 // Load slice. - MOVQ b_base+8(FP), CX + MOVQ b_base+8(FP), SI MOVQ b_len+16(FP), DX - LEAQ (CX)(DX*1), BX + LEAQ (SI)(DX*1), BX SUBQ $32, BX // Load vN from d. @@ -199,7 +199,7 @@ blockLoop: round(R10) round(R11) - CMPQ CX, BX + CMPQ SI, BX JLE blockLoop // Copy vN back to d. @@ -208,8 +208,8 @@ blockLoop: MOVQ R10, 16(AX) MOVQ R11, 24(AX) - // The number of bytes written is CX minus the old base pointer. - SUBQ b_base+8(FP), CX - MOVQ CX, ret+32(FP) + // The number of bytes written is SI minus the old base pointer. + SUBQ b_base+8(FP), SI + MOVQ SI, ret+32(FP) RET diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go index 53bf76efbc..376e0ca2e4 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go @@ -6,41 +6,52 @@ package xxhash import ( - "reflect" "unsafe" ) -// Notes: -// -// See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ -// for some discussion about these unsafe conversions. -// // In the future it's possible that compiler optimizations will make these -// unsafe operations unnecessary: https://golang.org/issue/2205. +// XxxString functions unnecessary by realizing that calls such as +// Sum64([]byte(s)) don't need to copy s. See https://golang.org/issue/2205. +// If that happens, even if we keep these functions they can be replaced with +// the trivial safe code. + +// NOTE: The usual way of doing an unsafe string-to-[]byte conversion is: // -// Both of these wrapper functions still incur function call overhead since they -// will not be inlined. We could write Go/asm copies of Sum64 and Digest.Write -// for strings to squeeze out a bit more speed. Mid-stack inlining should -// eventually fix this. +// var b []byte +// bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) +// bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data +// bh.Len = len(s) +// bh.Cap = len(s) +// +// Unfortunately, as of Go 1.15.3 the inliner's cost model assigns a high enough +// weight to this sequence of expressions that any function that uses it will +// not be inlined. Instead, the functions below use a different unsafe +// conversion designed to minimize the inliner weight and allow both to be +// inlined. There is also a test (TestInlining) which verifies that these are +// inlined. +// +// See https://github.com/golang/go/issues/42739 for discussion. // Sum64String computes the 64-bit xxHash digest of s. // It may be faster than Sum64([]byte(s)) by avoiding a copy. func Sum64String(s string) uint64 { - var b []byte - bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data - bh.Len = len(s) - bh.Cap = len(s) + b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})) return Sum64(b) } // WriteString adds more data to d. It always returns len(s), nil. // It may be faster than Write([]byte(s)) by avoiding a copy. func (d *Digest) WriteString(s string) (n int, err error) { - var b []byte - bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data - bh.Len = len(s) - bh.Cap = len(s) - return d.Write(b) + d.Write(*(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)}))) + // d.Write always returns len(s), nil. + // Ignoring the return output and returning these fixed values buys a + // savings of 6 in the inliner's cost model. + return len(s), nil +} + +// sliceHeader is similar to reflect.SliceHeader, but it assumes that the layout +// of the first two words is the same as the layout of a string. +type sliceHeader struct { + s string + cap int } diff --git a/vendor/github.com/coreos/ignition/v2/config/shared/errors/errors.go b/vendor/github.com/coreos/ignition/v2/config/shared/errors/errors.go index 4d9906d9a3..7761280d07 100644 --- a/vendor/github.com/coreos/ignition/v2/config/shared/errors/errors.go +++ b/vendor/github.com/coreos/ignition/v2/config/shared/errors/errors.go @@ -37,6 +37,7 @@ var ( ErrFileUsedSymlink = errors.New("file path includes link in config") ErrDirectoryUsedSymlink = errors.New("directory path includes link in config") ErrLinkUsedSymlink = errors.New("link path includes link in config") + ErrLinkTargetRequired = errors.New("link target is required") ErrHardLinkToDirectory = errors.New("hard link target is a directory") ErrDiskDeviceRequired = errors.New("disk device is required") ErrPartitionNumbersCollide = errors.New("partition numbers collide") @@ -55,6 +56,7 @@ var ( ErrLuksLabelTooLong = errors.New("luks device labels cannot be longer than 47 characters") ErrLuksNameContainsSlash = errors.New("device names cannot contain slashes") ErrInvalidLuksKeyFile = errors.New("invalid key-file source") + ErrClevisPinRequired = errors.New("missing required custom clevis pin") ErrUnknownClevisPin = errors.New("unsupported clevis pin") ErrClevisConfigRequired = errors.New("missing required custom clevis config") ErrClevisCustomWithOthers = errors.New("cannot use custom clevis config with tpm2, tang, or threshold") @@ -67,8 +69,10 @@ var ( ErrNoPath = errors.New("path not specified") ErrPathRelative = errors.New("path not absolute") ErrDirtyPath = errors.New("path is not fully simplified") - ErrSparesUnsupportedForLevel = errors.New("spares unsupported for arrays with a level greater than 0") + ErrRaidLevelRequired = errors.New("raid level is required") + ErrSparesUnsupportedForLevel = errors.New("spares unsupported for linear and raid0 arrays") ErrUnrecognizedRaidLevel = errors.New("unrecognized raid level") + ErrRaidDevicesRequired = errors.New("raid devices required") ErrShouldNotExistWithOthers = errors.New("shouldExist specified false with other options also specified") ErrZeroesWithShouldNotExist = errors.New("shouldExist is false for a partition and other partition(s) has start or size 0") ErrNeedLabelOrNumber = errors.New("a partition number >= 1 or a label must be specified") diff --git a/vendor/github.com/coreos/ignition/v2/config/util/config.go b/vendor/github.com/coreos/ignition/v2/config/util/config.go new file mode 100644 index 0000000000..85cd7fa7c4 --- /dev/null +++ b/vendor/github.com/coreos/ignition/v2/config/util/config.go @@ -0,0 +1,45 @@ +// Copyright 2021 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package util + +import ( + "github.com/coreos/ignition/v2/config/shared/errors" + + "github.com/coreos/go-semver/semver" + "github.com/coreos/vcontext/report" +) + +type versionStub struct { + Ignition struct { + Version string + } +} + +// GetConfigVersion parses the version from the given raw config +func GetConfigVersion(raw []byte) (semver.Version, report.Report, error) { + if len(raw) == 0 { + return semver.Version{}, report.Report{}, errors.ErrEmpty + } + + stub := versionStub{} + if rpt, err := HandleParseErrors(raw, &stub); err != nil { + return semver.Version{}, rpt, err + } + + version, err := semver.NewVersion(stub.Ignition.Version) + if err != nil { + return semver.Version{}, report.Report{}, errors.ErrInvalidVersion + } + return *version, report.Report{}, nil +} diff --git a/vendor/github.com/coreos/ignition/v2/config/util/helpers.go b/vendor/github.com/coreos/ignition/v2/config/util/helpers.go index 9c8b04413f..9be42800b9 100644 --- a/vendor/github.com/coreos/ignition/v2/config/util/helpers.go +++ b/vendor/github.com/coreos/ignition/v2/config/util/helpers.go @@ -33,3 +33,11 @@ func NilOrEmpty(s *string) bool { func NotEmpty(s *string) bool { return s != nil && *s != "" } + +func IsTrue(b *bool) bool { + return b != nil && *b +} + +func IsFalse(b *bool) bool { + return b != nil && !*b +} diff --git a/vendor/github.com/coreos/ignition/v2/config/util/reflection.go b/vendor/github.com/coreos/ignition/v2/config/util/reflection.go index 561a8706ba..51df4e124d 100644 --- a/vendor/github.com/coreos/ignition/v2/config/util/reflection.go +++ b/vendor/github.com/coreos/ignition/v2/config/util/reflection.go @@ -15,6 +15,7 @@ package util import ( + "fmt" "reflect" ) @@ -53,3 +54,38 @@ func IsInvalidInConfig(k reflect.Kind) bool { return true } } + +// Return a fully non-zero value for the specified type, recursively +// setting all fields and slices. +func NonZeroValue(t reflect.Type) reflect.Value { + v := reflect.New(t).Elem() + setNonZero(v) + return v +} + +func setNonZero(v reflect.Value) { + switch v.Kind() { + case reflect.Bool: + v.SetBool(true) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + v.SetInt(1) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + v.SetUint(1) + case reflect.Float32, reflect.Float64: + v.SetFloat(1) + case reflect.String: + v.SetString("aardvark") + case reflect.Ptr: + v.Set(reflect.New(v.Type().Elem())) + setNonZero(v.Elem()) + case reflect.Slice: + v.Set(reflect.MakeSlice(v.Type(), 1, 1)) + setNonZero(v.Index(0)) + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + setNonZero(v.Field(i)) + } + default: + panic(fmt.Sprintf("unexpected kind %s", v.Kind())) + } +} diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/custom.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/custom.go index 1b0c77b8b1..2a1231cb34 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/custom.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/custom.go @@ -21,10 +21,6 @@ import ( "github.com/coreos/vcontext/report" ) -func (cu Custom) Key() string { - return cu.Pin -} - func (cu Custom) Validate(c path.ContextPath) (r report.Report) { if cu.Pin == "" && cu.Config == "" { return diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/disk.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/disk.go index 17856e07a6..8caf8499d7 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/disk.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/disk.go @@ -16,6 +16,7 @@ package types import ( "github.com/coreos/ignition/v2/config/shared/errors" + "github.com/coreos/ignition/v2/config/util" "github.com/coreos/vcontext/path" "github.com/coreos/vcontext/report" @@ -127,7 +128,7 @@ func (n Disk) partitionsMixZeroesAndNonexistence() bool { hasZero := false hasShouldNotExist := false for _, p := range n.Partitions { - hasShouldNotExist = hasShouldNotExist || (p.ShouldExist != nil && !*p.ShouldExist) + hasShouldNotExist = hasShouldNotExist || util.IsFalse(p.ShouldExist) hasZero = hasZero || (p.Number == 0) } return hasZero && hasShouldNotExist diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/file.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/file.go index 04b14288d9..9b71bb26aa 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/file.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/file.go @@ -16,6 +16,7 @@ package types import ( "github.com/coreos/ignition/v2/config/shared/errors" + "github.com/coreos/ignition/v2/config/util" "github.com/coreos/vcontext/path" "github.com/coreos/vcontext/report" @@ -29,7 +30,7 @@ func (f File) Validate(c path.ContextPath) (r report.Report) { } func (f File) validateOverwrite() error { - if f.Overwrite != nil && *f.Overwrite && f.Contents.Source == nil { + if util.IsTrue(f.Overwrite) && f.Contents.Source == nil { return errors.ErrOverwriteAndNilSource } return nil diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/filesystem.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/filesystem.go index 39a158969c..3bf064f355 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/filesystem.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/filesystem.go @@ -50,7 +50,7 @@ func (f Filesystem) validateFormat() error { if util.NotEmpty(f.Path) || util.NotEmpty(f.Label) || util.NotEmpty(f.UUID) || - f.WipeFilesystem != nil && *f.WipeFilesystem || + util.IsTrue(f.WipeFilesystem) || len(f.MountOptions) != 0 || len(f.Options) != 0 { return errors.ErrFormatNilWithOthers diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/luks.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/luks.go index d7cd29bac2..123392b25d 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/luks.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/luks.go @@ -46,7 +46,7 @@ func (l Luks) Validate(c path.ContextPath) (r report.Report) { } if l.Clevis != nil { - if l.Clevis.Custom != nil && (len(l.Clevis.Tang) > 0 || (l.Clevis.Tpm2 != nil && *l.Clevis.Tpm2) || (l.Clevis.Threshold != nil && *l.Clevis.Threshold != 0)) { + if l.Clevis.Custom != nil && (len(l.Clevis.Tang) > 0 || util.IsTrue(l.Clevis.Tpm2) || (l.Clevis.Threshold != nil && *l.Clevis.Threshold != 0)) { r.AddOnError(c.Append("clevis"), errors.ErrClevisCustomWithOthers) } } diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/node.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/node.go index 52576a924a..248276e737 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/node.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/node.go @@ -18,6 +18,7 @@ import ( "path" "github.com/coreos/ignition/v2/config/shared/errors" + "github.com/coreos/ignition/v2/config/util" vpath "github.com/coreos/vcontext/path" "github.com/coreos/vcontext/report" @@ -41,7 +42,7 @@ func (n Node) Depth() int { } func validateIDorName(id *int, name *string) error { - if id != nil && (name != nil && *name != "") { + if id != nil && util.NotEmpty(name) { return errors.ErrBothIDAndNameSet } return nil diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/partition.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/partition.go index 08dca8eaf2..1b2d97edf1 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/partition.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/partition.go @@ -20,6 +20,7 @@ import ( "strings" "github.com/coreos/ignition/v2/config/shared/errors" + "github.com/coreos/ignition/v2/config/util" "github.com/coreos/vcontext/path" "github.com/coreos/vcontext/report" @@ -44,8 +45,8 @@ func (p Partition) Key() string { } func (p Partition) Validate(c path.ContextPath) (r report.Report) { - if p.ShouldExist != nil && !*p.ShouldExist && - (p.Label != nil || (p.TypeGUID != nil && *p.TypeGUID != "") || (p.GUID != nil && *p.GUID != "") || p.StartMiB != nil || p.SizeMiB != nil) { + if util.IsFalse(p.ShouldExist) && + (p.Label != nil || util.NotEmpty(p.TypeGUID) || util.NotEmpty(p.GUID) || p.StartMiB != nil || p.SizeMiB != nil) { r.AddOnError(c, errors.ErrShouldNotExistWithOthers) } if p.Number == 0 && p.Label == nil { diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/raid.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/raid.go index 039e54e666..5ae4f8c099 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/raid.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/raid.go @@ -33,6 +33,9 @@ func (r Raid) IgnoreDuplicates() map[string]struct{} { func (ra Raid) Validate(c path.ContextPath) (r report.Report) { r.AddOnError(c.Append("level"), ra.validateLevel()) + if len(ra.Devices) == 0 { + r.AddOnError(c.Append("devices"), errors.ErrRaidDevicesRequired) + } return } diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/storage.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/storage.go index db7e44acd4..fd1b8cecf6 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/storage.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/storage.go @@ -19,6 +19,7 @@ import ( "strings" "github.com/coreos/ignition/v2/config/shared/errors" + "github.com/coreos/ignition/v2/config/util" vpath "github.com/coreos/vcontext/path" "github.com/coreos/vcontext/report" @@ -53,7 +54,7 @@ func (s Storage) Validate(c vpath.ContextPath) (r report.Report) { r.AddOnError(c.Append("links", i), errors.ErrLinkUsedSymlink) } } - if l1.Hard == nil || !*l1.Hard { + if !util.IsTrue(l1.Hard) { continue } target := path.Clean(l1.Target) diff --git a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/unit.go b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/unit.go index 8d1a5f00ff..bc2d3299c4 100644 --- a/vendor/github.com/coreos/ignition/v2/config/v3_2/types/unit.go +++ b/vendor/github.com/coreos/ignition/v2/config/v3_2/types/unit.go @@ -21,6 +21,7 @@ import ( "github.com/coreos/ignition/v2/config/shared/errors" "github.com/coreos/ignition/v2/config/shared/validations" + "github.com/coreos/ignition/v2/config/util" "github.com/coreos/go-systemd/v22/unit" cpath "github.com/coreos/vcontext/path" @@ -41,8 +42,7 @@ func (u Unit) Validate(c cpath.ContextPath) (r report.Report) { opts, err := validateUnitContent(u.Contents) r.AddOnError(c, err) - isEnabled := u.Enabled != nil && *u.Enabled - r.AddOnWarn(c, validations.ValidateInstallSection(u.Name, isEnabled, (u.Contents == nil || *u.Contents == ""), opts)) + r.AddOnWarn(c, validations.ValidateInstallSection(u.Name, util.IsTrue(u.Enabled), util.NilOrEmpty(u.Contents), opts)) return } diff --git a/vendor/github.com/coreos/vcontext/path/path.go b/vendor/github.com/coreos/vcontext/path/path.go index 3daadc784b..58be8baa1a 100644 --- a/vendor/github.com/coreos/vcontext/path/path.go +++ b/vendor/github.com/coreos/vcontext/path/path.go @@ -41,6 +41,10 @@ func (c ContextPath) String() string { return strings.Join(strs, ".") } +// Append returns a new ContextPath with the specified elements appended. +// The underlying array is sometimes reused, so if the original path might +// be used in future Append operations, the returned ContextPath should not +// be stored into a long-lived data structure. (Store a copy instead.) func (c ContextPath) Append(e ...interface{}) ContextPath { return ContextPath{ Path: append(c.Path, e...), @@ -48,6 +52,11 @@ func (c ContextPath) Append(e ...interface{}) ContextPath { } } +// Copy returns an identical ContextPath that shares no state with the +// original. When storing a ContextPath into a data structure, usually a +// copy should be stored instead of the original (for example, Report does +// this), since Append sometimes modifies the path's underlying array in +// place. func (c ContextPath) Copy() ContextPath { // make sure to preserve reflect.DeepEqual() equality var path []interface{} diff --git a/vendor/github.com/coreos/vcontext/report/report.go b/vendor/github.com/coreos/vcontext/report/report.go index 5378e8433c..618bc7536f 100644 --- a/vendor/github.com/coreos/vcontext/report/report.go +++ b/vendor/github.com/coreos/vcontext/report/report.go @@ -131,7 +131,7 @@ func (r *Report) AddOn(c path.ContextPath, err error, k EntryKind) { } r.Entries = append(r.Entries, Entry{ Message: err.Error(), - Context: c, + Context: c.Copy(), Kind: k, }) } diff --git a/vendor/github.com/diskfs/go-diskfs/.gitignore b/vendor/github.com/diskfs/go-diskfs/.gitignore new file mode 100644 index 0000000000..48b8bf9072 --- /dev/null +++ b/vendor/github.com/diskfs/go-diskfs/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/vendor/github.com/diskfs/go-diskfs/LICENSE b/vendor/github.com/diskfs/go-diskfs/LICENSE new file mode 100644 index 0000000000..7f4b860b5f --- /dev/null +++ b/vendor/github.com/diskfs/go-diskfs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Avi Deitcher + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/diskfs/go-diskfs/Makefile b/vendor/github.com/diskfs/go-diskfs/Makefile new file mode 100644 index 0000000000..1a41f5ffee --- /dev/null +++ b/vendor/github.com/diskfs/go-diskfs/Makefile @@ -0,0 +1,78 @@ +.PHONY: test image unit_test + +PACKAGE_NAME?=github.com/diskfs/go-diskfs +IMAGE ?= diskfs/go-diskfs:build +GOENV ?= GO111MODULE=on CGO_ENABLED=0 +GO_FILES ?= $(shell $(GOENV) go list ./...) +GOBIN ?= $(shell go env GOPATH)/bin +LINTER ?= $(GOBIN)/golangci-lint + + +# BUILDARCH is the host architecture +# ARCH is the target architecture +# we need to keep track of them separately +BUILDARCH ?= $(shell uname -m) +BUILDOS ?= $(shell uname -s | tr A-Z a-z) + +# canonicalized names for host architecture +ifeq ($(BUILDARCH),aarch64) +BUILDARCH=arm64 +endif +ifeq ($(BUILDARCH),x86_64) +BUILDARCH=amd64 +endif + +# unless otherwise set, I am building for my own architecture, i.e. not cross-compiling +# and for my OS +ARCH ?= $(BUILDARCH) +OS ?= $(BUILDOS) + +# canonicalized names for target architecture +ifeq ($(ARCH),aarch64) + override ARCH=arm64 +endif +ifeq ($(ARCH),x86_64) + override ARCH=amd64 +endif + +BUILD_CMD = CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) +ifdef DOCKERBUILD +BUILD_CMD = docker run --rm \ + -e GOARCH=$(ARCH) \ + -e GOOS=linux \ + -e CGO_ENABLED=0 \ + -v $(CURDIR):/go/src/$(PACKAGE_NAME) \ + -w /go/src/$(PACKAGE_NAME) \ + $(BUILDER_IMAGE) +endif + +image: + docker build -t $(IMAGE) testhelper/docker + +# because we keep making the same typo +unit-test: unit_test +unit_test: + @$(GOENV) go test $(GO_FILES) + +test: image + TEST_IMAGE=$(IMAGE) $(GOENV) go test $(GO_FILES) + +golangci-lint: $(LINTER) +$(LINTER): + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.41.0 + + +## Check the file format +fmt-check: + @if [ -n "$(shell $(BUILD_CMD) gofmt -l ${GO_FILES})" ]; then \ + $(BUILD_CMD) gofmt -s -e -d ${GO_FILES}; \ + exit 1; \ + fi + +## Lint the files +lint: golangci-lint + @$(BUILD_CMD) $(LINTER) run --disable-all --enable=revive ./... + +## Vet the files +vet: + @$(BUILD_CMD) go vet ${GO_FILES} diff --git a/vendor/github.com/diskfs/go-diskfs/README.md b/vendor/github.com/diskfs/go-diskfs/README.md new file mode 100644 index 0000000000..44331f40f3 --- /dev/null +++ b/vendor/github.com/diskfs/go-diskfs/README.md @@ -0,0 +1,158 @@ +# go-diskfs +go-diskfs is a [go](https://golang.org) library for performing manipulation of disks, disk images and filesystems natively in go. + +You can do nearly everything that go-diskfs provides using shell tools like gdisk/fdisk/mkfs.vfat/mtools/sgdisk/sfdisk/dd. However, these have the following limitations: + +* they need to be installed on your system +* you need to fork/exec to the command (and possibly a shell) to run them +* some are difficult to run without mounting disks, which may not be possible or may be risky in your environment, and almost certainly will require root privileges +* you do not want to launch a VM to run the excellent [libguestfs](https://libguestfs.org) and it may not be installed + +go-diskfs performs all modifications _natively_ in go, without mounting any disks. + +## Usage +Note: detailed go documentation is available at [godoc.org](https://godoc.org/github.com/diskfs/go-diskfs). + +### Concepts +`go-diskfs` has a few basic concepts: + +* Disk +* Partition +* Filesystem + +#### Disk +A disk represents either a file or block device that you access and manipulate. With access to the disk, you can: + +* read, modify or create a partition table +* open an existing or create a new filesystem + +#### Partition +A partition is a slice of a disk, beginning at one point and ending at a later one. You can have multiple partitions on a disk, and a partition table that describes how partitions are laid out on the disk. + +#### Filesystem +A filesystem is a construct that gives you access to create, read and write directories and files. + +You do *not* need a partitioned disk to work with a filesystem; filesystems can be an entire `disk`, just as they can be an entire block device. However, they also can be in a partition in a `disk` + +### Working With a Disk +Before you can do anything with a disk - partitions or filesystems - you need to access it. + +* If you have an existing disk or image file, you `Open()` it +* If you are creating a new one, usually just disk image files, you `Create()` it + +The disk will be opened read-write, with exclusive access. If it cannot do either, it will fail. + +Once you have a `Disk`, you can work with partitions or filesystems in it. + +#### Partitions on a Disk + +The following are the partition actions you can take on a disk: + +* `GetPartitionTable()` - if one exists. Will report the table layout and type. +* `Partition()` - partition the disk, overwriting any previous table if it exists + +As of this writing, supported partition formats are Master Boot Record (`mbr`) and GUID Partition Table (`gpt`). + +#### Filesystems on a Disk +Once you have a valid disk, and optionally partition, you can access filesystems on that disk image or partition. + +* `CreateFilesystem()` - create a filesystem in an individual partition or the entire disk +* `GetFilesystem()` - access an existing filesystem in a partition or the entire disk + +As of this writing, supported filesystems include `FAT32` and `ISO9660` (a.k.a. `.iso`). + +With a filesystem in hand, you can create, access and modify directories and files. + +* `Mkdir()` - make a directory in a filesystem +* `Readdir()` - read all of the entries in a directory +* `OpenFile()` - open a file for read, optionally write, create and append + +Note that `OpenFile()` is intended to match [os.OpenFile](https://golang.org/pkg/os/#OpenFile) and returns a `godiskfs.File` that closely matches [os.File](https://golang.org/pkg/os/#File) + +With a `File` in hand, you then can: + +* `Write(p []byte)` to the file +* `Read(b []byte)` from the file +* `Seek(offset int64, whence int)` to set the next read or write to an offset in the file + +### Read-Only Filesystems +Some filesystem types are intended to be created once, after which they are read-only, for example `ISO9660`/`.iso` and `squashfs`. + +`godiskfs` recognizes read-only filesystems and limits working with them to the following: + +* You can `GetFilesystem()` a read-only filesystem and do all read activities, but cannot write to them. Any attempt to `Mkdir()` or `OpenFile()` in write/append/create modes or `Write()` to the file will result in an error. +* You can `CreateFilesystem()` a read-only filesystem and write anything to it that you want. It will do all of its work in a "scratch" area, or temporary "workspace" directory on your local filesystem. When you are ready to complete it, you call `Finalize()`, after which it becomes read-only. If you forget to `Finalize()` it, you get... nothing. The `Finalize()` function exists only on read-only filesystems. + +### Example + +There are examples in the [examples/](./examples/) directory. Here is one to get you started. + +The following example will create a fully bootable EFI disk image. It assumes you have a bootable EFI file (any modern Linux kernel compiled with `CONFIG_EFI_STUB=y` will work) available. + +```go +import diskfs "github.com/diskfs/go-diskfs" + +espSize int := 100*1024*1024 // 100 MB +diskSize int := espSize + 4*1024*1024 // 104 MB + + +// create a disk image +diskImg := "/tmp/disk.img" +disk := diskfs.Create(diskImg, diskSize, diskfs.Raw) +// create a partition table +blkSize int := 512 +partitionSectors int := espSize / blkSize +partitionStart int := 2048 +partitionEnd int := partitionSectors - partitionStart + 1 +table := PartitionTable{ + type: partition.GPT, + partitions:[ + Partition{Start: partitionStart, End: partitionEnd, Type: partition.EFISystemPartition, Name: "EFI System"} + ] +} +// apply the partition table +err = disk.Partition(table) + + +/* + * create an ESP partition with some contents + */ +kernel, err := ioutil.ReadFile("/some/kernel/file") + +fs, err := disk.CreateFilesystem(0, diskfs.TypeFat32) + +// make our directories +err = fs.Mkdir("/EFI/BOOT") +rw, err := fs.OpenFile("/EFI/BOOT/BOOTX64.EFI", os.O_CREATE|os.O_RDRWR) + +err = rw.Write(kernel) + +``` + +## Tests +There are two ways to run tests: unit and integration (somewhat loosely defined). + +* Unit: these tests run entirely within the go process, primarily test unexported and some exported functions, and may use pre-defined test fixtures in a directory's `testdata/` subdirectory. By default, these are run by running `go test ./...` or just `make unit_test`. +* Integration: these test the exported functions and their ability to create or manipulate correct files. They are validated by running a [docker](https://docker.com) container with the right utilities to validate the output. These are run by running `TEST_IMAGE=diskfs/godiskfs go test ./...` or just `make test`. The value of `TEST_IMAGE` will be the image to use to run tests. + +For integration tests to work, the correct docker image must be available. You can create it by running `make image`. Check the [Makefile](./Makefile) to see the `docker build` command used to create it. Running `make test` automatically creates the image for you. + +### Integration Test Image +The integration test image contains the various tools necessary to test images: `mtools`, `fdisk`, `gdisk`, etc. It works on precisely one file at a time. In order to avoid docker volume mounting limitations with various OSes, instead of mounting the image `-v`, it expects to receive the image as a `stdin` stream, and saves it internally to the container as `/file.img`. + +For example, to test the existence of directory `/abc` on file `$PWD/foo.img`: + +``` +cat $PWD/foo.img | docker run -i --rm $INT_IMAGE mdir -i /file.img /abc +``` + + +## Plans +Future plans are to add the following: + +* embed boot code in `mbr` e.g. `altmbr.bin` (no need for `gpt` since an ESP with `/EFI/BOOT/BOOT.EFI` will boot) +* `ext4` filesystem +* `Joliet` extensions to `iso9660` +* `Rock Ridge` sparse file support - supports the flag, but not yet reading or writing +* `squashfs` sparse file support - currently treats sparse files as regular files +* `qcow` disk format diff --git a/vendor/github.com/diskfs/go-diskfs/disk/disk.go b/vendor/github.com/diskfs/go-diskfs/disk/disk.go new file mode 100644 index 0000000000..9fa0583b57 --- /dev/null +++ b/vendor/github.com/diskfs/go-diskfs/disk/disk.go @@ -0,0 +1,246 @@ +// Package disk provides utilities for working directly with a disk +// +// Most of the provided functions are intelligent wrappers around implementations of +// github.com/diskfs/go-diskfs/partition and github.com/diskfs/go-diskfs/filesystem +package disk + +import ( + "errors" + "fmt" + "io" + "os" + + log "github.com/sirupsen/logrus" + + "github.com/diskfs/go-diskfs/filesystem" + "github.com/diskfs/go-diskfs/filesystem/fat32" + "github.com/diskfs/go-diskfs/filesystem/iso9660" + "github.com/diskfs/go-diskfs/filesystem/squashfs" + "github.com/diskfs/go-diskfs/partition" +) + +// Disk is a reference to a single disk block device or image that has been Create() or Open() +type Disk struct { + File *os.File + Info os.FileInfo + Type Type + Size int64 + LogicalBlocksize int64 + PhysicalBlocksize int64 + Table partition.Table + Writable bool + DefaultBlocks bool +} + +// Type represents the type of disk this is +type Type int + +const ( + // File is a file-based disk image + File Type = iota + // Device is an OS-managed block device + Device +) + +var ( + errIncorrectOpenMode = errors.New("disk file or device not open for write") +) + +// GetPartitionTable retrieves a PartitionTable for a Disk +// +// If the table is able to be retrieved from the disk, it is saved in the instance. +// +// returns an error if the Disk is invalid or does not exist, or the partition table is unknown +func (d *Disk) GetPartitionTable() (partition.Table, error) { + t, err := partition.Read(d.File, int(d.LogicalBlocksize), int(d.PhysicalBlocksize)) + if err != nil { + return nil, err + } + d.Table = t + return t, nil +} + +// Partition applies a partition.Table implementation to a Disk +// +// The Table can have zero, one or more Partitions, each of which is unique to its +// implementation. E.g. MBR partitions in mbr.Table look different from GPT partitions in gpt.Table +// +// Actual writing of the table is delegated to the individual implementation +func (d *Disk) Partition(table partition.Table) error { + if !d.Writable { + return errIncorrectOpenMode + } + // fill in the uuid + err := table.Write(d.File, d.Size) + if err != nil { + return fmt.Errorf("Failed to write partition table: %v", err) + } + d.Table = table + // the partition table needs to be re-read only if + // the disk file is an actual block device + if d.Type == Device { + err = d.ReReadPartitionTable() + if err != nil { + return fmt.Errorf("Unable to re-read the partition table. Kernel still uses old partition table: %v", err) + } + } + return nil +} + +// WritePartitionContents writes the contents of an io.Reader to a given partition +// +// if successful, returns the number of bytes written +// +// returns an error if there was an error writing to the disk, reading from the reader, the table +// is invalid, or the partition is invalid +func (d *Disk) WritePartitionContents(partition int, reader io.Reader) (int64, error) { + if !d.Writable { + return -1, errIncorrectOpenMode + } + if d.Table == nil { + return -1, fmt.Errorf("cannot write contents of a partition on a disk without a partition table") + } + if partition < 0 { + return -1, fmt.Errorf("cannot write contents of a partition without specifying a partition") + } + partitions := d.Table.GetPartitions() + // API indexes from 1, but slice from 0 + if partition > len(partitions) { + return -1, fmt.Errorf("cannot write contents of partition %d which is greater than max partition %d", partition, len(partitions)) + } + written, err := partitions[partition-1].WriteContents(d.File, reader) + return int64(written), err +} + +// ReadPartitionContents reads the contents of a partition to an io.Writer +// +// if successful, returns the number of bytes read +// +// returns an error if there was an error reading from the disk, writing to the writer, the table +// is invalid, or the partition is invalid +func (d *Disk) ReadPartitionContents(partition int, writer io.Writer) (int64, error) { + if d.Table == nil { + return -1, fmt.Errorf("cannot read contents of a partition on a disk without a partition table") + } + if partition < 0 { + return -1, fmt.Errorf("cannot read contents of a partition without specifying a partition") + } + partitions := d.Table.GetPartitions() + // API indexes from 1, but slice from 0 + if partition > len(partitions) { + return -1, fmt.Errorf("cannot read contents of partition %d which is greater than max partition %d", partition, len(partitions)) + } + return partitions[partition-1].ReadContents(d.File, writer) +} + +// FilesystemSpec represents the specification of a filesystem to be created +type FilesystemSpec struct { + Partition int + FSType filesystem.Type + VolumeLabel string + WorkDir string +} + +// CreateFilesystem creates a filesystem on a disk image, the equivalent of mkfs. +// +// Required: +// * desired partition number, or 0 to create the filesystem on the entire block device or +// disk image, +// * the filesystem type from github.com/diskfs/go-diskfs/filesystem +// +// Optional: +// * volume label for those filesystems that support it; under Linux this shows +// in '/dev/disks/by-label/