Commit Graph

9163 Commits

Author SHA1 Message Date
Jhon Honce 146c68f3ac Refactor API build endpoint to be more compliant
* Refactor/Rename channel.WriteCloser() to encapsulate the channel
* Refactor build endpoint to "live" stream buildah output channels
  over API rather then buffering output
* Refactor bindings/tunnel build because endpoint changes
  * building tar file now in bindings rather then depending on
    caller
* Cleanup initiating extra image engine
* Remove setting fields to zero values (less noise in code)
* Update tests to support remote builds

Fixes #7136
Fixes #7137

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-14 13:46:59 -07:00
OpenShift Merge Robot fd7cdb2502
Merge pull request #7611 from rhatdan/completions
Fix completions for namespaces
2020-09-14 04:37:09 -04:00
OpenShift Merge Robot b7a7cf6576
Merge pull request #7614 from mheon/bump-2.1.0-rc1
[CI:DOCS] Bump to v2.1.0-RC1
2020-09-14 03:48:42 -04:00
OpenShift Merge Robot b7936b552f
Merge pull request #7616 from EduardoVega/5845-support-for-systemd-resolved
Determine if resolv.conf points to systemd-resolved
2020-09-14 03:45:20 -04:00
OpenShift Merge Robot 3f5f99b883
Merge pull request #7619 from rhatdan/pulltype
pull types allow initial caps
2020-09-13 17:08:44 -04:00
Daniel J Walsh 81f99c3ecd
pull types allow initial caps
validate pulltype will allow initial caps form cli or yaml file passed to i
play kube.

Use code related with pullpolicy from containers/common.

Signed-off-by: Qi Wang <qiwan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-12 07:02:04 -04:00
Eduardo Vega 6a1233597a Determine if resolv.conf points to systemd-resolved
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2020-09-11 23:31:07 -06:00
Matthew Heon 0b98ff89b7 Bump to v2.1.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-11 17:57:17 -04:00
Matthew Heon b4717de7bc Bump to v2.1.0-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-11 17:57:14 -04:00
OpenShift Merge Robot 25fb0c2b96
Merge pull request #7612 from mheon/release_notes_210_rc1
[CI:DOCS] Add release notes for Podman v2.1.0-RC1
2020-09-11 17:51:02 -04:00
Matthew Heon c76ff04b0f Add release notes for Podman v2.1.0-RC1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-11 16:55:42 -04:00
Daniel J Walsh 9c8bc47d8d
Fix completions for namespaces
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1873650

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 15:57:21 -04:00
OpenShift Merge Robot 834c41da7d
Merge pull request #7609 from rhatdan/VENDOR
Vendor in containers/buildah 1.16.1
2020-09-11 15:36:33 -04:00
Daniel J Walsh 08cc87636e
Vendor in containers/buildah 1.16.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 13:37:37 -04:00
OpenShift Merge Robot 4f040070b6
Merge pull request #7605 from rhatdan/VENDOR
Vendor in containers/common v0.22.0
2020-09-11 12:10:39 -04:00
OpenShift Merge Robot 71787765f5
Merge pull request #7604 from vrothberg/fix-7406
system df: fix image-size calculations
2020-09-11 11:33:34 -04:00
OpenShift Merge Robot d7db1da789
Merge pull request #7600 from rhatdan/codespell
Fix up errors found by codespell
2020-09-11 11:30:05 -04:00
OpenShift Merge Robot 881f2dfe92
Merge pull request #7403 from QiWang19/runtime-flag
Add global options --runtime-flags
2020-09-11 11:00:11 -04:00
OpenShift Merge Robot d8a0db2e0b
Merge pull request #7589 from rhatdan/rootfs
[CI:DOCS] Document --read-only --rootfs requirements
2020-09-11 10:37:15 -04:00
OpenShift Merge Robot 37658c0976
Merge pull request #7601 from vrothberg/add-ed
add @edsantiago to OWNERS file
2020-09-11 09:59:50 -04:00
Daniel J Walsh cd2b2d9fae
Vendor in containers/common v0.22.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 09:52:19 -04:00
OpenShift Merge Robot 8f0a53c974
Merge pull request #7561 from vrothberg/fix-7340
remote run: fix error checks
2020-09-11 09:36:53 -04:00
Valentin Rothberg f867d27ae0 system df: fix image-size calculations
Fix the image-size calculations of system-df, where the shared size is
the actual shared size with other images (including children) and the
(total) size is the sum of the shared and unique size [1].

