12572 Commits

Author SHA1 Message Date
b644e37abc Merge pull request #11296 from vrothberg/memory-profile
add flag to record memory profiles
2021-08-21 08:13:36 -04:00
c53e351d0e Merge pull request #11292 from containers/dependabot/go_modules/k8s.io/apimachinery-0.22.1
Bump k8s.io/apimachinery from 0.22.0 to 0.22.1
2021-08-21 08:08:37 -04:00
2d43e685c3 Merge pull request #11286 from jwhonce/issues/11227
Update /version endpoint to add components
2021-08-20 10:55:00 -04:00
33fee83dea add flag to record memory profiles
Add a new flag `--memory-profile=$path` which creates a memory profile.
The generated profile can later be analyzed via `go tool pprof`.

[NO TESTS NEEDED] since it's a hidden flag, devs-only.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-20 15:35:58 +02:00
81798e4883 Merge pull request #11289 from Luap99/net-alias-id
Fix network aliases with network id
2021-08-20 09:18:02 -04:00
db7eaa98b2 Bump k8s.io/apimachinery from 0.22.0 to 0.22.1
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.22.0...v0.22.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-20 12:26:41 +00:00
7d8650cce8 Merge pull request #11246 from vrothberg/sdnotify=container
Implement SD-NOTIFY proxy in conmon
2021-08-20 07:10:34 -04:00
c22f3e8b4e Implement SD-NOTIFY proxy in conmon
This leverages conmon's ability to proxy the SD-NOTIFY socket.
This prevents locking caused by OCI runtime blocking, waiting for
SD-NOTIFY messages, and instead passes the messages directly up
to the host.

NOTE: Also re-enable the auto-update tests which has been disabled due
to flakiness.  With this change, Podman properly integrates into
systemd.

Fixes: #7316
Signed-off-by: Joseph Gooch <mrwizard@dok.org>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-20 11:12:05 +02:00
7f3f792e28 Fix network aliases with network id
When a network id is used to create a container we translate it to use the
name internally for the db. The network aliases are also stored with the
network name as key so we have to also translate them for the db.

Also removed some outdated skips from the e2e tests.

Fixes #11285

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-20 10:49:33 +02:00
30b036c5d3 Merge pull request #11280 from Luap99/info-plugins
Podman info output plugin information
2021-08-19 17:28:22 -04:00
fd32c73e3a Update /version endpoint to add components
* Include OCI and conmon information as components

Fixes #11227

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-19 14:19:45 -07:00
f988cfe146 Merge pull request #11279 from guillaumerose/refactor1
machine: compute sha256 as we are reading the file
2021-08-19 14:50:26 -04:00
a3f4fbd176 Merge pull request #11271 from jwhonce/issues/8577
Clean up swagger
2021-08-19 14:49:22 -04:00
16dfce486b Podman info output plugin information
For docker compat include information about available volume, log and
network drivers which should be listed under the plugins key.

Fixes #11265

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-19 17:33:20 +02:00
aed232b9dd Merge pull request #11275 from containers/dependabot/go_modules/github.com/containers/image/v5-5.15.2
Bump github.com/containers/image/v5 from 5.15.1 to 5.15.2
2021-08-19 11:11:50 -04:00
0897946f60 [NO TESTS NEEDED] Clean up swagger
* Removed defined by unused responses
* Added missing body definitions
* Updated header input definitions

Outstanding issues:
* Supporting body ContainerConfig for /commit endpoint

Fixes #8577

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-19 07:57:54 -07:00
b19812b5a2 machine: compute sha256 as we read the image file
It avoids to have the full file in memory.

