9762 Commits

Author SHA1 Message Date
0ac857fc0f Change http ConnState actions between new and active
Currently it double counts connections because it's incrementing the
total for both the new and active states. Based on the comments, we
should only count new connections for the total count and perform the
timer stop actions when the connection has transitioned to an active
state.

Closes #8208

Signed-off-by: Alex Schultz <aschultz@redhat.com>
2020-10-31 20:31:33 -06:00
2aaa036f56 Merge pull request #8197 from giuseppe/check-cgroupv2-swap-enabled
specgen, cgroup2: check whether memory swap is enabled
2020-10-31 11:40:07 +01:00
5a53c6e5c9 Merge pull request #8203 from Luap99/fix-8194
Fix dnsname when joining a different network namespace in a pod
2020-10-31 11:12:05 +01:00
b6ab2df9d1 Merge pull request #8100 from QiWang19/mirror-manifest
manifest list inspect single image
2020-10-31 00:19:52 +01:00
e5227b9d75 Merge pull request #8201 from QiWang19/search-limit
Remove search limit since pagination support
2020-10-30 20:34:28 +01:00
d475c99b5b Merge pull request #8202 from TomSweeneyRedHat/dev/tsweeney/buildahv1.17.0
Bump Buildah to v1.17.0
2020-10-30 20:27:53 +01:00
1fe79dd677 Merge pull request #8177 from rhatdan/wrap
Stop excessive wrapping of errors
2020-10-30 19:52:17 +01:00
3653e57a2a Merge pull request #8200 from haircommander/parse-segfault
spec: protect against segfault
2020-10-30 19:42:26 +01:00
4860223ce5 specgen, cgroup2: check whether memory swap is enabled
add a similar check to what we do on cgroup v1.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-30 19:35:14 +01:00
2704dfbb7a Fix dnsname when joining a different network namespace in a pod
When creating a container in a pod the podname was always set as
the dns entry. This is incorrect when the container is not part
of the pods network namespace. This happend both rootful and
rootless. To fix this check if we are part of the pods network
namespace and if not use the container name as dns entry.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-30 18:53:55 +01:00
acba9d5c01 Bump Buildah to v1.17.0
Bump Buildah to v1.17.0 on Master.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-10-30 13:33:08 -04:00
37b550c96a Merge pull request #8196 from giuseppe/specgen-swap-limit-err-message
specgen: fix error message
2020-10-30 18:22:47 +01:00
5eebe3dd3d Merge pull request #8191 from mheon/no_error_on_sigproxy_stopped
When container stops, drop sig-proxy errors to infos
2020-10-30 18:19:29 +01:00
7a68db33e1 Merge pull request #8127 from andylibrian/grab-systemd-mount-flags-from-the-host-7661
Improve setupSystemd, grab mount options from the host
2020-10-30 18:16:02 +01:00
e632f3f258 Merge pull request #8187 from jwhonce/wip/table
Restore --format table header support
2020-10-30 17:00:22 +01:00
6b5a94cf28 Merge pull request #8192 from rhatdan/shm
Pod's that share the IPC Namespace need to share /dev/shm
2020-10-30 16:54:00 +01:00
3db54bacaa Merge pull request #8199 from cevich/fix_missing_links
[CI:DOCS] Fix broken CI readme links
2020-10-30 16:50:45 +01:00
f794a4f03f Merge pull request #8188 from cevich/workaround_agent_stopped_responding
Cirrus: Workaround F32 BFQ Kernel bug
2020-10-30 16:32:50 +01:00
57650aa5f3 manifest list inspect single image
If the image name not a manifest list type, enable manifest inspect to return manifest of single image manifest type vnd.docker.distribution.manifest.v2+json.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:13:57 -04:00
cab33cfbf6 Remove search limit since pagination support
Remove the search limit check since the c/image v5.6.0 supports pagination and can give result over 100 entries.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:00:40 -04:00
3d70b60adc spec: protect against segfault
when the user passes in "/dev/null::w"

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-10-30 10:45:10 -04:00
611c0cb0e0 [CI:DOCS] Fix broken CI readme links
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-30 10:32:17 -04:00
6779c1cfc2 Improve setupSystemd, grab mount options from the host
fixes #7661

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-10-30 20:51:34 +07:00
22702b9d60 specgen: split cgroup v1 and cgroup v2 code
refactor function into two separate ones.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-30 14:46:43 +01:00
433fea303e specgen: fix error message
drop spurious comma.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-30 14:30:33 +01:00
ed9edf840a When container stops, drop sig-proxy errors to infos
The sig-proxy code is set up to error on failing to forward
signals to a container. This is reasonable in cases where the
container is running, but something strange went wrong - but when
the Kill fails because the container is stopped, we shouldn't
bother with aggressive Error logging since this is an expected
part of the container lifecycle - it stops, and then `podman run`
also stops, but there is a timing window in between where signals
will fail to be proxied, and we should not print angry errors
during that.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-30 09:23:47 -04:00
0ebee0ce8e Cirrus: Workaround F32 BFQ Kernel bug
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-30 09:15:56 -04:00
831d7fb0d7 Stop excessive wrapping of errors
Most of the builtin golang functions like os.Stat and
os.Open report errors including the file system object
path. We should not wrap these errors and put the file path
in a second time, causing stuttering of errors when they
get presented to the user.

