Commit graph

8404 commits

Author SHA1 Message Date
Chris Evich
79167a157f Cirrus: Rotate keys post repo. rename
Encode credentials at new repository settings page
https://cirrus-ci.com/settings/repository/6707778565701632

Ref: https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables

Backport-of: commit 576ce0f1b5
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-15 11:42:04 +02:00
OpenShift Merge Robot
373ba8c017
Merge pull request #6888 from mheon/bump_202
[CI:DOCS] Bump to v2.0.2
2020-07-07 20:48:17 +02:00
Matthew Heon
0f338dd991 Bump to v2.0.3-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-07-07 14:26:27 -04:00
Matthew Heon
201c9505b8
Bump to v2.0.2
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-07-07 14:25:29 -04:00
OpenShift Merge Robot
c3c03f9ca1
Merge pull request #6883 from vrothberg/2.0-events-race
[2.0] fix race condition in `libpod.GetEvents(...)`
2020-07-07 20:21:13 +02:00
OpenShift Merge Robot
442220e7a8
Merge pull request #6886 from mheon/final_202_relnotes
[CI:DOCS] Finalize release notes for Podman v2.0.2
2020-07-07 19:49:39 +02:00
Matthew Heon
2c8f73b4dd Finalize release notes for Podman v2.0.2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-07 13:16:30 -04:00
Valentin Rothberg
0bc40bdcf3 fix race condition in libpod.GetEvents(...)
Fix a race that could cause read errors to be masked.  Masking such
errors is likely to report red herrings since users don't see that
reading failed for some reasons but that a given event could not be
found.

Backport-of: commit f4a2d25c0f
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-07 17:29:14 +02:00
OpenShift Merge Robot
ea7a6101ef
Merge pull request #6873 from baude/v2.0disableconnection
remove podman system connection
2020-07-07 06:03:08 -04:00
OpenShift Merge Robot
6dae4bae2e
Merge pull request #6874 from mheon/backport_mount_fix
Backport 'podman mount' bugfix
2020-07-06 19:51:21 -04:00
Matthew Heon
8ab0abbb06 Fix bug where podman mount didn't error as rootless
We require that rootless `podman mount` be run inside a shell
spawned by `podman unshare` (which gives us a mount namespace
which actually lets other commands use the mounted filesystem).

The fix is simple - we need to mark the command as requiring the
rootless user namespace not be configured, so we can test for it
later as part of the mount code and error if we needed to make
one.

Disable rootless tests as part of this - they were never expected
to work.

Fixes #6856

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 16:59:05 -04:00
Brent Baude
66e1626282 remove podman system connection
podman system connection was panic'ing and not working as expected.  we are temporarily removing to as to not confuse users until we can fix it and prevent regressions with integrations tests.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-07-06 15:36:17 -05:00
OpenShift Merge Robot
e3e2b1e659
Merge pull request #6871 from mheon/202_backports
Backports for v2.0.2
2020-07-06 15:55:15 -04:00
OpenShift Merge Robot
b8ad7f241a
Merge pull request #6870 from rhatdan/v2.0
Pids-limit should only be set if the user set it
2020-07-06 15:52:25 -04:00
Matthew Heon
2fb9bb20df Fix imports to ensure v2 is used with libpod
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 14:44:40 -04:00
Matthew Heon
a67526d9f2 Update release notes for v2.0.2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 14:25:39 -04:00
Ralf Haferkamp
626aeffc55 specgen: fix order for setting rlimits
Also make sure that the limits we set for rootless are not higher than
what we'd set for root containers.

Rootless containers failed to start when the calling user already
had ulimit (e.g. on NOFILE) set.

This is basically a cherry-pick of 76f8efc0d0 into specgen

Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
2020-07-06 14:21:53 -04:00
Matthew Heon
0b7885b90a Ensure umask is set appropriately for 'system service'
We need a umask of 0022 to ensure containers are created
correctly, but we set a different one prior to starting the
server (to ensure the unix socket has the right permissions).
Thus, we need to set the umask after the socket has been bound,
but before the server begins accepting requests.

Fixes #6787

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 14:21:17 -04:00
Valentin Rothberg
8643526953 generate systemd: improve pod-flags filter
When generating systemd unit for pods, we need to remove certain
pod-related flags from the containers' create commands.  Make sure
to account for all the syntax including a single argument with key and
value being split by `=`.

