Commit Graph

12209 Commits

Author SHA1 Message Date
OpenShift Merge Robot 5824f06d4b
Merge pull request #10599 from Luap99/remote-pull-cancel
remote pull: cancel pull when connection is closed
2021-06-08 17:29:00 +02:00
Valentin Rothberg 84b55eec27 logs: k8s-file: fix race
Fix a race in the k8s-file logs driver.  When "following" the logs,
Podman will print the container's logs until the end.  Previously,
Podman logged until the state transitioned into something non-running
which opened up a race with the container still running, possibly in
the "stopping" state.

To fix the race, log until we've seen the wait event for the specific
container.  In that case, conmon will have finished writing all logs to
the file, and Podman will read it until EOF.

Further tweak the integration tests for testing `logs -f` on a  running
container.  Previously, the test only checked for one of two lines
stating that there was a race.  Indeed the race was in using `run --rm`
where a log file may be removed before we could fully read it.

Fixes: #10596
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-08 16:14:13 +02:00
Jakub Guzik a5ad36c65e Fix image prune --filter cmd behavior
Image prune --filter is fully implemented in the api, http api
yet not connected with the cli execution. User trying to use
filters does not see the effect. This commit adds glue code to enable
possiblity of using --filter in prune in the cli execution.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-06-08 15:18:00 +02:00
dependabot[bot] 346c7fda69
Bump github.com/containers/buildah from 1.21.0 to 1.21.1
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/containers/buildah/releases)
- [Changelog](https://github.com/containers/buildah/blob/v1.21.1/CHANGELOG.md)
- [Commits](https://github.com/containers/buildah/compare/v1.21.0...v1.21.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-08 12:36:15 +00:00
Paul Holzinger c605482791 remote pull: cancel pull when connection is closed
If a client closes the http connection during image pull, the
service should cancel the pull operation.

[NO TESTS NEEDED] I have no idea how we could test this reliable.

Fixes: #7558

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-08 13:36:07 +02:00
Paul Holzinger 8378a9c4df Fix network prune api docs
The api doc used wrong response examples for both the compat and libpod
network prune endpoints. Change the doc so that it matches the actual
return values. Also fix the endpoints to return an empty array instead
of null when no networks are removed.

[NO TESTS NEEDED]

Fixes: #10564

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-08 11:38:26 +02:00
OpenShift Merge Robot 9a3a7327fd
Merge pull request #10592 from edsantiago/bats
auto-update tests: various fixes
2021-06-08 09:31:26 +02:00
OpenShift Merge Robot 74a0dc7d85
Merge pull request #10591 from mheon/fix_10569
Fix compat create with NetworkMode=default
2021-06-08 09:30:26 +02:00
Ed Santiago 5e7876089f auto-update tests: various fixes
Followup to #9740. Nice work, but the _confirm_update() helper
was dangerously broken and I just wasn't able to communicate
that. Given the time zone difference, and my weekly time cost
in reviewing, it's easier for me to fix it myself. (The problem
is that the function was a complete NOP, which would lead to
flakes).

Also: got rid of some clutter, restructured a few minor places
for maintainability.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-06-07 18:37:51 -06:00
OpenShift Merge Robot df3b6da12c
Merge pull request #10565 from baude/macdocs
[CI:DOCS]instructions for podman machine on macs
2021-06-07 23:35:25 +02:00
Brent Baude f6d9dbb625 [CI:DOCS]instructions for podman machine on macs
first pass for instructions on using podman machine on Intel and M1
macs.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-06-07 16:17:13 -05:00
OpenShift Merge Robot d03963380a
Merge pull request #10586 from lsm5/bump-mainline-version
Version bump: 3.3.0-dev
2021-06-07 21:15:52 +02:00
OpenShift Merge Robot 4f81bc2bc8
Merge pull request #10526 from Procyhon/31052021_manpage
[CI:DOCS] UPDATE MANPAGE_SYNTAX (commit,attach,auto-update)
2021-06-07 21:09:51 +02:00
OpenShift Merge Robot 763abaea36
Merge pull request #9740 from ypu/auto-update
System test: Add tests for podman auto-update
2021-06-07 20:40:50 +02:00
Matthew Heon 260192670f Fix compat create with NetworkMode=default
The rework of namespace handling for rootless CNI broke this, as
CNI networks were being computed incorrectly. Fix handling of
CNI networks for the Compat Create REST API for containers, and
add a test so we don't regress again.

Fixes #10569

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-07 14:14:57 -04:00
Yiqiao Pu 17193e4689 System test: Add podman auto-update related test cases
Add some cases for podman auto-update:
1. Test with different value for label io.containers.autoupdate
2. Run podman auto-update as systemd timer

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2021-06-08 00:25:42 +08:00
Lokesh Mandvekar a2b842df4a Version bump: 3.3.0-dev
Keep master branch version ahead of that on any other branch.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-06-07 10:36:13 -04:00
OpenShift Merge Robot 448b582909
Merge pull request #10381 from adrianreber/2021-05-18-publish
Add --publish to container restore
2021-06-07 15:14:44 +02:00
OpenShift Merge Robot eaf53b6bb8
Merge pull request #10557 from vrothberg/fix-5572
systemd/generate: change type to notify
2021-06-07 12:17:41 +02:00
OpenShift Merge Robot aca6ef01d8
Merge pull request #10567 from adrianreber/2021-06-04-compress
Add support for selectable checkpoint archive compression algorithm
2021-06-07 11:09:43 +02:00
Adrian Reber 949374e589
Added tests for different checkpoint archive compressions
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-07 08:07:15 +02:00
Adrian Reber 68070f1b2a
Add --compress to podman-container-checkpoint.1.md
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-07 08:07:15 +02:00
Adrian Reber 8aa5340ade
Add parameter to specify checkpoint archive compression
The checkpoint archive compression was hardcoded to `archive.Gzip`.

There have been requests to make the used compression algorithm
selectable. There was especially the request to not compress the
checkpoint archive to be able to create faster checkpoints when not
compressing it.

This also changes the default from `gzip` to `zstd`. This change should
not break anything as the restore code path automatically handles
whatever compression the user provides during restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-07 08:07:15 +02:00
Adrian Reber 10875a67e4
Order checkpoint options in man page alphabetically
This just reorders the options in the podman-container-checkpoint man
page alphabetically. No actual content changed.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-07 08:07:14 +02:00
OpenShift Merge Robot 5a209b3d76
Merge pull request #10561 from vrothberg/fix-remote-events-label
remote events: support labels
2021-06-07 00:05:42 +02:00
OpenShift Merge Robot 9e069cf7d9
Merge pull request #10568 from jwhonce/issues/10562
[CI:DOCS] Document which CNI fields are encoded
2021-06-06 22:45:41 +02:00
OpenShift Merge Robot 45fdd8f5c5
Merge pull request #10574 from rogercoll/fix-bindings-docs
[CI:DOCS] Fix outdated docs
2021-06-06 22:44:42 +02:00
OpenShift Merge Robot 31e2b3501a
Merge pull request #10500 from gigatexal/expand-podman-remote-docs-add-key-help
[CI:DOCS] extend docs to include help for when pub/priv key is signing issue
2021-06-06 20:59:41 +02:00
Alexander Richter ab7e7f651e UPDATE MANPAGE_SYNTAX (commit,attach,auto-update)
Updated version for the MANPAGE_SYNTAX and adaption of the syntax for
the manpages of podman-commit, podman-attach, and podman-auto-update.

Signed-off-by: Alexander Richter <67486332+Procyhon@users.noreply.github.com>
2021-06-06 12:32:05 +02:00
Roger Coll 13a807b860 fix go-bindings examples with v3 new parameters
Signed-off-by: Roger Coll <rogercoll@protonmail.com>
2021-06-05 22:21:43 +02:00
OpenShift Merge Robot 1e006a58cc
Merge pull request #10549 from Luap99/fix-9859
remote: always send resize before the container starts
2021-06-05 16:45:20 +02:00
Jhon Honce 8f89bc4e07 [CI:DOCS] Document which CNI fields are encoded
The CNI configuration fields named Bytes are typed
[]byte which the GO JSON encoded automatically Base64 encodes.

Note: Future major versions of Podman will refactor the networking
endpoints to encapsulate/abstract the CNI structures which will
allow better documenation and encoding.

Fixes #10562

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-06-04 10:59:32 -07:00
OpenShift Merge Robot cdf26a3d56
Merge pull request #10546 from boaz0/closes_8645
Add CORS support
2021-06-04 18:13:21 +02:00
OpenShift Merge Robot c361a3886e
Merge pull request #10563 from Luap99/fix-10494
[CI:DOCS] fix incorrect network remove api doc
2021-06-04 18:06:22 +02:00
Paul Holzinger 1f73374acd remote: always send resize before the container starts
There is race condition in the remote client attach logic. Because the
resize api call was handled in an extra goroutine the container was
started before the resize call happend. To fix this we have to call
resize in the same goroutine as attach. When the first resize is done
start a goroutine to listen on SIGWINCH in the background and resize
again if the signal is received.

Fixes #9859

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-04 16:55:48 +02:00
Valentin Rothberg 9c50485440 remote events: support labels
Certain event meta data was lost when converting the remote events to
libpod events and vice versa.  Enable the skipped system tests for
remote.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-04 16:14:09 +02:00
cdoern ce01b4f095 made requested changes, fixed api tests
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-04 09:50:42 -04:00
Boaz Shuster 2810c478a7 Add CORS support
[NO TESTS NEEDED]

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-06-04 16:14:52 +03:00
OpenShift Merge Robot b8dbc11594
Merge pull request #10558 from vrothberg/fix-10529
remote events: fix --stream=false
2021-06-04 14:55:53 +02:00
Paul Holzinger df7c3a7039 [CI:DOCS] fix incorrect network remove api doc
The endpoint returns an array and not a single entry.

Fixes #10494

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-04 14:22:52 +02:00
Adrian Reber e23c5b25f1
Add restore --publish to the man page
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-04 13:29:02 +02:00
Adrian Reber 837ba7ec37
Add test for restore --publish
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-04 13:29:02 +02:00
Adrian Reber 1ac9198d75
Allow changing of port forward rules on restore
Restored containers, until now, had the same port mappings as the
original started container. This commit adds the parameter '--publish'
to 'podman container restore' with the same semantic as during
create/run.

With this change it is possible to create a copy from a container with a
'--publish' rule and replace the original '--publish' setting with a new
one.

 # podman run -p 2345:8080 container
 # podman container checkpoint -l --export=dump.tar
 # podman container restore -p 5432:8080 --import=dump.tar

The restored container will now listen on localhost:5432 instead of
localhost:2345 as the original created container.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-04 13:29:02 +02:00
Valentin Rothberg 86610c7852 remote events: fix --stream=false
Fix a bug in remote events where only one event would be sent if when
streaming is turned off.  The source of the bug was that the handler
attempted to implement the streaming logic and did it wrong.  The fix is
rather simple by removing this logic from the handler and let the events
backend handle streaming.

Fixes: #10529
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-04 12:51:43 +02:00
Valentin Rothberg 9ac5267598 systemd/generate: change type to notify
Change the type of units generated with --new from "forking" to
"notify".  This brings Podman closer to systemd and opens up
Podman to a number of use cases (see #5572).

Units generated without --new remain with `type=forking`.  I
experimented a bit with adding a `--sdnotify` flag to `podman start` but
it doesn't really work well since we're competing with the default
sdnotify mode set during container creation.

Fixes: #5572
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-04 10:17:25 +02:00
OpenShift Merge Robot f7233a2da7
Merge pull request #10553 from mheon/bump_master_320
[CI:DOCS] Update main branch to reflect 3.2.0 release
2021-06-03 22:58:47 +02:00
Matthew Heon 346c082252 Update main branch to reflect 3.2.0 release
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-03 16:12:00 -04:00
alex narayan b928278e63 extend docs to include help for when pub/priv key is signed with an unsupported algo
Signed-off-by: alex narayan <alexandar.narayan@deliveryhero.com>
2021-06-03 18:40:31 +02:00
OpenShift Merge Robot a53251e1c6
Merge pull request #10533 from rhatdan/docs
[CI:DOCS] Fix spacing in buildthedocs
2021-06-03 18:01:22 +02:00
OpenShift Merge Robot cbcf0a1dd7
Merge pull request #10545 from containers/dependabot/go_modules/go.etcd.io/bbolt-1.3.6
Bump go.etcd.io/bbolt from 1.3.5 to 1.3.6
2021-06-03 17:58:24 +02:00