[NO TESTS NEEDED]

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2021-08-19 16:54:50 +02:00
0434571920 machine: check for file exists instead of listing directory
[NO TESTS NEEDED]

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2021-08-19 16:54:44 +02:00
82bb999e36 Bump github.com/containers/image/v5 from 5.15.1 to 5.15.2
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.15.1 to 5.15.2.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.15.1...v5.15.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-19 12:28:10 +00:00
23804d95f6 Merge pull request #11242 from containers/dependabot/go_modules/github.com/containers/image/v5-5.15.1
Bump github.com/containers/image/v5 from 5.15.0 to 5.15.1
2021-08-19 06:42:11 -04:00
2cb304d25f Merge pull request #11249 from afro-coder/troubleshooting-update
[CI:DOCS] Updated Troubleshooting.md Closes #5431
2021-08-19 06:13:52 -04:00
8b848740cf Merge pull request #11260 from nalind/remote-build-path
pkg/bindings/images.nTar(): slashify hdr.Name values
2021-08-19 05:57:02 -04:00
7a0d94837a Merge pull request #11269 from Luap99/rootlessport-flake
fix rootlessport flake
2021-08-18 19:54:09 -04:00
2f9bd63c9d Merge pull request #11267 from mheon/fix_11214
Volumes: Only remove from DB if plugin removal succeeds
2021-08-18 19:45:10 -04:00
92fcf91533 Merge pull request #11258 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.14.5
Bump github.com/rootless-containers/rootlesskit from 0.14.4 to 0.14.5
2021-08-18 16:47:53 -04:00
2d0a0c0d29 fix rootlessport flake
When the rootlessport process is started the stdout/stderr are attached
to the podman process. However once everything is setup podman exits and
when the rootlessport process tries to write to stdout it will fail with
SIGPIPE. The code handles this signal and puts /dev/null to stdout and
stderr but this is not robust. I do not understand the exact cause but
sometimes the process is still killed by SIGPIPE. Either go lost the
signal or the process got already killed before the goroutine could
handle it.

Instead of handling SIGPIPE just set /dev/null to stdout and stderr
before podman exits. With this there should be no race and no way to
run into SIGPIPE errors.

[NO TESTS NEEDED]

Fixes #11248

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-18 21:21:47 +02:00
fa206e11ca Merge pull request #11180 from baude/buildplaykube
Add ability to build images in play kube
2021-08-18 15:06:19 -04:00
4ec2270790 Merge pull request #10829 from cevich/update_images
Update images
2021-08-18 14:41:15 -04:00
592fae4225 Volumes: Only remove from DB if plugin removal succeeds
Originally, Podman would unconditionally remove volumes from the
DB, even if they failed to be removed from the volume plugin;
this was a safety measure to ensure that `volume rm` can always
remove a volume from the database, even if the plugin is
misbehaving.

However, this is a significant deivation from Docker, which
refuses to remove if the plugin errors. These errors can be
legitimate configuration issues which the user should address
before the volume is removed, so Podman should also use this
behaviour.

Fixes #11214

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-08-18 14:19:11 -04:00
9dd088e555 Cirrus: Confirm CGv1 / CGv2 VM expectations
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-18 12:04:07 -04:00
5c837fe5b0 Skip stats test in CGv1 container environments
These tests were originally enabled in a situation where CI provided
false-positive results.  Now that has been corrected, these tests all
fail under a CGv1 container environment with the error:

```
Error: unable to load cgroup at
/machine.slice/libpod-e4f...086.scope/libpod_parent/libpod-fbd...425:
cgroup deleted
```

This commit simply disables the tests under this specific environment.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-18 12:04:06 -04:00
dc70382886 Fix AVC denials in tests of volume mounts
This becomes a problem on hosts with upgraded policies.  Ref:
https://github.com/containers/podman/issues/10522

Also, made a small change to compose-test setup to reduce runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-18 12:04:06 -04:00
77f665200b Restore buildah-bud test requiring new images
Ref:
https://github.com/containers/podman/pull/10829#issuecomment-881355983

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-18 12:04:06 -04:00
14f3658dad Revert ".cirrus.yml: use fresh images for all VMs"
This reverts commit 404d5edb1557e3d2cb255d38bd89274586c4c100.

The replacement (updated) images include a fix for:
https://github.com/containers/common/issues/631

Also minor update to an unrelated FIXME comment.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-18 12:04:04 -04:00
aeffdb05d1 pkg/bindings/images.nTar(): slashify hdr.Name values
When setting path names in the build context archive, convert path names
to use forward slashes, as is normal for those archives, so that
directory hierarchies archived on Windows hosts extract correctly
everywhere.

