summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml4
-rwxr-xr-xcontrib/cirrus/logformatter20
-rwxr-xr-xcontrib/cirrus/runner.sh10
-rw-r--r--docs/source/markdown/podman-create.1.md2
-rw-r--r--docs/source/markdown/podman-run.1.md2
-rw-r--r--pkg/machine/qemu/machine.go30
6 files changed, 39 insertions, 29 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 81bbe7c8f..14d3540c1 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -167,14 +167,18 @@ build_task:
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
# ID for re-use of build output
+ CI_DESIRED_RUNTIME: crun
- env: &priorfedora_envvars
DISTRO_NV: ${PRIOR_FEDORA_NAME}
VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
+ CI_DESIRED_RUNTIME: crun
- env: &ubuntu_envvars
DISTRO_NV: ${UBUNTU_NAME}
VM_IMAGE_NAME: ${UBUNTU_CACHE_IMAGE_NAME}
CTR_FQIN: ${UBUNTU_CONTAINER_FQIN}
+ # FIXME 2022-07-12: change to runc once #14833 is fixed!
+ CI_DESIRED_RUNTIME: crun
env:
TEST_FLAVOR: build
clone_script: *full_clone
diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter
index 59969c3e7..1dc618768 100755
--- a/contrib/cirrus/logformatter
+++ b/contrib/cirrus/logformatter
@@ -560,18 +560,14 @@ END_HTML
# See #14569 for more info.
#
# [1] https://cirrus-ci.org/guide/writing-tasks/#latest-build-artifacts
- if ($have_formatted_log && $ENV{CIRRUS_BUILD_ID} && $ENV{CIRRUS_TASK_NAME}) {
- my $URL_BASE = "https://api.cirrus-ci.com";
- my $build_id = $ENV{CIRRUS_BUILD_ID};
- my $task_name = $ENV{CIRRUS_TASK_NAME};
-
- # Escape spaces in task names ("int fedora 35 podman root etc")
- $task_name =~ s/\s/%20/g;
-
- # URL is long and cumbersome and duplicaty. The task name cannot be
- # reduced; the file name could, but I choose to leave it because I
- # sometimes download HTML logs and oh how I hate "log.html" filenames.
- my $URL = "${URL_BASE}/v1/artifact/build/$build_id/$task_name/html/${outfile}";
+ if ($have_formatted_log && $ENV{CIRRUS_TASK_ID}) {
+ my $URL_BASE = "https://api.cirrus-ci.com";
+ my $task_id = $ENV{CIRRUS_TASK_ID};
+
+ # Link by *taskID*, not buildID + taskname. First, this is shorter
+ # and less duplicaty. Second, and more important, buildID + taskname
+ # is non-unique, and a link to a flake log will be clobbered.
+ my $URL = "${URL_BASE}/v1/artifact/task/$task_id/html/${outfile}";
print "\n\nAnnotated results:\n $URL\n";
}
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index 762a3b501..32f66bac2 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -236,6 +236,16 @@ function _run_build() {
make clean
make vendor
make podman-release # includes podman, podman-remote, and docs
+
+ # Last-minute confirmation that we're testing the desired runtime.
+ # This Can't Possibly Failâ„¢ in regular CI; only when updating VMs.
+ # $CI_DESIRED_RUNTIME must be defined in .cirrus.yml.
+ req_env_vars CI_DESIRED_RUNTIME
+ runtime=$(bin/podman info --format '{{.Host.OCIRuntime.Name}}')
+ # shellcheck disable=SC2154
+ if [[ "$runtime" != "$CI_DESIRED_RUNTIME" ]]; then
+ die "Built podman is using '$runtime'; this CI environment requires $CI_DESIRED_RUNTIME"
+ fi
}
function _run_altbuild() {
diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md
index 09c7d99c1..9bee25220 100644
--- a/docs/source/markdown/podman-create.1.md
+++ b/docs/source/markdown/podman-create.1.md
@@ -449,7 +449,7 @@ container:
Defaults to `true`
-#### **--image-volume**, **builtin-volume**=*bind|tmpfs|ignore*
+#### **--image-volume**=*bind|tmpfs|ignore*
Tells Podman how to handle the builtin image volumes. Default is **bind**.
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index a389be2a8..a6285d4e0 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -480,7 +480,7 @@ proxy environment at container build time.) (This option is not available with t
Defaults to **true**.
-#### **--image-volume**, **builtin-volume**=**bind**|**tmpfs**|**ignore**
+#### **--image-volume**=**bind**|**tmpfs**|**ignore**
Tells Podman how to handle the builtin image volumes. Default is **bind**.
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 6134e69e1..3b57455c4 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -240,20 +240,6 @@ func (p *Provider) LoadVMByName(name string) (machine.VM, error) {
return nil, err
}
- // It is here for providing the ability to propagate
- // proxy settings (e.g. HTTP_PROXY and others) on a start
- // and avoid a need of re-creating/re-initiating a VM
- if proxyOpts := machine.GetProxyVariables(); len(proxyOpts) > 0 {
- proxyStr := "name=opt/com.coreos/environment,string="
- var proxies string
- for k, v := range proxyOpts {
- proxies = fmt.Sprintf("%s%s=\"%s\"|", proxies, k, v)
- }
- proxyStr = fmt.Sprintf("%s%s", proxyStr, base64.StdEncoding.EncodeToString([]byte(proxies)))
- vm.CmdLine = append(vm.CmdLine, "-fw_cfg", proxyStr)
- }
-
- logrus.Debug(vm.CmdLine)
return vm, nil
}
@@ -573,15 +559,29 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
attr := new(os.ProcAttr)
files := []*os.File{dnr, dnw, dnw, fd}
attr.Files = files
- logrus.Debug(v.CmdLine)
cmdLine := v.CmdLine
+ // It is here for providing the ability to propagate
+ // proxy settings (e.g. HTTP_PROXY and others) on a start
+ // and avoid a need of re-creating/re-initiating a VM
+ if proxyOpts := machine.GetProxyVariables(); len(proxyOpts) > 0 {
+ proxyStr := "name=opt/com.coreos/environment,string="
+ var proxies string
+ for k, v := range proxyOpts {
+ proxies = fmt.Sprintf("%s%s=\"%s\"|", proxies, k, v)
+ }
+ proxyStr = fmt.Sprintf("%s%s", proxyStr, base64.StdEncoding.EncodeToString([]byte(proxies)))
+ cmdLine = append(cmdLine, "-fw_cfg", proxyStr)
+ }
+
// Disable graphic window when not in debug mode
// Done in start, so we're not suck with the debug level we used on init
if !logrus.IsLevelEnabled(logrus.DebugLevel) {
cmdLine = append(cmdLine, "-display", "none")
}
+ logrus.Debugf("qemu cmd: %v", cmdLine)
+
stderrBuf := &bytes.Buffer{}
cmd := &exec.Cmd{