Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.8.2 #20973

Merged
merged 4 commits into from
Dec 11, 2023
Merged

v4.8.2 #20973

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes

## 4.8.2
### Bugfixes
- Fixed a bug in the MacOS pkginstaller where Podman machine was using a different QEMU binary than the one installed using the installer, if it existed on the system ([#20808](https://github.com/containers/podman/issues/20808)).
- Fixed a bug on Windows (WSL) with the first-time install of user-mode networking when using the init command, as opposed to set ([#20921](https://github.com/containers/podman/issues/20921)).

ygalblum marked this conversation as resolved.
Show resolved Hide resolved
### Quadlet
- Fixed a bug where Kube image build failed when starting service with missing image ([#20432](https://github.com/containers/podman/issues/20432)).

## 4.8.1
### Bugfixes
- Fixed a bug on Windows (WSL) where wsl.conf/resolv.conf was not restored when user-mode networking was disabled after being enabled ([#20625](https://github.com/containers/podman/issues/20625)).
Expand Down
1 change: 1 addition & 0 deletions pkg/domain/infra/abi/play.go
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ func (ic *ContainerEngine) getImageAndLabelInfo(ctx context.Context, cwd string,
buildOpts.CommonBuildOpts = commonOpts
buildOpts.Output = container.Image
buildOpts.ContextDirectory = filepath.Dir(buildFile)
buildOpts.ReportWriter = writer
if _, _, err := ic.Libpod.Build(ctx, *buildOpts, []string{buildFile}...); err != nil {
return nil, nil, err
}
Expand Down
21 changes: 17 additions & 4 deletions test/e2e/play_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

var _ = Describe("Podman play kube with build", func() {
Expand Down Expand Up @@ -85,7 +86,10 @@ LABEL marge=mom

session := podmanTest.Podman([]string{"kube", "play", "top.yaml"})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
Expect(session).Should(Exit(0))
stdErrString := session.ErrorToString()
Expect(stdErrString).To(ContainSubstring("Getting image source signatures"))
Expect(stdErrString).To(ContainSubstring("Writing manifest to image destination"))

exists := podmanTest.Podman([]string{"image", "exists", "foobar"})
exists.WaitWithDefaultTimeout()
Expand Down Expand Up @@ -122,7 +126,10 @@ LABEL marge=mom

session := podmanTest.Podman([]string{"kube", "play", "top.yaml"})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
Expect(session).Should(Exit(0))
stdErrString := session.ErrorToString()
Expect(stdErrString).To(ContainSubstring("Getting image source signatures"))
Expect(stdErrString).To(ContainSubstring("Writing manifest to image destination"))

exists := podmanTest.Podman([]string{"image", "exists", "foobar"})
exists.WaitWithDefaultTimeout()
Expand Down Expand Up @@ -266,7 +273,10 @@ LABEL marge=mom

session := podmanTest.Podman([]string{"kube", "play", "--build", "top.yaml"})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
Expect(session).Should(Exit(0))
stdErrString := session.ErrorToString()
Expect(stdErrString).To(ContainSubstring("Getting image source signatures"))
Expect(stdErrString).To(ContainSubstring("Writing manifest to image destination"))

inspect := podmanTest.Podman([]string{"container", "inspect", "top_pod-foobar"})
inspect.WaitWithDefaultTimeout()
Expand Down Expand Up @@ -351,7 +361,10 @@ echo GOT-HERE

session := podmanTest.Podman([]string{"kube", "play", "echo.yaml"})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
Expect(session).Should(Exit(0))
stdErrString := session.ErrorToString()
Expect(stdErrString).To(ContainSubstring("Getting image source signatures"))
Expect(stdErrString).To(ContainSubstring("Writing manifest to image destination"))

cid := "echo_pod-foobar"
wait := podmanTest.Podman([]string{"wait", cid})
Expand Down
66 changes: 66 additions & 0 deletions test/system/252-quadlet.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1412,4 +1412,70 @@ EOF
run_podman rmi --ignore $(pause_image)
}

# This test reproduces https://github.com/containers/podman/issues/20432
# In order to reproduce the issue, the image in the FROM must no be available locally
# and must not have a tag. The first forces Pull and the second the resolution where the crash occurs
# Using a local registry does not work since kube play does not pass the autofile and tls-verify flags to the build
@test "quadlet - kube build from unavailable image with no tag" {
local quadlet_tmpdir=$PODMAN_TMPDIR/quadlets

local untagged_image=quay.io/libpod/busybox
local built_image=test_image
local yaml_dir=$quadlet_tmpdir/$built_image
local build_dir=$yaml_dir/$built_image

# Use the same directory for all quadlet files to make sure later steps access previous ones
mkdir -p $build_dir

container_file_path=$build_dir/Containerfile
cat >$container_file_path << EOF
FROM $untagged_image
EOF

# Create the YAMl file
pod_name="test_pod"
container_name="test"
yaml_source="$yaml_dir/build_$(random_string).yaml"
cat >$yaml_source <<EOF
apiVersion: v1
kind: Pod
metadata:
labels:
app: test
name: $pod_name
spec:
containers:
- command:
- "sh"
args:
- "-c"
- "echo STARTED CONTAINER; sleep inf"
image: $built_image
name: $container_name
EOF

# Create the Quadlet file
local quadlet_file=$quadlet_tmpdir/build_$(random_string).kube
cat > $quadlet_file <<EOF
[Kube]
Yaml=${yaml_source}
PodmanArgs=--build
SetWorkingDirectory=yaml
EOF

# Make sure the tagged image is not locally available
run_podman rmi -i $untagged_image:latest

run_quadlet "$quadlet_file"
service_setup $QUADLET_SERVICE_NAME

# Ensure we have output.
wait_for_output "STARTED CONTAINER" $pod_name-$container_name

run_podman container inspect --format "{{.State.Status}}" test_pod-test
is "$output" "running" "container should be started by systemd and hence be running"

service_cleanup $QUADLET_SERVICE_NAME inactive
run_podman rmi $untagged_image:latest $built_image $(pause_image)
}
# vim: filetype=sh
2 changes: 1 addition & 1 deletion version/rawversion/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ package rawversion
//
// NOTE: remember to bump the version at the top of the top-level README.md
// file when this is bumped.
const RawVersion = "4.8.2-dev"
const RawVersion = "4.8.3-dev"