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

Final v2.0.5 backports #7402

Merged
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
50 changes: 21 additions & 29 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,34 +204,34 @@ rpmbuild_task:
# whether the git tree is clean. The reasoning for that is to make sure
# that the vendor.conf, the code and the vendored packages in ./vendor are
# in sync at all times.
vendor_task:
# vendor_task:

only_if: >-
$CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' &&
$CIRRUS_CHANGE_MESSAGE !=~ '.*CI:DOCS.*'
# only_if: >-
# $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' &&
# $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:DOCS.*'

depends_on:
- "gating"
# depends_on:
# - "gating"

env:
CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/libpod"
GOPATH: "/var/tmp/go"
GOSRC: "$CIRRUS_WORKING_DIR"
# env:
# CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/libpod"
# GOPATH: "/var/tmp/go"
# GOSRC: "$CIRRUS_WORKING_DIR"

# Runs within Cirrus's "community cluster"
container:
image: docker.io/library/golang:1.13
cpu: 4
memory: 12
# # Runs within Cirrus's "community cluster"
# container:
# image: docker.io/library/golang:1.13
# cpu: 4
# memory: 12

timeout_in: 30m
# timeout_in: 30m

vendor_script:
- 'cd ${CIRRUS_WORKING_DIR} && make vendor'
- 'cd ${CIRRUS_WORKING_DIR} && ./hack/tree_status.sh'
# vendor_script:
# - 'cd ${CIRRUS_WORKING_DIR} && make vendor'
# - 'cd ${CIRRUS_WORKING_DIR} && ./hack/tree_status.sh'

on_failure:
failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh |& ${TIMESTAMP}'
# on_failure:
# failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh |& ${TIMESTAMP}'


# This task runs `make varlink_api_generate` followed by ./hack/tree_status.sh to check
Expand Down Expand Up @@ -305,7 +305,6 @@ build_without_cgo_task:

depends_on:
- "gating"
- "vendor"
- "varlink_api"

only_if: >-
Expand Down Expand Up @@ -366,7 +365,6 @@ testing_task:
alias: "testing"
depends_on:
- "gating"
- "vendor"
- "varlink_api"
- "build_without_cgo"
- "container_image_build"
Expand Down Expand Up @@ -431,7 +429,6 @@ special_testing_rootless_task:
depends_on:
- "gating"
- "varlink_api"
- "vendor"
- "build_without_cgo"

only_if: >-
Expand Down Expand Up @@ -466,7 +463,6 @@ special_testing_in_podman_task:
depends_on:
- "gating"
- "varlink_api"
- "vendor"
- "build_without_cgo"

only_if: >-
Expand Down Expand Up @@ -505,7 +501,6 @@ special_testing_cross_task:
depends_on:
- "gating"
- "varlink_api"
- "vendor"

only_if: >-
$CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' &&
Expand Down Expand Up @@ -543,7 +538,6 @@ special_testing_bindings_task:
depends_on:
- "gating"
- "varlink_api"
- "vendor"

only_if: >-
$CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' &&
Expand All @@ -570,7 +564,6 @@ special_testing_endpoint_task:
depends_on:
- "gating"
- "varlink_api"
- "vendor"

