12785 Commits

Author SHA1 Message Date
cc94914474 Merge pull request #11550 from atykhyy/patch-2
Fix #11444: remote breaks with stdout redirection
2021-09-13 14:02:53 -04:00
73422de08d Merge pull request #11548 from containers/dependabot/go_modules/github.com/containers/storage-1.36.0
Bump github.com/containers/storage from 1.35.0 to 1.36.0
2021-09-13 13:07:52 -04:00
125f90c54a Merge pull request #11537 from TomSweeneyRedHat/dev/tsweeney/fixhyphen
[CI:DOCS] Remove short 'a' option from all-tags
2021-09-13 11:33:51 -04:00
c23f81fab6 Fix #11444: remote breaks with stdout redirection
`setConsoleMode` should do nothing if the handle is not a terminal. The proposed change is [exactly what `golang.org/x/term/IsTerminal()` does on Windows](https://cs.opensource.google/go/x/term/+/6886f2df:term_windows.go).

[NO TESTS NEEDED]

Signed-off-by: Anton Tykhyy <atykhyy@gmail.com>
2021-09-13 17:42:48 +03:00
a8875faca1 [CI:DOCS] Remove short 'a' option from all-tags
The short option 'a' for the --all-tags option in the pull
page is not valid, remove it.

Addresses: #11536

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-09-13 09:27:57 -04:00
eec59cea2c Bump github.com/containers/storage from 1.35.0 to 1.36.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.35.0...v1.36.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 12:29:39 +00:00
0f3d3bd21d Merge pull request #11505 from cevich/enable_rootless_unit
Cirrus: Run unit-tests rootless
2021-09-12 06:40:36 -04:00
f785d8d194 Merge pull request #11517 from jwhonce/issues/10053
Refactor API server emphasis on logging
2021-09-12 02:07:36 -04:00
72662f790b Merge pull request #11525 from rhatdan/healthcheck
Stop outputting 'healthy' on healthcheck
2021-09-11 18:09:36 -04:00
ec3037062d Merge pull request #11513 from Luap99/unshare
podman unshare keep exit code
2021-09-11 17:26:35 -04:00
0501258b73 Merge pull request #11524 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.8.5
Bump github.com/opencontainers/selinux from 1.8.4 to 1.8.5
2021-09-11 04:56:18 -04:00
deaf969243 Refacter API server emphasis on logging
* To aid in debugging log API request and response bodies at trace
  level. Events can be correlated using the X-Reference-Id.
* Server now echos X-Reference-Id from client if set, otherwise
  generates an unique id.
* Move logic for X-Reference-Id into middleware
* Change uses of Header.Add() to Set() when setting Content-Type
* Log API operations in Apache format using gorilla middleware
* Port server code to use BaseContext and ConnContext

Fixes #10053

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-09-10 15:07:25 -07:00
5e9758fd5f Merge pull request #11323 from umohnani8/init
Add init containers to generate and play kube
2021-09-10 13:44:47 -04:00
4fbc5b8fe7 Stop outputting 'healthy' on healthcheck
We should only print unhealthy if the check fails.  Currently this is
filling logs when users are running lots of healthchecks.

Improves: https://github.com/containers/podman/issues/11157

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-10 11:20:01 -04:00
81751bebc6 Bump github.com/opencontainers/selinux from 1.8.4 to 1.8.5
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.8.4 to 1.8.5.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.8.4...v1.8.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-10 15:18:53 +00:00
e6046224ea Merge pull request #11498 from vrothberg/fix-11489
[CI:DOCS] podman machine: enforce a single search registry
2021-09-10 11:02:51 -04:00
923648b487 Merge pull request #11509 from containers/dependabot/go_modules/github.com/containers/psgo-1.6.0
Bump github.com/containers/psgo from 1.5.2 to 1.6.0
2021-09-10 11:00:51 -04:00
f3c0d707f0 Merge pull request #11519 from tnk4on/fix-missing-args-in-example
[CI:DOCS] Fix missing args `NAME` in examples
2021-09-10 10:59:49 -04:00
0b6c56b80d Merge pull request #11506 from giuseppe/fix-stats-restart-container
stats: detect container restart and allow paused containers
2021-09-10 10:53:47 -04:00
cf4a7b8d37 Merge pull request #11516 from jelly/swagger/containerstats
[CI:DOCS] Add response to /libpod/containers/stats documentation
2021-09-10 10:52:48 -04:00
f5e4ffb5e4 Add init containers to generate and play kube
Kubernetes has a concept of init containers that run and exit before
the regular containers in a pod are started. We added init containers
to podman pods as well. This patch adds support for generating init
containers in the kube yaml when a pod we are converting had init
containers. When playing a kube yaml, it detects an init container
and creates such a container in podman accordingly.
Note, only init containers created with the init type set to "always"
will be generated as the "once" option deletes the init container after
it has run and exited. Play kube will always creates init containers
with the "always" init container type.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-10 09:37:46 -04:00
d2e10a71d6 podman unshare keep exit code
In case the command inside the podman unshare env failed podman unshare
always exits with 125 and prints `Error: exit status 125`. This is a
bad user experience and makes it difficult to use in scripts which could
expect certain exit codes.
This commit makes sure podman unshare uses the same exit code as the
command and does not print the useless `exit status X` message.

Also to match podman run/exec it should return 126 for EPERM
and 127 for ENOENT.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-10 15:30:25 +02:00
309d989712 Bump github.com/containers/psgo from 1.5.2 to 1.6.0
Bumps [github.com/containers/psgo](https://github.com/containers/psgo) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/containers/psgo/releases)
- [Commits](https://github.com/containers/psgo/compare/v1.5.2...v1.6.0)

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

[NO TESTS NEEDED] since it's migrating to a new version.

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-10 15:23:43 +02:00
580ac4c6ab Merge pull request #11523 from Luap99/e2e-warning
try to create the runroot before we warn that it is not writable
2021-09-10 09:15:46 -04:00
f87f27ddc8 Add /containers/stats response to API docs
Include the response schema for a succesful request in the
/containers/stats API documentation

Additionally remove http 409 from /libpod/containers/stats docs, the
documentation was copied from the deprecated stats endpoint, when a
container is unavailabe the endpoint returns an empty list and no 409.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2021-09-10 15:15:35 +02:00
8d638d502b try to create the runroot before we warn that it is not writable
The rootless integration tests show the XDG_RUNTIME_DIR warning without
any reasons. Podman runs without problems in these and yet the warning
is shown. I think the problem is that we check the permission before we
create the runroot directory.

[NO TESTS NEEDED]

Fixes #11521

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-10 13:23:52 +02:00
5bf2201447 machine: set filemodes in octal
By popular request, turn decimals to octal.  Most eyes are trained to
parse file permissions in octal.

[NO TESTS NEEDED] since machine isn't tested yet.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-10 12:50:28 +02:00
6f36a47ac2 podman machine: enforce a single search registry
Enforce "docker.io" to be the only search registry.  Short-name
resolution for remote clients is not fully supported since there is no
means to prompt.  Enforcing a single registry  works around the problem
since prompting only fires with more than one search registry.

Fixes: #11489
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-10 12:43:07 +02:00
50688da29b stats: detect containers restart
if the current cpu usage time is lower than what previously recorded,
then it means the container was restarted and now it runs in a new
cgroup.  When this happens, reset the prevStats.

Closes: https://github.com/containers/podman/issues/11469

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-10 09:03:10 +02:00
2b85382ca1 api: correctly set the container stats
override the outer scope variable instead of creating a local one.
Otherwise the wrong variable would be used for the next iterations.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-10 09:03:09 +02:00
53dc99fa60 stats: allow to read stats for paused containers
paused containers still a cgroup we can use to grab the stats.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-10 09:03:08 +02:00
a4cc32c2c5 Fix missing args in name in example
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2021-09-10 15:50:02 +09:00
63f6656f8f Merge pull request #11426 from fj-tsubasa/system-test-scenario
Add a system test to modify and import an exported container
2021-09-09 16:11:22 -04:00
5aebae436f Merge pull request #11508 from containers/dependabot/go_modules/github.com/godbus/dbus/v5-5.0.5
Bump github.com/godbus/dbus/v5 from 5.0.4 to 5.0.5
2021-09-09 15:52:12 -04:00
536951c1d2 Merge pull request #11503 from Luap99/remote-attach
Fix conmon attach socket buffer size
2021-09-09 15:37:16 -04:00
5fdd0431b7 Cirrus: Run unit-tests rootless
Previously (for various reasons) the unittests were limited by the
Makefile to root-only.  However, experimentation via PR #11490
shows they will actually execute and pass when run as a regular user.
Enable this for only the latest Fedora VMs, so as to only add one new
task to the (already large) set.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-09 14:07:19 -04:00
4ccb4f81f7 Add a system test to modify and import an exported container.
This test has completed one of TODO items in test/system/TODO.md.
The item is "Implied pull, build, export, modify, import, tag, run, kill"

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2021-09-10 02:47:57 +09:00
c65b43a0fa Bump github.com/godbus/dbus/v5 from 5.0.4 to 5.0.5
Bumps [github.com/godbus/dbus/v5](https://github.com/godbus/dbus) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/godbus/dbus/releases)
- [Commits](https://github.com/godbus/dbus/compare/v5.0.4...v5.0.5)

---
updated-dependencies:
- dependency-name: github.com/godbus/dbus/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-09 16:16:56 +00:00
7cf22279d9 Fix conmon attach socket buffer size
The conmon buffer size is 8192, however the attach socket needs two extra
bytes. The first byte of each message will be the STREAM type. The last
byte is a null byte. So when we want to read 8192 message bytes we need
to read 8193 bytes since the first one is special.
check 1ef246896b/src/ctr_stdio.c (L101-L107)

This problem can be seen in podman-remote run/exec when it prints output
with 8192 or more bytes. The output will miss the 8192 byte.

Fixes #11496

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-09 17:57:42 +02:00
784e1ae137 Merge pull request #11502 from vrothberg/vendor-mpb
vendor mpb@v7.1.4
2021-09-09 11:55:19 -04:00
d477fe5cae Merge pull request #11447 from chenzhiwei/respect-config
fix play kube can't use infra_image in config file
2021-09-09 10:12:22 -04:00
e5468d404c test/e2e/search_test.go - relax tests
Some search tests were looking for an explicit amount of images to
match.  Since images are moving targets on these registries, make
sure to use lower bounds instead of exact matches.

Fixes CI which started to break when Red Hat images changed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-09 16:02:40 +02:00
7ee5b29b07 Merge pull request #11499 from flouthoc/inspect-tmpl-flush-writer
inspect: printTmpl must Flush writer
2021-09-09 09:08:17 -04:00
78c5a47fc9 vendor mpb@v7.1.4
Fixes a race condition leading to a deadlock.

Thanks to @mtrmac and @vbauerster for fixing the issue!

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-09 14:19:21 +02:00
23527374c4 Merge pull request #11492 from rhatdan/man
[CI:DOCS] Fix spacing on --userns options in docs
2021-09-09 08:15:15 -04:00
c6740e2063 Merge pull request #11488 from rhatdan/machine
Add 'Machine %q started' message when podman machine start successful
2021-09-09 08:14:16 -04:00
32eaf347e1 Merge pull request #11485 from Luap99/network-upgrade-test
podman upgrade tests for networking
2021-09-09 07:45:15 -04:00
6888b061d0 inspect: printTmpl must Flush writer
Flush should be called after the last call to Write to ensure that any data buffered in the Writer is written to output.
Any incomplete escape sequence at the end is considered complete for formatting purposes.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-09 16:37:24 +05:30
e73574aa7c Merge pull request #11430 from saschagrunert/normalize-key
Normalize auth key before calling `SetAuthentication`
2021-09-09 06:42:15 -04:00
4d9dcab0cf podman upgrade tests for networking
Test basic networking functionality in the upgrade tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-09 10:26:29 +02:00