To calculate parent/child relations, make use of the recently added
layer tree which allows for quick (and cached!) calculations.

Break calculating image disk usages into the image runtime to a) access
the layer tree, and b) make the code easier to maintain and extend.

[1] https://docs.docker.com/engine/reference/commandline/system_df/

Fixes: #7406
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-11 14:48:56 +02:00
Valentin Rothberg 7f43624729 add @edsantiago to OWNERS file
I keep forgetting to /approve PRs as Ed really doesn't need an explicit
approval.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-11 12:56:02 +02:00
Valentin Rothberg 5e14d0baf9 sort OWNERS file
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-11 12:55:46 +02:00
Valentin Rothberg 204493173e remote run: fix error checks
As error types are not preserved on the client side (due to marshaling),
we cannot use `errors.Cause(...)` and friends but, unfortunately, have
to fall back to looking for substring the error messages.

Change the error checks in remote run to do substring matches and fix
issue #7340.

Fixes: #7340
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-11 12:41:15 +02:00
Daniel J Walsh 526f01cdf5
Fix up errors found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 06:14:25 -04:00
OpenShift Merge Robot 397de44d48
Merge pull request #7592 from mheon/force_attach_winch
Force Attach() to send a SIGWINCH and redraw
2020-09-11 05:59:54 -04:00
Daniel J Walsh 408615b889
Document --read-only --rootfs requirements
Add entry to troubleshooting to document how to setup a read-only rootfs to
use with Podman.

Fixes: https://github.com/containers/podman/issues/5895

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 05:59:15 -04:00
OpenShift Merge Robot d1798d0383
Merge pull request #7591 from haircommander/play-kube-process-namespace
play/generate: support shareProcessNamespace
2020-09-11 05:56:35 -04:00
OpenShift Merge Robot e59c3ce1c5
Merge pull request #7593 from edsantiago/network_test_cleanup
run_networking e2e test: add cleanup to some tests
2020-09-11 05:53:19 -04:00
OpenShift Merge Robot 2a637948e7
Merge pull request #7587 from ParkerVR/kube-underscores
Allowed underscores to remain in name for YAML (Kube generate)
2020-09-11 05:36:49 -04:00
OpenShift Merge Robot 26fb8d2cde
Merge pull request #7586 from ashley-cui/rokube
Add read-only volume mount to play kube
2020-09-11 05:32:42 -04:00
OpenShift Merge Robot 2bdb177b55
Merge pull request #7584 from QiWang19/login-doc
[CI:DOCS] Add auth.json(5) link to login/logout docs
2020-09-11 05:29:27 -04:00
OpenShift Merge Robot 10ba232b34
Merge pull request #7590 from edsantiago/bats
system tests: cleanup
2020-09-10 18:58:42 -04:00
Matthew Heon 4c155d36cb Force Attach() to send a SIGWINCH and redraw
Basically, we want to force the application in the container to
(iff the container was made with a terminal) redraw said terminal
immediately after an attach completes, so the fresh Attach
session will be able to see what's going on (e.g. will have a
shell prompt). Our current attach functions are unfortunately
geared more towards `podman run` than `podman attach` and will
start forwarding resize events *immediately* instead of waiting
until the attach session is alive (much safer for short-lived
`podman run` sessions, but broken for the `podman attach` case).
To avoid a major rewrite, let's just manually send a SIGWINCH
after attach succeeds to force a redraw.

Fixes #6253

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-09-10 17:54:47 -04:00
Ed Santiago 6874038e6a run_networking e2e test: add cleanup to some tests
Problem: if either of the two "podman network create" tests
fail, all subsequent retries will also fail because the
created network has not been cleaned up (so "network create"
will fail with EEXIST).

Solution: run "podman network rm" as deferred cleanup instead
of in each test.

