diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | RELEASE_NOTES.md | 50 | ||||
-rw-r--r-- | cmd/podman/images/build.go | 20 | ||||
-rw-r--r-- | contrib/spec/podman.spec.in | 2 | ||||
-rw-r--r-- | docs/source/markdown/podman-generate-systemd.1.md | 8 | ||||
-rw-r--r-- | libpod/container_internal_linux.go | 5 | ||||
-rw-r--r-- | pkg/rootless/rootless_linux.go | 3 | ||||
-rw-r--r-- | test/e2e/build_test.go | 17 | ||||
-rw-r--r-- | test/e2e/run_test.go | 12 | ||||
-rw-r--r-- | version/version.go | 2 |
11 files changed, 101 insertions, 24 deletions
@@ -38,10 +38,10 @@ PRE_COMMIT = $(shell command -v bin/venv/bin/pre-commit ~/.local/bin/pre-commit SOURCES = $(shell find . -path './.*' -prune -o -name "*.go") -GO_BUILD=$(GO) build +GO_BUILD ?= $(GO) build # Go module support: set `-mod=vendor` to use the vendored sources ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true) - GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor + GO_BUILD ?= GO111MODULE=on $(GO) build -mod=vendor endif BUILDTAGS_CROSS ?= containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay @@ -5,7 +5,7 @@ Libpod provides a library for applications looking to use the Container Pod concept, popularized by Kubernetes. Libpod also contains the Pod Manager tool `(Podman)`. Podman manages pods, containers, container images, and container volumes. -* [Latest Version: 1.9.2](https://github.com/containers/libpod/releases/latest) +* [Latest Version: 2.0.0](https://github.com/containers/libpod/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 65a0571d5..b398d7d48 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,55 @@ # Release Notes +## 2.0.0 +### Features +- The REST API and `podman system service` are no longer experimental, and ready for use! +- The Podman command now supports remotely connections via the REST API using the `--remote` flag. +- The Podman remote client has been entirely rewritten to use the HTTP API instead of Varlink. +- The `podman system connection` command has been added to allow configuring the endpoint that `podman-remote` and `podman --remote` will connect to. +- The `podman generate systemd` command now supports the `--new` flag when used with pods, allowing portable services for pods to be created. +- The `podman play kube` command now supports running Kubernetes Deployment YAML. +- The `podman exec` command now supports the `--detach` flag to run commands in the container in the background. +- The `-p` flag to `podman run` and `podman create` now supports forwarding ports to IPv6 addresses. +- The `podman run`, `podman create` and `podman pod create` command now support a `--replace` flag to remove and replace any existing container (or, for `pod create`, pod) with the same name +- The `--restart-policy` flag to `podman run` and `podman create` now supports the `unless-stopped` restart policy. +- The `--log-driver` flag to `podman run` and `podman create` now supports the `none` driver, which does not log the container's output. +- The `--mount` flag to `podman run` and `podman create` now accepts `readonly` option as an alias to `ro`. +- The `podman generate systemd` command now supports the `--container-prefix`, `--pod-prefix`, and `--separator` arguments to control the name of generated unit files. +- The `podman network ls` command now supports the `--filter` flag to filter results. +- The `podman auto-update` command now supports specifying an authfile to use when pulling new images on a per-container basis using the `io.containers.autoupdate.authfile` label. + +### Changes +- Varlink support, including the `podman varlink` command, is deprecated and will be removed in the next release. +- As part of the implementation of the REST API, JSON output for some commands (`podman ps`, `podman images` most notably) has changed. +- Named and anonymous volumes and `tmpfs` filesystems added to containers are no longer mounted `noexec` by default. + +### Bugfixes +- Fixed a bug where the `podman exec` command would log to journald when run in containers loggined to journald ([#6555](https://github.com/containers/libpod/issues/6555)). +- Fixed a bug where the `podman auto-update` command would not preserve the OS and architecture of the original image when pulling a replacement ([#6613](https://github.com/containers/libpod/issues/6613)). +- Fixed a bug where the `podman cp` command could create an extra `merged` directory when copying into an existing directory ([#6596](https://github.com/containers/libpod/issues/6596)). +- Fixed a bug where the `podman pod stats` command would crash on pods run with `--network=host` ([#5652](https://github.com/containers/libpod/issues/5652)). +- Fixed a bug where containers logs written to journald did not include the name of the container. +- Fixed a bug where the `podman network inspect` and `podman network rm` commands did not properly handle non-default CNI configuration paths ([#6212](https://github.com/containers/libpod/issues/6212)). +- Fixed a bug where Podman did not properly remove containers when using the Kata containers OCI runtime. +- Fixed a bug where `podman inspect` would sometimes incorrectly report the network mode of containers started with `--net=none`. +- Podman is now better able to deal with cases where `conmon` is killed before the container it is monitoring. + +### Misc +- The default Podman CNI configuration now sets `HairpinMode` to allow communication between containers by connecting to a forwarded port on the host. +- Updated Buildah to v1.15.0 +- Updated containers/storage to v1.20.2 +- Updated containers/image to v5.5.1 +- Updated containers/common to v0.14.0 + +## 1.9.3 +### Bugfixes +- Fixed a bug where, on FIPS enabled hosts, FIPS mode secrets were not properly mounted into containers +- Fixed a bug where builds run over Varlink would hang ([#6237](https://github.com/containers/libpod/issues/6237)) + +### Misc +- Named volumes and tmpfs filesystems will no longer default to mounting `noexec` for improved compatibility with Docker +- Updated Buildah to v1.14.9 + ## 1.9.2 ### Bugfixes - Fixed a bug where `podman save` would fail when the target image was specified by digest ([#5234](https://github.com/containers/libpod/issues/5234)) diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 2efc795cd..23bfcab79 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -9,6 +9,7 @@ import ( "github.com/containers/buildah/imagebuildah" buildahCLI "github.com/containers/buildah/pkg/cli" "github.com/containers/buildah/pkg/parse" + "github.com/containers/common/pkg/config" "github.com/containers/libpod/cmd/podman/registry" "github.com/containers/libpod/cmd/podman/utils" "github.com/containers/libpod/pkg/domain/entities" @@ -396,16 +397,10 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil runtimeFlags = append(runtimeFlags, "--"+arg) } - // FIXME: the code below needs to be enabled (and adjusted) once the - // global/root flags are supported. - - // conf, err := runtime.GetConfig() - // if err != nil { - // return err - // } - // if conf != nil && conf.Engine.CgroupManager == config.SystemdCgroupsManager { - // runtimeFlags = append(runtimeFlags, "--systemd-cgroup") - // } + containerConfig := registry.PodmanConfig() + if containerConfig.Engine.CgroupManager == config.SystemdCgroupsManager { + runtimeFlags = append(runtimeFlags, "--systemd-cgroup") + } opts := imagebuildah.BuildOptions{ AddCapabilities: flags.CapAdd, @@ -418,12 +413,13 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil CNIPluginPath: flags.CNIPlugInPath, CommonBuildOpts: &buildah.CommonBuildOptions{ AddHost: flags.AddHost, - CgroupParent: flags.CgroupParent, CPUPeriod: flags.CPUPeriod, CPUQuota: flags.CPUQuota, - CPUShares: flags.CPUShares, CPUSetCPUs: flags.CPUSetCPUs, CPUSetMems: flags.CPUSetMems, + CPUShares: flags.CPUShares, + CgroupParent: flags.CgroupParent, + HTTPProxy: flags.HTTPProxy, Memory: memoryLimit, MemorySwap: memorySwap, ShmSize: flags.ShmSize, diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in index 260de7b20..9e61b9561 100644 --- a/contrib/spec/podman.spec.in +++ b/contrib/spec/podman.spec.in @@ -42,7 +42,7 @@ Epoch: 99 %else Epoch: 0 %endif -Version: 2.0.0 +Version: 2.1.0 Release: #COMMITDATE#.git%{shortcommit0}%{?dist} Summary: Manage Pods, Containers and Container Images License: ASL 2.0 diff --git a/docs/source/markdown/podman-generate-systemd.1.md b/docs/source/markdown/podman-generate-systemd.1.md index dc10a583d..466c7e2bf 100644 --- a/docs/source/markdown/podman-generate-systemd.1.md +++ b/docs/source/markdown/podman-generate-systemd.1.md @@ -163,10 +163,10 @@ $ podman generate systemd --files --name systemd-pod # Copy all the generated files. $ sudo cp pod-systemd-pod.service container-great_payne.service /usr/lib/systemd/system -$ systemctl enable pod-systemd-po.service -Created symlink /etc/systemd/system/multi-user.target.wants/pod-systemd-po.service → /usr/lib/systemd/system/pod-systemd-po.service. -Created symlink /etc/systemd/system/default.target.wants/pod-systemd-po.service → /usr/lib/systemd/system/pod-systemd-po.service. -$ systemctl is-enabled pod-systemd-po.service +$ systemctl enable pod-systemd-pod.service +Created symlink /etc/systemd/system/multi-user.target.wants/pod-systemd-pod.service → /usr/lib/systemd/system/pod-systemd-pod.service. +Created symlink /etc/systemd/system/default.target.wants/pod-systemd-pod.service → /usr/lib/systemd/system/pod-systemd-pod.service. +$ systemctl is-enabled pod-systemd-pod.service enabled ``` To run the user services placed in `$HOME/.config/systemd/user/` on first login of that user, enable the service with --user flag. diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 12c1abf1c..5ee6726e0 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1410,13 +1410,14 @@ func (c *Container) getHosts() string { hosts += fmt.Sprintf("%s %s\n", fields[1], fields[0]) } } + if c.config.NetMode.IsSlirp4netns() { // When using slirp4netns, the interface gets a static IP - hosts += fmt.Sprintf("# used by slirp4netns\n%s\t%s\n", "10.0.2.100", c.Hostname()) + hosts += fmt.Sprintf("# used by slirp4netns\n%s\t%s %s\n", "10.0.2.100", c.Hostname(), c.Config().Name) } if len(c.state.NetworkStatus) > 0 && len(c.state.NetworkStatus[0].IPs) > 0 { ipAddress := strings.Split(c.state.NetworkStatus[0].IPs[0].Address.String(), "/")[0] - hosts += fmt.Sprintf("%s\t%s\n", ipAddress, c.Hostname()) + hosts += fmt.Sprintf("%s\t%s %s\n", ipAddress, c.Hostname(), c.Config().Name) } return hosts } diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go index 3de136f12..01f5b1206 100644 --- a/pkg/rootless/rootless_linux.go +++ b/pkg/rootless/rootless_linux.go @@ -166,7 +166,8 @@ func GetConfiguredMappings() ([]idtools.IDMap, []idtools.IDMap, error) { } mappings, err := idtools.NewIDMappings(username, username) if err != nil { - logrus.Errorf("cannot find mappings for user %s: %v", username, err) + logrus.Errorf( + "cannot find UID/GID for user %s: %v - check rootless mode in man pages.", username, err) } else { uids = mappings.UIDs() gids = mappings.GIDs() diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index 9e41fd231..0cf5283ad 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -195,4 +195,21 @@ var _ = Describe("Podman build", func() { Expect(session.ExitCode()).To(Equal(0)) }) + It("podman build --http_proxy flag", func() { + SkipIfRemote() + os.Setenv("http_proxy", "1.2.3.4") + podmanTest.RestoreAllArtifacts() + dockerfile := `FROM docker.io/library/alpine:latest +RUN printenv http_proxy` + + dockerfilePath := filepath.Join(podmanTest.TempDir, "Dockerfile") + err := ioutil.WriteFile(dockerfilePath, []byte(dockerfile), 0755) + Expect(err).To(BeNil()) + session := podmanTest.PodmanNoCache([]string{"build", "--file", dockerfilePath, podmanTest.TempDir}) + session.Wait(120) + Expect(session.ExitCode()).To(Equal(0)) + ok, _ := session.GrepString("1.2.3.4") + Expect(ok).To(BeTrue()) + os.Unsetenv("http_proxy") + }) }) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index c78c23b1f..7e75e2605 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -101,6 +101,18 @@ var _ = Describe("Podman run", func() { Expect(match).Should(BeTrue()) }) + It("podman create pod with name in /etc/hosts", func() { + name := "test_container" + hostname := "test_hostname" + session := podmanTest.Podman([]string{"run", "-ti", "--rm", "--name", name, "--hostname", hostname, ALPINE, "cat", "/etc/hosts"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + match, _ := session.GrepString(name) + Expect(match).Should(BeTrue()) + match, _ = session.GrepString(hostname) + Expect(match).Should(BeTrue()) + }) + It("podman run a container based on remote image", func() { session := podmanTest.Podman([]string{"run", "-dt", BB_GLIBC, "ls"}) session.WaitWithDefaultTimeout() diff --git a/version/version.go b/version/version.go index 4c7202e77..2e1335d2d 100644 --- a/version/version.go +++ b/version/version.go @@ -4,7 +4,7 @@ package version // NOTE: remember to bump the version at the top // of the top-level README.md file when this is // bumped. -const Version = "2.0.0-dev" +const Version = "2.1.0-dev" // APIVersion is the version for the remote // client API. It is used to determine compatibility |