summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--RELEASE_NOTES.md12
-rw-r--r--libpod/container_internal_linux.go16
-rw-r--r--libpod/container_internal_linux_test.go29
-rw-r--r--pkg/machine/libvirt/config.go6
-rw-r--r--pkg/machine/libvirt/machine.go17
-rw-r--r--pkg/machine/libvirt/machine_unsupported.go3
-rw-r--r--pkg/machine/qemu/machine.go3
-rw-r--r--test/system/255-auto-update.bats6
9 files changed, 66 insertions, 28 deletions
diff --git a/README.md b/README.md
index 10bf216a7..131c6f5a9 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
Podman (the POD MANager) is a tool for managing containers and images, volumes mounted into those containers, and pods made from groups of containers.
Podman is based on libpod, a library for container lifecycle management that is also contained in this repository. The libpod library provides APIs for managing containers, pods, container images, and volumes.
-* [Latest Version: 3.3.0](https://github.com/containers/podman/releases/latest)
+* [Latest Version: 3.3.1](https://github.com/containers/podman/releases/latest)
* Latest Remote client for Windows
* Latest Remote client for macOS
* Latest Static Remote client for Linux
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 9649e7abb..b9b94dbb3 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,5 +1,17 @@
# Release Notes
+## 3.3.1
+### Bugfixes
+- Fixed a bug where unit files created by `podman generate systemd` could not cleanup shut down containers when stopped by `systemctl stop` ([#11304](https://github.com/containers/podman/issues/11304)).
+- Fixed a bug where `podman machine` commands would not properly locate the `gvproxy` binary in some circumstances.
+- Fixed a bug where containers created as part of a pod using the `--pod-id-file` option would not join the pod's network namespace ([#11303](https://github.com/containers/podman/issues/11303)).
+- Fixed a bug where Podman, when using the systemd cgroups driver, could sometimes leak dbus sessions.
+- Fixed a bug where the `until` filter to `podman logs` and `podman events` was improperly handled, requiring input to be negated ([#11158](https://github.com/containers/podman/issues/11158)).
+- Fixed a bug where rootless containers using CNI networking run on systems using `systemd-resolved` for DNS would fail to start if resolved symlinked `/etc/resolv.conf` to an absolute path ([#11358](https://github.com/containers/podman/issues/11358)).
+
+### API
+- A large number of potential file descriptor leaks from improperly closing client connections have been fixed.
+
## 3.3.0
### Features
- Containers inside VMs created by `podman machine` will now automatically handle port forwarding - containers in `podman machine` VMs that publish ports via `--publish` or `--publish-all` will have these ports not just forwarded on the VM, but also on the host system.
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 847122929..cafa3c642 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
@@ -1942,9 +1943,24 @@ func (c *Container) generateHosts(path string) (string, error) {
}
hosts := string(orig)
hosts += c.getHosts()
+
+ hosts = c.appendLocalhost(hosts)
+
return c.writeStringToRundir("hosts", hosts)
}
+// based on networking mode we may want to append the localhost
+// if there isn't any record for it and also this shoud happen
+// in slirp4netns and similar network modes.
+func (c *Container) appendLocalhost(hosts string) string {
+ if !strings.Contains(hosts, "localhost") &&
+ !c.config.NetMode.IsHost() {
+ hosts += "127.0.0.1\tlocalhost\n::1\tlocalhost\n"
+ }
+
+ return hosts
+}
+
// appendHosts appends a container's config and state pertaining to hosts to a container's
// local hosts file. netCtr is the container from which the netNS information is
// taken.
diff --git a/libpod/container_internal_linux_test.go b/libpod/container_internal_linux_test.go
index 1465ffbea..899f9bffd 100644
--- a/libpod/container_internal_linux_test.go
+++ b/libpod/container_internal_linux_test.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
@@ -7,6 +8,7 @@ import (
"os"
"testing"
+ "github.com/containers/podman/v3/pkg/namespaces"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/stretchr/testify/assert"
)
@@ -68,3 +70,30 @@ func TestGenerateUserGroupEntry(t *testing.T) {
}
assert.Equal(t, group, "567:x:567:567\n")
}
+
+func TestAppendLocalhost(t *testing.T) {
+ {
+ c := Container{
+ config: &ContainerConfig{
+ ContainerNetworkConfig: ContainerNetworkConfig{
+ NetMode: namespaces.NetworkMode("slirp4netns"),
+ },
+ },
+ }
+
+ assert.Equal(t, "127.0.0.1\tlocalhost\n::1\tlocalhost\n", c.appendLocalhost(""))
+ assert.Equal(t, "127.0.0.1\tlocalhost", c.appendLocalhost("127.0.0.1\tlocalhost"))
+ }
+ {
+ c := Container{
+ config: &ContainerConfig{
+ ContainerNetworkConfig: ContainerNetworkConfig{
+ NetMode: namespaces.NetworkMode("host"),
+ },
+ },
+ }
+
+ assert.Equal(t, "", c.appendLocalhost(""))
+ assert.Equal(t, "127.0.0.1\tlocalhost", c.appendLocalhost("127.0.0.1\tlocalhost"))
+ }
+}
diff --git a/pkg/machine/libvirt/config.go b/pkg/machine/libvirt/config.go
deleted file mode 100644
index 1ce5ab154..000000000
--- a/pkg/machine/libvirt/config.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// +build amd64,linux arm64,linux amd64,darwin arm64,darwin
-
-package libvirt
-
-type MachineVM struct {
-}
diff --git a/pkg/machine/libvirt/machine.go b/pkg/machine/libvirt/machine.go
deleted file mode 100644
index e1aa1569b..000000000
--- a/pkg/machine/libvirt/machine.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// +build amd64,linux arm64,linux amd64,darwin arm64,darwin
-
-package libvirt
-
-import "github.com/containers/podman/v3/pkg/machine"
-
-func (v *MachineVM) Init(name string, opts machine.InitOptions) error {
- return nil
-}
-
-func (v *MachineVM) Start(name string) error {
- return nil
-}
-
-func (v *MachineVM) Stop(name string) error {
- return nil
-}
diff --git a/pkg/machine/libvirt/machine_unsupported.go b/pkg/machine/libvirt/machine_unsupported.go
deleted file mode 100644
index 8b54440fe..000000000
--- a/pkg/machine/libvirt/machine_unsupported.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// +build !amd64 amd64,windows
-
-package libvirt
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 38a16c3ef..dc7703724 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -278,6 +278,9 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
time.Sleep(wait)
wait++
}
+ if err != nil {
+ return err
+ }
fd, err := qemuSocketConn.(*net.UnixConn).File()
if err != nil {
diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats
index b172bb917..bb4b5c13f 100644
--- a/test/system/255-auto-update.bats
+++ b/test/system/255-auto-update.bats
@@ -339,6 +339,8 @@ EOF
}
@test "podman auto-update using systemd" {
+ skip_if_journald_unavailable
+
generate_service alpine image
cat >$UNIT_DIR/podman-auto-update-$cname.timer <<EOF
@@ -386,7 +388,9 @@ EOF
done
if [[ -n "$failed_start" ]]; then
- die "Did not find expected string '$expect' in journalctl output for $cname"
+ echo "journalctl output:"
+ sed -e 's/^/ /' <<<"$output"
+ die "Did not find expected string '$expect' in journalctl output for $cname"
fi
_confirm_update $cname $ori_image