This is NOT a fix for #7583 - it is just a way to allow
ginkgo to retry a failing test.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-10 15:27:50 -06:00
Peter Hunt b80b95eea0 play/generate: support shareProcessNamespace
this is an option that allows a user to specify whether to share PID namespace in the pod
for play kube and generate kube

associated test added

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-09-10 17:22:55 -04:00
OpenShift Merge Robot 861451a462
Merge pull request #7541 from mheon/modify_group
Make an entry in /etc/group when we modify /etc/passwd
2020-09-10 17:05:02 -04:00
Ed Santiago 1cb7bdc8a0 system tests: cleanup
- run tests: better "skip" message for docker-archive test;
  remove FIXME, document that podman-remote doesn't support it

- run tests: instrument the --conmon-pidfile test in hopes
  of tracking down flake #7580: cross-check pidfile against
  output of 'podman inspect', and add some debug messages
  that will only be seen on test failure.

- load tests: the pipe test: save and load a temporary tag,
  not $IMAGE. Primary reason is because of #7371, in which
  'podman load' assigns a new image ID (instead of preserving
  the saved one). This messes with our image management, and
  it turns out to be nonfixable.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-10 14:29:08 -06:00
OpenShift Merge Robot 96bc5eb4b7
Merge pull request #7577 from rhatdan/runlabel1
podman container runlabel should pull the image if it does not exist
2020-09-10 15:50:10 -04:00
Parker Van Roy aaf18e0cbe allowed underscores to remain in name for YAML
Signed-off-by: Parker Van Roy <pvanroy@redhat.com>
2020-09-10 15:27:11 -04:00
OpenShift Merge Robot 41bd5e298a
Merge pull request #7578 from giuseppe/join-userns-reuse-mappings
libpod: read mappings when joining a container userns
2020-09-10 15:16:51 -04:00
Ashley Cui 20f73b857f Add read-only mount to play kube
add support for read-only volume mounts in podman play kube

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-09-10 15:13:22 -04:00
Qi Wang 8467cd3d2e Add auth.json(5) link to login/logout docs
Add auth.json(5) link to login/logout docs. Provide more details about the usage of auth.json by podman-login.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-10 14:50:19 -04:00
OpenShift Merge Robot 89a348346d
Merge pull request #7582 from rhatdan/VENDOR
vendor containers/storage v1.23.5
2020-09-10 14:04:16 -04:00
OpenShift Merge Robot 2f0e803e76
Merge pull request #7460 from AkihiroSuda/allow-rootless-cni
rootless: support `podman network create` (CNI-in-slirp4netns)
2020-09-10 14:00:49 -04:00
Giuseppe Scrivano 686f6eccee
libpod: read mappings when joining a container userns
when joining an existing container user namespace, read the existing
mappings so the storage can be created with the correct ownership.

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

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2020-09-10 19:17:01 +02:00
OpenShift Merge Robot 8d78605929
Merge pull request #7574 from vrothberg/fix-7117
remote run: consult events for exit code
2020-09-10 13:10:48 -04:00
Matthew Heon f57c39fc7c Make an entry in /etc/group when we modify /etc/passwd
To ensure that the user running in the container ahs a valid
entry in /etc/passwd so lookup functions for the current user
will not error, Podman previously began adding entries to the
passwd file. We did not, however, add entries to the group file,
and this created problems - our passwd entries included the group
the user is in, but said group might not exist. The solution is
to mirror our logic for /etc/passwd modifications to also edit
/etc/group in the container.

Unfortunately, this is not a catch-all solution. Our logic here
is only advanced enough to *add* to the group file - so if the
group already exists but we add a user not a part of it, we will
not modify that existing entry, and things remain inconsistent.
We can look into adding this later if we absolutely need to, but
it would involve adding significant complexity to this already
massively complicated function.

While we're here, address an edge case where Podman could add a
user or group whose UID overlapped with an existing user or
group.

Also, let's make users able to log into users we added. Instead
of generating user entries with an 'x' in the password field,
indicating they have an entry in /etc/shadow, generate a '*'
indicating the user has no password but can be logged into by
other means e.g. ssh key, su.

Fixes #7503
Fixes #7389
Fixes #7499

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-09-10 13:02:31 -04:00