This patch tries to cleanup a bunch of these errors.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-30 05:34:04 -04:00
916825b675 Pod's that share the IPC Namespace need to share /dev/shm
Containers that share IPC Namespaces share each others
/dev/shm, which means a private /dev/shm needs to be setup
for the infra container.

Added a system test and an e2e test to make sure the
/dev/shm is shared.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-30 05:21:34 -04:00
228396a99d Merge pull request #8174 from rhatdan/errors
Podman often reports OCI Runtime does not exist, even if it does
2020-10-29 22:21:17 +01:00
1ce5ece66f Merge pull request #8189 from mheon/further_fix_pull_flag
Fix the `--pull` flag to `podman build` to match Docker
2020-10-29 21:31:20 +01:00
c08e82aa25 Merge pull request #8186 from Luap99/fix-8184
Create the default root API address path
2020-10-29 19:31:24 +01:00
5180ec985d Fix the --pull flag to podman build to match Docker
The behavior should be as follows: Unset, pull if missing by
default, obey the `--pull-never` and `--pull-always` flags. Set
to false, pull never. Set to true, pull always.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-29 14:29:48 -04:00
222d8075ab Merge pull request #8085 from TomSweeneyRedHat/dev/tsweeney/fixpulls
Fix pull method selection
2020-10-29 19:06:51 +01:00
c8f0e1dab6 Merge pull request #8146 from vrothberg/image-mounts
new "image" mount type
2020-10-29 18:15:24 +01:00
d60a0ddcc1 Restore --format table header support
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-29 10:14:08 -07:00
e439aec4fa Merge pull request #8046 from cevich/simplify_environment
Cirrus: Simplify setting/passing env. vars.
2020-10-29 18:07:29 +01:00
6d72e7611e Merge pull request #8165 from edsantiago/move_from_dockerio
Move from docker.io
2020-10-29 18:00:33 +01:00
7485005206 Merge pull request #8178 from rhatdan/exists
NewFromLocal can return multiple images
2020-10-29 17:04:05 +01:00
12647ae33f Create the default root API address path
Fixes #8184

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-29 16:46:27 +01:00
b6aa9c1077 Merge pull request #8173 from giuseppe/improve-cannot-reexec-error
rootless: improve error message if cannot join namespaces
2020-10-29 16:15:30 +01:00
65a618886e new "image" mount type
Add a new "image" mount type to `--mount`.  The source of the mount is
the name or ID of an image.  The destination is the path inside the
container.  Image mounts further support an optional `rw,readwrite`
parameter which if set to "true" will yield the mount writable inside
the container.  Note that no changes are propagated to the image mount
on the host (which in any case is read only).

Mounts are overlay mounts.  To support read-only overlay mounts, vendor
a non-release version of Buildah.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-10-29 15:06:22 +01:00
3ba77a5618 Cirrus: Simplify setting/passing env. vars.
Test VMs by design are to be single-purpose, single-use, and
readily disposable.  Therefore it's unnecessary to overcomplicate
storage of runtime environment variables.  This commit makes these
points clear, and reorganizes all CI-related env. vars on the system
into a single location, `/etc/ci_environment`.  This file is then
automatically loaded, and variables exported, (by `lib.sh`) from
`runner.sh` prior to executing all forms of testing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-29 09:02:31 -04:00
fdd32604cf Merge pull request #8161 from afbjorklund/podman-remote-host-hash
Support hashed hostnames in the known_hosts file
2020-10-29 06:31:20 -04:00
0f191ad72c Podman often reports OCI Runtime does not exist, even if it does
When the OCI Runtime tries to set certain settings in cgroups
it can get the error "no such file or directory",  the wrapper
ends up reporting a bogus error like:

```
 Request Failed(Internal Server Error): open io.max: No such file or directory: OCI runtime command not found error
{"cause":"OCI runtime command not found error","message":"open io.max: No such file or directory: OCI runtime command not found error","response":500}
```

On first reading of this, you would think the OCI Runtime (crun or runc) were not found.  But the error is actually reporting

message":"open io.max: No such file or directory

Which is what we want the user to concentrate on.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-29 06:19:21 -04:00
cfc41b32fd rootless: improve error message if cannot join namespaces
if podman failed to join the rootless namespaces, give users a better
errror message and possible solution.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1891220

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-29 08:49:40 +01:00
cce6c6cd40 Merge pull request #8163 from giuseppe/clean-path
libpod: clean paths before check
2020-10-29 03:31:19 -04:00
464aa36b0c Merge pull request #8081 from mheon/pod_degraded
Add a Degraded state to pods
2020-10-28 16:10:33 -04:00
99d3e2e9d7 NewFromLocal can return multiple images
If you use additional stores and pull the same image into
writable stores, you can end up with the situation where
you have the same image twice. This causes image exists
to return the wrong error.  It should return true in this
situation rather then an error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-28 16:02:53 -04:00
6ad768852a libpod: clean paths before check
clean the paths before checking whether its value is different than
what is stored in the db.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-28 20:49:03 +01:00