14610 Commits

Author SHA1 Message Date
41a6dd36f6 Update swagger to improve compatibility
[NO NEW TESTS NEEDED]

Improve swagger and handler code compatibility.

Fixes #12804

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-03-22 15:20:30 -07:00
8a032368ac Merge pull request #13598 from Luap99/unshare-doc
[CI:DOCS] podman unshare: document that command cannot be used with remote
2022-03-22 22:31:34 +01:00
88d4db009e Binary growth check, part 2 of 2
Add a CI check to prevent unwanted bloat in binary images,
by building a baseline (pre-PR) binary then comparing file
sizes post-PR.

Part 1 (#13518) added a new script that runs multiple 'make's,
comparing image sizes against an original, and failing loudly
if growth is too big. An override mechanism is defined.

This is part 2 of 2: adding the CI rule. We couldn't do that
in part 1, because the rule would call a script that didn't
exist in the pre-PR commit.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-22 13:17:10 -06:00
c840f64e41 Merge pull request #13593 from Luap99/compose-flakev2
fix compose test error in retry logic
2022-03-22 19:36:28 +01:00
5cb827ff17 Merge pull request #13595 from edsantiago/logformatter_netavark
Fix unreadable netavark logs
2022-03-22 19:04:26 +01:00
7b696fb012 Merge pull request #13518 from edsantiago/size_check_part1
Binary growth check, part 1 of 2
2022-03-22 18:44:26 +01:00
3627dfc524 podman unshare: document that command cannot be used with remote
Fixes #13596

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-22 17:54:37 +01:00
130bcc3a93 podman stats: improve cpu average calc
We can just calculate the cpu percent for the time the container is
running. There is no need to use datapoints.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-22 17:44:58 +01:00
0edb3ddd39 podman stats: calc CPU percentage correctly
When you run podman stats, the first interval always shows the wrong cpu
usage. To calculate cpu percentage we get the cpu time from the cgroup
and compare this against the system time between two stats. Since the
first time we do not have a previous stats an empty struct is used
instead. Thus we do not use the actual running time of the container but
the current unix timestamp (time since Jan 1 1970).

To fix this we make sure that the previous stats time is set to the
container start time, when it is empty.

[NO NEW TESTS NEEDED] No idea how I could create a test which would have
a predictable cpu usage.

See the linked bugzilla for a reproducer.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2066145

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-22 17:43:49 +01:00
1a7f5b3d51 Cirrus: Publish binary artifacts on success
In general continuous-delivery (CD) tends to pair well with CI.  More
specifically, there is a need for some reverse-dependency CI testing in
netavark/aardvark-dns.  In all cases, the download URL needs to remain
consistent, without elements like `Build%20for%20fedora-35`.

The 'Total Success' task only ever executes when all dependencies are
successful.  When a non `[CI:DOCS]` build is successful, gather all
binary/release artifacts in a new task which depends on 'Total Success'.
This will provide a uniform name (`artifacts`) and URL for downstream
users to use.  For example:

https://api.cirrus-ci.com/v1/artifact/github/containers/podman/artifacts/binary.zip

or

https://api.cirrus-ci.com/v1/artifact/github/containers/podman/artifacts/binary/FILENAME

Where ***FILENAME*** is one of:

* `podman`
* `podman-remote`
* `rootlessport`
* `podman-release-386.tar.gz`
* `podman-release-amd64.tar.gz`
* `podman-release-arm64.tar.gz`
* `podman-release-arm.tar.gz`
* `podman-release-mips64le.tar.gz`
* `podman-release-mips64.tar.gz`
* `podman-release-mipsle.tar.gz`
* `podman-release-mips.tar.gz`
* `podman-release-ppc64le.tar.gz`
* `podman-release-s390x.tar.gz`
* `podman-remote-release-darwin_amd64.zip`
* `podman-remote-release-darwin_arm64.zip`
* `podman-remote-release-windows_amd64.zip`
* `podman-v4.0.0-dev.msi`

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-03-22 11:01:45 -04:00
b4b8b8b537 Merge pull request #13398 from giuseppe/fix-warning-pod-create-rm
libpod: drop warning if cgroup doesn't exist
2022-03-22 15:56:45 +01:00
501355d4a5 Fix unreadable netavark logs
ginkgo netavark logs (and, to a lesser extent, cni logs)
are unreadable because the hide-boring-opts code did not
know about --network-backend. Now it does.

Manually filtered an existing netavark log to confirm there
are no other new options we should know about.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-22 08:56:36 -06:00
5e1e13c18c add contextDir to tar on remote
podman build fails on remote build when using a relative context directory.
This is because the context dir was not being added to the tar, so when remote
the compat build function would not be able to stat the contextDir.

resolves #13293

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-03-22 10:33:05 -04:00
c25213c8f8 fix compose test error in retry logic
We cannot use local var outside of a function. We have to use a global
one.

Log: https://storage.googleapis.com/cirrus-ci-6707778565701632-fcae48/artifacts/containers/podman/5970023511490560/html/compose_v2-podman-fedora-35-root-host.log.html

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-22 15:22:17 +01:00
901066acd1 Merge pull request #13580 from vrothberg/enable-linters
enable linters
2022-03-22 15:14:38 +01:00
fc963159b8 Merge pull request #13590 from giuseppe/add-note-for-additional-stores-deletions
[CI:DOCS] troubleshooting: document rm in image stores
2022-03-22 15:10:29 +01:00
02aae4a658 Merge pull request #13585 from flouthoc/fix-no-healthcheck
healthcheck: stop showing wrong status when `--no-healthcheck` is set
2022-03-22 14:44:26 +01:00
84e7ce82d9 Binary growth check, part 1 of 2
Add a CI check to prevent unwanted bloat in binary images,
by building a baseline (pre-PR) binary then comparing file
sizes post-PR.

We piggyback onto the existing 'Build Each Commit' CI check
because it gives us an easy way to run 'make' against the
parent commit.

This is part 1 of 2: adding the script, not the Makefile rule.
We can't add the Makefile rule now because the script it would
invoke does not exist in the parent commit.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-22 07:38:05 -06:00
06dd9136a2 fix a number of errcheck issues
Numerous issues remain, especially in tests/e2e.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:15:28 +01:00
07999b2373 [CI:DOCS] troubleshooting: document rm in image stores
Closes: https://github.com/containers/podman/issues/13003

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-22 13:14:17 +01:00
6c030cd573 fix a number of godot issues
Still an unknown number remains but I am running out of patience.
Adding dots is not the best use of my time.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
68b94338ba linter: enable makezero
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
0f12b6fe55 linter: enable nilerr
A number of cases looked suspicious, so I marked them with `FIXME`s to
leave some breadcrumbs.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
081e091437 linter: document nolintlint
We need to keep disabling the `nolintlint` linter to continue using
`nolint` directives in the code.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
7c047bfbe9 linter: document tagliatelle
Disabling tagliatelle would mean disabling it for hundreds of fields
that cannot be changed due to K8s or Docker or backwards compat.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
9e8cca26a1 test/e2e/inspect_test.go: wait for sessions
Make sure we're waiting for the ls container to finish to prevent
potential flakes or future regressions.

Spotted while enabling a linter.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
fb792f7ed4 linter: enable ineffassign
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
f72a678f2a linter: enable errchkjson
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:35 +01:00
bb6b69b4ab linter: enable wastedassign
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:34 +01:00
070e401499 linter: enable interfacer
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-22 13:04:34 +01:00
d0e9f28f87 Merge pull request #13584 from lsm5/fix-podman-remote-static
Makefile: build podman-remote-static with cgo disabled
2022-03-22 12:16:25 +01:00
095f97100f Merge pull request #13577 from giuseppe/drop-fedora-31-warning
libpod: drop warning for Fedora 31
2022-03-22 12:12:25 +01:00
90f37e1a68 build(deps): bump github.com/containers/ocicrypt from 1.1.2 to 1.1.3
Bumps [github.com/containers/ocicrypt](https://github.com/containers/ocicrypt) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/containers/ocicrypt/releases)
- [Commits](https://github.com/containers/ocicrypt/compare/v1.1.2...v1.1.3)

---
updated-dependencies:
- dependency-name: github.com/containers/ocicrypt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 11:11:50 +00:00
b726d75f20 Merge pull request #13536 from dcermak/storage-autodetect-mount_program
Storage autodetect mount program
2022-03-22 12:10:27 +01:00
6d6bdabc8c healthcheck: stop showing wrong status when --no-healthcheck is set
Containers started with `--no-healthcheck` are configured to contain no
healthcheck and test configured as `NONE`. Podman shows wrong status as
such use cases.

Following commit fixes the faulty behavior of stauts field for
containers started with `--no-healthcheck`

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-22 12:28:55 +05:30
8961dd345b Makefile: build podman-remote-static with cgo disabled
Resolves: #13557

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-21 16:20:00 -04:00
e034db16bf Merge pull request #13575 from Luap99/percent
podman system df: fix percent calculation
2022-03-21 15:04:46 +01:00
4282f56533 Merge pull request #13574 from edsantiago/bats
pod system tests: clean up stray image
2022-03-21 14:58:45 +01:00
1b68c38262 libpod: drop warning for Fedora 31
drop a warning for runc not supporting cgroup v2 on Fedora 31.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-21 14:01:16 +01:00
63bf3991ef vendor containers/storage with https://github.com/containers/storage/pull/1165
Signed-off-by: Dan Čermák <dcermak@suse.com>
2022-03-21 13:21:25 +01:00
18d333f53d Merge pull request #13573 from vrothberg/golangci-lint
bump golangci-lint to v1.45.0
2022-03-21 13:20:46 +01:00
e3cc0717b2 podman system df: fix percent calculation
The calculate the percentage we need floating point numbers. The current
code however casted the result of reclaimable/size to an int first.
Casting to an int in go will just discard the decimal points, thus the
result was either 0 or 1 so if multiplied by 100 it would show up as 0%
or 100%.

To fix this we have to multiply by 100 first before casting the result
to an int. Also add a check for div by zero which results in NaN and use
math.Round() to correctly round a number.

Ref #13516

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-21 13:19:31 +01:00
53e770566b pod system tests: clean up stray image
One of the pod tests was leaving a stray image behind,
causing scary red warnings in CI logs. Clean that up.

Also, now that #13541 has merged, use 'rmi --ignore' instead of
ignoring exit status from rmi

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-21 05:07:34 -06:00
026bd9b205 bump golangci-lint to v1.45.0
* supports Go 1.18
* disable a number of new linters
* fix minor stylecheck issues

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-21 10:42:53 +01:00
248dbf6089 Merge pull request #13541 from vrothberg/rmi-ignore
podman rmi --ignore
2022-03-21 10:34:40 +01:00
447e947aed Merge pull request #13572 from Kuldz/main
[CI:DOCS] Fix inconsistency in documentation
2022-03-21 09:46:40 +01:00
2460261fbf Fix documentation typo
Signed-off-by: Kuldar Kaasik <kaasikkuldar@gmail.com>
2022-03-21 09:17:10 +02:00
36ff8f2b38 Add Windows installer support for upgrades
Fixes duplicate installer entries after multiple installs

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-03-19 19:37:24 -05:00
978b188f7f Merge pull request #13562 from n1hility/misc-cleanup
Fix type-o and cleanup doc punctuation
2022-03-19 22:22:41 +01:00
0248ba4897 Merge pull request #13558 from Luap99/compose-flake
fix compose test flake
2022-03-19 11:26:40 +01:00