Skip to content

Commit

Permalink
Merge pull request containers#9427 from mheon/bump_301
Browse files Browse the repository at this point in the history
Bump to v3.0.1
  • Loading branch information
openshift-merge-robot authored Feb 19, 2021
2 parents 797f1ea + 24cc53c commit 7e286bc
Show file tree
Hide file tree
Showing 236 changed files with 1,540 additions and 5,363 deletions.
35 changes: 26 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,47 @@ run:
- contrib
- dependencies
- test
- pkg/spec
- vendor
skip-files:
- iopodman.go
- swagger.go
modules-download-mode: readonly
linters:
enable-all: true
disable:
# All these break for one reason or another
- nolintlint
- gocognit
- testpackage
- goerr113
- exhaustivestruct
- errorlint
- wrapcheck
- paralleltest
- wsl
- godox
- tparallel
- gomnd
- nlreturn
- noctx
- nestif
- predeclared
- thelper
- ifshort
- staticcheck
- forbidigo
- exhaustive
- unparam
- gofumpt
- gci
- godot
- makezero
- dupl
- funlen
- gochecknoglobals
- gochecknoinits
- goconst
- gocyclo
- golint
- lll
- structcheck
- typecheck
- unconvert
- varcheck
- deadcode
- depguard
- errcheck
- gocritic
- gosec
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ endef

.PHONY: .install.golangci-lint
.install.golangci-lint: .gopathok
VERSION=1.18.0 GOBIN=$(GOBIN) sh ./hack/install_golangci.sh
VERSION=1.36.0 GOBIN=$(GOBIN) sh ./hack/install_golangci.sh

.PHONY: .install.bats
.install.bats: .gopathok
Expand Down
31 changes: 31 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Release Notes

## 3.0.1
### Changes
- Several frequently-occurring `WARN` level log messages have been downgraded to `INFO` or `DEBUG` to not clutter terminal output.