Fixes: #6766
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 14:18:20 -04:00
Maximilian Müller
1444be3d53 Fix a bug with APIv2 compat network remove to log an ErrNetworkNotFound instead of nil
Signed-off-by: Maximilian Müller <maxm123@techie.com>
2020-07-06 14:16:39 -04:00
Jhon Honce
8dd26289bf Fixes --remote flag issues
* --remote, --url and --identity are now anchored to podman command.
  Subcommands should no longer have issues
* TraverseChildren now set to V1 expectations
* Latest flag now has helper function. Now has consistent usage.
* IsRemote() uses cobra parser to determin if --remote is given
* Moved validation functions from parser pkg to validate pkg
*

Fixes #6598
Fixes #6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>

<MH: Fixed import issues>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2020-07-06 14:14:53 -04:00
Daniel J Walsh
c4023a9302
Pids-limit should only be set if the user set it
Currently we are sending over pids-limits from the user even if they
never modified the defaults.  The pids limit should be set at the server
side unless modified by the user.

This issue has led to failures on systems that were running with cgroups V1.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 14:14:48 -04:00
Brent Baude
de6a8609a8 Set console mode for windows
Windows terminal handling is different than darwin and linux.  It needs to have the terminal mode set to enable virtual terminal processing.  This allows colors and other things to work.

Signed-off-by: Brent Baude <bbaude@redhat.com>

<MH: Tweaked imports to compile>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2020-07-06 13:41:39 -04:00
Matthew Heon
1c02d5ab89 Allow empty host port in --publish flag
I didn't believe that this was actually legal, but it looks like
it is. And, unlike our previous understanding (host port being
empty means just use container port), empty host port actually
carries the same meaning as `--expose` + `--publish-all` (that
is, assign a random host port to the given container port). This
requires a significant rework of our port handling code to handle
this new case. I don't foresee this being commonly used, so I
optimized having a fixed port number as fast path, which this
random assignment code running after the main port handling code
only if necessary.

Fixes #6806

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 13:37:27 -04:00
Matthew Heon
56c873c14e Add a note on the APIs supported by system service
This makes it clear that we target compatibility with a specific
Docker version (v1.40), but do not reject other versions. It also
adds a link to documentation on the Podman-specific API.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-07-06 13:36:59 -04:00
maybe-sybr
042675b9b3 fix: Don't override entrypoint if it's nil
This change ensures that we only override a container's entrypoint if it
is set to something other than `nil`.

Signed-off-by: Matt Brindley <58414429+maybe-sybr@users.noreply.github.com>
2020-07-06 13:36:00 -04:00
Daniel J Walsh
0c4a734353 Set TMPDIR to /var/tmp by default if not set
Containers/image will use TMPDIR for the location of pulled layer blobs.
If TMPDIR is not set, it will use /tmp.  Since this is known to be of
limited space on most systems, we change the default to /var/tmp
if the user has not told the tools where to store temporary files.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 13:35:33 -04:00
Valentin Rothberg
3405e4fb68 test: add tests for --user and volumes
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-06 13:31:28 -04:00
Giuseppe Scrivano
eb85f42907 container: move volume chown after spec generation
move the chown for newly created volumes after the spec generation so
the correct UID/GID are known.

Closes: https://github.com/containers/libpod/issues/5698

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-06 13:31:21 -04:00
Giuseppe Scrivano
f5b368400c libpod: volume copyup honors namespace mappings
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-06 13:31:13 -04:00
Matthew Heon
4995c511e5 Fix system service panic from early hangup in events
We weren't actually halting the goroutine that sent events, so it
would continue sending even when the channel closed (the most
notable cause being early hangup - e.g. Control-c on a curl
session). Use a context to cancel the events goroutine and stop
sending events.

Fixes #6805

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 13:14:31 -04:00
Brent Baude
637ff7b7e9 stop podman service in e2e tests
when running e2e tests, each test knows to stop its service when running remote; however, during setup and teardown remote services were not being killed when we were done with them.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-07-06 13:13:10 -04:00
Matthew Heon
06b5a8c2f7 Print errors from individual containers in pods
The infra/abi code for pods was written in a flawed way, assuming
that the map[string]error containing individual container errors
was only set when the global error for the pod function was nil;
that is not accurate, and we are actually *guaranteed* to set the
global error when any individual container errors. Thus, we'd
never actually include individual container errors, because the
infra code assumed that err being set meant everything failed and
no container operations were attempted.