only_if: >-
$CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' &&
Expand Down Expand Up @@ -695,7 +688,6 @@ success_task:
# ignores any dependent task conditions
depends_on:
- "gating"
- "vendor"
- "varlink_api"
- "build_without_cgo"
- "container_image_build"
Expand Down
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
- Fixed a bug where the `podman generate systemd --new` command could incorrectly quote arguments to Podman that contained whitespace, leading to nonfunctional unit files ([#7285](https://github.com/containers/podman/issues/7285)).
- Fixed a bug where the `podman version` command did not properly include build time and Git commit.
- Fixed a bug where running systemd in a Podman container on a system that did not use the `systemd` cgroup manager would fail ([#6734](https://github.com/containers/podman/issues/6734)).
- Fixed a bug where capabilities from `--cap-add` were not properly added when a container was started as a non-root user via `--user`.
- Fixed a bug where Pod infra containers were not properly cleaned up when they stopped, causing networking issues ([#7103](https://github.com/containers/podman/issues/7103)).

### API
- Fixed a bug where the libpod and compat Build endpoints did not accept the `application/tar` content type (instead only accepting `application/x-tar`) ([#7185](https://github.com/containers/podman/issues/7185)).
Expand Down
80 changes: 80 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
- Changelog for v2.0.5 (2020-08-24):
* HACK: Manually include c/storage #698
* Final release notes update for v2.0.5.
* Clean up pods before returning from Pod Stop API call
* Ensure pod infra containers have an exit command
* error when adding container to pod with network information
* Vendor in containers/common v0.14.9
* In podman 1.* regression on --cap-add
* fix pod creation with "new:" syntax followup + allow hostname
* Fix a Makefile issue
* Fix a system test failure
* Cleanup handling of podman mount/unmount
* Fix imports (podman -> libpod for v2.0 branch)
* Final set of updates to release notes
* Add support for --connection
* remove --latest for all remote commands
* Further release notes updates for v2.0.5
* fix podman create/run UTS NS docs
* abi: fix detection for systemd
* fix podman version output to include git commit and builttime
* generate systemd: quote arguments with whitespace
* Unmount c/storage containers before removing them
* [WIP] Refactor podman system connection
* Fix `podman system connection` panic
* Revert "remove podman system connection"
* Bump github.com/containers/common to v0.14.7
* Fix imports for runtime_img.go
* Fix one import path pointing to containers/podman
* HACK: Disable build-each-commit
* Ensure DefaultEnvVariables is used in Specgen
* Update release notes for v2.0.5
* [CI:DOCS] BZ1860126 - Fix userns defaults in run man page
* Unconditionally retrieve pod names via API
* Default .Repository and .Tag values to <none>
* Error pass through for more accurate error reporting
* Fix handling of working dir
* Do not use image CMD if user gave ENTRYPOINT
* Ensure WORKDIR from images is created
* Allow specifying seccomp profiles for privileged containers
* Use set for systemd commands
* Enable systemd mode for /usr/local/sbin/init
* Replace deepcopy on history results
* Add parameter verification for api creation network
* add event for image build
* Change /sys/fs/cgroup/systemd mount to rprivate
* podman save use named pipe
* Fix hang when `path` doesn't exist
* podman.service: use sdnotiy
* podman support for IPv6 networks
* vendor c/image v5.5.2
* Fix v2.0.x CI
* system tests: invoke with abs path to podman
* Make changes to /etc/passwd on disk for non-read only
* Add username to /etc/passwd inside of container if --userns keep-id
* Fix close fds of exec --preserve-fds
* fix pod creation with "new:" syntax
* Fix podman service --valink timeout
* Add versioned _ping endpoint
* Change recommended systemd unit path for root.
* API returns 500 in case network is not found instead of 404
* podman.service: drop install section
* Handle podman-remote run --rm
* correct go-binding key for volumes
* cherry-pick: Reenable remote system tests
* system tests: new tests for run, exec
* implement the exitcode when start a container with attach
* Do not set host IP on ports when 0.0.0.0 requested
* Missing return after early exit
* docker-compose uses application/tar
* rootless: system service joins immediately the namespaces
* fix bug podman sign storage path
* podman-remote send name and tag
* Ensure that exec errors write exit codes to the DB
* fix podman logs --tail when log is bigger than pagesize
* image list: speed up
* generate systemd: fix error handling
* Publish IP from YAML (podman play kube)
* Add containers.conf default file for windows and MAC Installs
* Bump Buildah to v1.15.1 on v2.0 branch

- Changelog for v2.0.4 (2020-07-31):
* Update release notes for v2.0.4
* Disable a nonfunctional build test
Expand Down
2 changes: 1 addition & 1 deletion contrib/spec/podman.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Epoch: 99
%else
Epoch: 0
%endif
Version: 2.0.5
Version: 2.0.6
Release: #COMMITDATE#.git%{shortcommit0}%{?dist}
Summary: Manage Pods, Containers and Container Images
License: ASL 2.0
Expand Down
4 changes: 4 additions & 0 deletions libpod/define/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,8 @@ var (

// ErrImageInUse indicates the requested operation failed because the image was in use
ErrImageInUse = errors.New("image is being used")

// ErrNetworkOnPodContainer indicates the user wishes to alter network attributes on a container
// in a pod. This cannot be done as the infra container has all the network information
ErrNetworkOnPodContainer = errors.New("network cannot be configured when it is shared with a pod")
)
20 changes: 20 additions & 0 deletions libpod/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -2036,3 +2036,23 @@ func WithPodHostNetwork() PodCreateOption {
return nil
}
}

// WithPodInfraExitCommand sets an exit command for the pod's infra container.
// Semantics are identical to WithExitCommand() above - the ID of the container
// will be appended to the end of the provided command (note that this will
// specifically be the ID of the infra container *and not the pod's id*.
func WithPodInfraExitCommand(exitCmd []string) PodCreateOption {
return func(pod *Pod) error {
if pod.valid {
return define.ErrPodFinalized
}

if !pod.config.InfraContainer.HasInfraContainer {
return errors.Wrapf(define.ErrInvalidArg, "cannot configure pod infra container exit command as no infra container is being created")
}

pod.config.InfraContainer.ExitCommand = exitCmd

return nil
}
}
11 changes: 10 additions & 1 deletion libpod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ type podState struct {
InfraContainerID string
}

// InfraContainerConfig is the configuration for the pod's infra container
// InfraContainerConfig is the configuration for the pod's infra container.
// Generally speaking, these are equivalent to container configuration options
// you will find in container_config.go (and even named identically), save for
// HasInfraContainer (which determines if an infra container is even created -
// if it is false, no other options in this struct will be used) and HostNetwork
// (this involves the created OCI spec, and as such is not represented directly
// in container_config.go).
// Generally speaking, aside from those two exceptions, these options will set
// the equivalent field in the container's configuration.
type InfraContainerConfig struct {
ConmonPidFile string `json:"conmonPidFile"`
HasInfraContainer bool `json:"makeInfraContainer"`
Expand All @@ -96,6 +104,7 @@ type InfraContainerConfig struct {
UseImageHosts bool `json:"useImageHosts,omitempty"`
HostAdd []string `json:"hostsAdd,omitempty"`
Networks []string `json:"networks,omitempty"`
ExitCommand []string `json:"exitCommand,omitempty"`
}

// ID retrieves the pod's ID
Expand Down
Loading