### Bugfixes
- Fixed a bug where the `Created` field of `podman ps --format=json` was formatted as a string instead of an Unix timestamp (integer) ([#9315](https://github.com/containers/podman/issues/9315)).
- Fixed a bug where failing lookups of individual layers during the `podman images` command would cause the whole command to fail without printing output.
- Fixed a bug where `--cgroups=split` did not function properly on cgroups v1 systems.
- Fixed a bug where mounting a volume over an directory in the container that existed, but was empty, could fail ([#9393](https://github.com/containers/podman/issues/9393)).
- Fixed a bug where mounting a volume over a directory in the container that existed could copy the entirety of the container's rootfs, instead of just the directory mounted over, into the volume ([#9415](https://github.com/containers/podman/pull/9415)).
- Fixed a bug where Podman would treat the `--entrypoint=[""]` option to `podman run` and `podman create` as a literal empty string in the entrypoint, when instead it should have been ignored ([#9377](https://github.com/containers/podman/issues/9377)).
- Fixed a bug where Podman would set the `HOME` environment variable to `""` when the container ran as a user without an assigned home directory ([#9378](https://github.com/containers/podman/issues/9378)).
- Fixed a bug where specifying a pod infra image that had no tags (by using its ID) would cause `podman pod create` to panic ([#9374](https://github.com/containers/podman/issues/9374)).
- Fixed a bug where the `--runtime` option was not properly handled by the `podman build` command ([#9365](https://github.com/containers/podman/issues/9365)).
- Fixed a bug where Podman would incorrectly print an error message related to the remote API when the remote API was not in use and starting Podman failed.
- Fixed a bug where Podman would change ownership of a container's working directory, even if it already existed ([#9387](https://github.com/containers/podman/issues/9387)).
- Fixed a bug where the `podman generate systemd --new` command would incorrectly escape `%t` when generating the path for the PID file ([#9373](https://github.com/containers/podman/issues/9373)).
- Fixed a bug where Podman could, when run inside a Podman container with the host's containers/storage directory mounted into the container, erroneously detect a reboot and reset container state if the temporary directory was not also mounted in ([#9191](https://github.com/containers/podman/issues/9191)).
- Fixed a bug where some options of the `podman build` command (including but not limited to `--jobs`) were nonfunctional ([#9247](https://github.com/containers/podman/issues/9247)).

### API
- Fixed a breaking change to the Libpod Wait API for Containers where the Conditions parameter changed type in Podman v3.0 ([#9351](https://github.com/containers/podman/issues/9351)).
- Fixed a bug where the Compat Create endpoint for Containers did not properly handle forwarded ports that did not specify a host port.
- Fixed a bug where the Libpod Wait endpoint for Containers could write duplicate headers after an error occurred.
- Fixed a bug where the Compat Create endpoint for Images would not pull images that already had a matching tag present locally, even if a more recent version was available at the registry ([#9232](https://github.com/containers/podman/issues/9232)).
- The Compat Create endpoint for Images has had its compatibility with Docker improved, allowing its use with the `docker-java` library.

### Misc
- Updated Buildah to v1.19.4
- Updated the containers/storage library to v1.24.6

## 3.0.0
### Features
- Podman now features initial support for Docker Compose.
Expand Down
47 changes: 47 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
- Changelog for v3.0.1 (2021-02-18):
* Final 3.0.1 release notes update
* Bump containers/buildah to v1.19.4
* Implement missing arguments for podman build
* Fix swagger generation
* Updated Buildah to v1.19.4
* Add release notes for v3.0.1
* Don't switch on a single case
* Quote URL
* bindings: support simple types that implement fmt.Stringer interface
* API: fix libpod's container wait endpoint condition conversion
* Do not reset storage when running inside of a container
* Add missing early returns in compat API
* [NO TESTS NEEDED] Refactor generated code
* Enable more golangci-lint linters
* Enable whitespace linter
* Enable golint linter
* Enable stylecheck linter
* [NO TESTS NEEDED] Update linter
* apiv2: handle docker-java clients pulling
* Fix superfluous response.WriteHeader call in WaitContainerLibpod()
* fix dns resolution on ubuntu
* e2e: fix network alias test
* fix failing image e2e test
* Fix broken podman generate systemd --new with pods
* Don't chown workdir if it already exists
* correct startup error message
* fix create container: handle empty host port
* podman build: pass runtime to buildah
* images/create: always pull image
* Fix panic in pod creation
* do not set empty $HOME
* infra: downgrade warning to debug
* Ignore entrypoint=[\"\"]
* podman ps --format '{{ .Size }}' requires --size option
* Change source path resolution for volume copy-up
* Fix an issue where copyup could fail with ENOENT
* change ps Created to unix
* container ps json format miscue
* make layer-tree lookup errors non-fatal
* Bump c/storage to v1.24.6
* utils: takes the longest path on cgroup v1
* utils: create parent cgroups
* utils: ignore unified on cgroupv1 if not present
* utils: skip empty lines
* hardening flags for fedora rpmbuilds

- Changelog for v3.0.0 (2021-02-11):
* Update release notes for v3.0 final
* Rewrite copy-up to use buildah Copier
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/common/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -796,5 +796,4 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
"Configure cgroup v2 (key=value)",
)
_ = cmd.RegisterFlagCompletionFunc(cgroupConfFlagName, completion.AutocompleteNone)

}
7 changes: 5 additions & 2 deletions cmd/podman/common/create_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
// publish
for port, pbs := range cc.HostConfig.PortBindings {
for _, pb := range pbs {
hostport, err := strconv.Atoi(pb.HostPort)
var hostport int
var err error
if pb.HostPort != "" {
hostport, err = strconv.Atoi(pb.HostPort)
}
if err != nil {
return nil, nil, err
}
Expand Down Expand Up @@ -268,7 +272,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
endpointsConfig := cc.NetworkingConfig.EndpointsConfig
cniNetworks := make([]string, 0, len(endpointsConfig))
for netName, endpoint := range endpointsConfig {

cniNetworks = append(cniNetworks, netName)

if endpoint == nil {
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/common/createparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ func (c *ContainerCLIOpts) validate() error {
return errors.Errorf("invalid image-volume type %q. Pick one of bind, tmpfs, or ignore", c.ImageVolume)
}
return nil

}
1 change: 0 additions & 1 deletion cmd/podman/containers/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func init() {
})
attachFlags(containerAttachCommand)
validate.AddLatestFlag(containerAttachCommand, &attachOpts.Latest)

}

func attach(cmd *cobra.Command, args []string) error {
Expand Down
16 changes: 11 additions & 5 deletions cmd/podman/containers/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -253,12 +254,12 @@ func ps(cmd *cobra.Command, _ []string) error {
// responses will grow to the largest number of processes reported on, but will not thrash the gc
var responses []psReporter
for ; ; responses = responses[:0] {
if ctnrs, err := getResponses(); err != nil {
ctnrs, err := getResponses()
if err != nil {
return err
} else {
for _, r := range ctnrs {
responses = append(responses, psReporter{r})
}
}
for _, r := range ctnrs {
responses = append(responses, psReporter{r})
}

tm.Clear()
Expand Down Expand Up @@ -392,6 +393,11 @@ func (l psReporter) Command() string {
// Size returns the rootfs and virtual sizes in human duration in
// and output form (string) suitable for ps
func (l psReporter) Size() string {
if l.ListContainer.Size == nil {
logrus.Errorf("Size format requires --size option")
return ""
}

virt := units.HumanSizeWithPrecision(float64(l.ListContainer.Size.RootFsSize), 3)
s := units.HumanSizeWithPrecision(float64(l.ListContainer.Size.RwSize), 3)
return fmt.Sprintf("%s (virtual %s)", s, virt)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/containers/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,4 @@ func restore(_ *cobra.Command, args []string) error {
}
}
return errs.PrintErrors()

}
1 change: 0 additions & 1 deletion cmd/podman/containers/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func waitFlags(cmd *cobra.Command) {
conditionFlagName := "condition"
flags.StringVar(&waitCondition, conditionFlagName, "stopped", "Condition to wait on")
_ = cmd.RegisterFlagCompletionFunc(conditionFlagName, common.AutocompleteWaitCondition)

}

func init() {
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/generate/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func systemd(cmd *cobra.Command, args []string) error {
default:
return errors.Errorf("unknown --format argument: %s", format)
}

}

func printDefault(units map[string]string) error {
Expand Down
Loading

0 comments on commit 7e286bc

Please sign in to comment.