We were originally setting the cause of the error to something
nonsensical ("container already exists"), so I made a new error
indicating that some containers in the pod failed. We can then
ignore that error when building the report on the pod operation
and actually return errors from individual containers.

Unfortunately, this exposed another weakness of the infra code,
which was discarding the container IDs. Errors from individual
containers are not guaranteed to identify which container they
came from, hence the use of map[string]error in the Pod API
functions. Rather than restructuring the structs we return from
pkg/infra, I just wrapped the returned errors with a message
including the ID of the container.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-06 13:10:13 -04:00
Valentin Rothberg
d59ef41194 auto-update: clarify systemd-unit requirements
Clarify in the help message and the man page that auto updates only work
with systemd units that are similar to the ones from `generate systemd
--new`.  Units that merely start/stop a container do not work as they
will use the same image.

Fixes: #6793
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 13:08:56 -04:00
Paul Holzinger
0e547a4cc3 podman ps truncate the command
With a long create command the
output from ps is basically unreadable.

This is a regression that was introduced with Podman 2.0.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-07-06 13:07:29 -04:00
OpenShift Merge Robot
1a60550bef
Merge pull request #6865 from vrothberg/2.0-v2-module
[2.0] move go module to v2
2020-07-06 11:20:41 -04:00
Valentin Rothberg
2d74811520 move go module to v2
With the advent of Podman 2.0.0 we crossed the magical barrier of go
modules. While we were able to continue importing all packages inside
of the project, the project could not be vendored anymore from the
outside.

Move the go module to new major version and change all imports to
github.com/containers/libpod/v2. The renaming of the imports
was done via gomove [1].

[1] https://github.com/KSubedi/gomove

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 15:52:17 +02:00
OpenShift Merge Robot
aa4ec20c0f
Merge pull request #6860 from rhatdan/v2.0
Vendor containers/common v0.14.4
2020-07-06 09:49:24 -04:00
Daniel J Walsh
5f9e7b5355
Vendor containers/common v0.14.4
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 06:49:21 -04:00
OpenShift Merge Robot
1ba8c23587
Merge pull request #6849 from TomSweeneyRedHat/dev/tsweeney/ib_v1.1.6_v2
Bump to imagebuilder v1.1.6 on v2 branch
2020-07-06 06:21:04 -04:00
TomSweeneyRedHat
d4a0337d02 Bump to imagebuilder v1.1.6 on v2 branch
As the title says.

Addresses: https://github.com/containers/buildah/issues/2424

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-07-02 15:27:54 -04:00
OpenShift Merge Robot
1e42970417
Merge pull request #6802 from lsm5/v2.0-registry-port-number
Account for non-default port number in image name (backported from master)
2020-06-29 04:43:19 -04:00
Lokesh Mandvekar
9eebfd40ae Account for non-default port number in image name
Previously, if an image was tagged with the format
$REGISTRY:$PORT/$REPO:$TAG,
then `podman images` would display $PORT/$REPO:$TAG under the "TAG"
field.

This commit correctly displays $REGISTRY:$PORT/$REPO under the
"REPOSITORY" field while the "TAG" field only displays $TAG.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Fixes: gh#6665
(cherry picked from commit 71f6dd47dd)
2020-06-27 14:05:00 -04:00
OpenShift Merge Robot
9f8472afc9
Merge pull request #6792 from baude/2.0swagger
[CI:DOCS]Add swagger.yaml to docs/
2020-06-26 11:24:26 -04:00
Brent Baude
00b1c4b6b3 [CI:DOCS]Add swagger.yaml to docs/
Adding the swagger.yaml to the docs directory so that we can version the read-the-docs API information. also, change the links to be relative in nature and point to the new swagger.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-26 09:58:14 -05:00
OpenShift Merge Robot
f9cb0dff1a
Merge pull request #6782 from mheon/bump_201
[CI:DOCS] Bump to v2.0.1
2020-06-25 17:37:13 -04:00
Matthew Heon
93303f11bc Bump to v2.0.2-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-06-25 17:13:21 -04:00
Matthew Heon
a11c4ead10
Bump to v2.0.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-06-25 17:12:43 -04:00
OpenShift Merge Robot
6a541f6802
Merge pull request #6780 from mheon/even_more_201_backports
Even more v2.0.1 backports
2020-06-25 17:05:26 -04:00
Matthew Heon
f7b16d0173 Update release notes with further v2.0.1 changes
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-06-25 15:48:57 -04:00