Not really sure how to run the remote client in CI on a system that uses
`\` as a path separator, which is where this error crops up, so
[NO TESTS NEEDED]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-08-18 11:03:28 -04:00
cd40c875ac Add ability to build images in play kube
When playing a kube YAML file, it can be desirable to be able to build
an image on the fly.  This is good for development of an image and YAML
files and somewhat mocks what compose does.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-18 09:55:24 -05:00
f0247df89d Bump github.com/rootless-containers/rootlesskit from 0.14.4 to 0.14.5
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.14.4 to 0.14.5.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](https://github.com/rootless-containers/rootlesskit/compare/v0.14.4...v0.14.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-18 12:25:27 +00:00
a3d8b48fd5 Merge pull request #11212 from flouthoc/check-valid-systemd-session
cgroup-manager-systemd: Warn early if user is rootless and no relevent user session is present.
2021-08-17 21:12:51 +00:00
d7f0d1f17c Merge pull request #11252 from cevich/remove_todo
Cirrus: Resolve two upgrade-test FIXMEs
2021-08-17 21:08:48 +00:00
970529b6a5 Documented ways to fix firewall rules that are lost when firewalld reloads
Closes #5431

Signed-off-by: afro-coder <leon9923@gmail.com>
2021-08-18 01:25:12 +05:30
856f1a2124 Merge pull request #11192 from ashley-cui/darwinwarn3
[NO TESTS NEEDED] Change connection error to be helpful for machine users
2021-08-17 19:46:04 +00:00
c1b7787a28 Bump github.com/containers/image/v5 from 5.15.0 to 5.15.1
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.15.0 to 5.15.1.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.15.0...v5.15.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-17 19:29:15 +00:00
a7a55ea7fb Merge pull request #11231 from flouthoc/move-volume-dest-to-server
volume: move validating volume dest from client to server.
2021-08-17 19:05:42 +00:00
bfc9362614 Cirrus: Resolve two upgrade-test FIXMEs
I attempted to run the tests in a loop (one VM) but it fails with:

```
not ok 8 exec
 (from function `is' in file test/upgrade/../system/helpers.bash, line
474,
   in test file test/upgrade/test-upgrade.bats, line 222)
    `is "$output" "$RANDOM_STRING_1" "exec into myrunningcontainer"'
failed
   /var/tmp/go/src/github.com/containers/podman/bin/podman exec
myrunningcontainer cat /var/www/index.txt
  time="2021-08-17T13:34:21-05:00" level=warning msg="Failed to add
conmon to systemd sandbox cgroup: Invalid unit name '/libpod_parent'"
  uagHtpYnA47bkz3
   /vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
   |     FAIL: exec into myrunningcontainer
   | expected: 'uagHtpYnA47bkz3'
   |   actual: 'time="2021-08-17T13:34:21-05:00" level=warning
msg="Failed to add conmon to systemd sandbox cgroup: Invalid unit name
'/libpod_parent'"'
   |         > 'uagHtpYnA47bkz3'
   \^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

Since the current implementation doesn't reproduce this error, the
change isn't worth the cost of debugging/fixing.  OTOH, making the job
only run from the daily cirrus-cron builds is a simple change.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-17 15:05:29 -04:00
7abc8d40d0 Merge pull request #11244 from containers/dependabot/go_modules/github.com/containers/storage-1.34.1
Bump github.com/containers/storage from 1.34.0 to 1.34.1
2021-08-17 18:59:03 +00:00
1f632f3572 fix: unifiedOverlays should be assigned if no conflicts found.
[NO TESTS NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-17 20:53:32 +05:30
edf9ec38e4 Merge pull request #11224 from xatier/master
Add space trimming check in ValidateSysctls
2021-08-17 13:38:19 +00:00
de4d7b2f7c Merge pull request #11240 from vrothberg/art
make sure that signal buffers are sufficiently big
2021-08-17 13:14:22 +00:00
e9f4d81790 Bump github.com/containers/storage from 1.34.0 to 1.34.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.34.0 to 1.34.1.
- [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.34.0...v1.34.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-17 12:21:23 +00:00
e7ee15f8c3 cgroup-manager-systemd:Fail early if user:rootless and relevent session is not present.
[NO TESTS NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-17 16:18:54 +05:30