12353 Commits

Author SHA1 Message Date
48e6a8eed0 Return macvlan object in /network REST API response
Fixes: #10266

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2021-07-14 12:24:03 -07:00
9570bf6b30 Merge pull request #10662 from mwhahaha/fix-apiv2-tests
Fix broken volume and container tests
2021-07-14 13:42:58 -04:00
ace19c75ad Merge pull request #10916 from mheon/fix_7360
Perform a one-sided close of HTTP attach conn on EOF
2021-07-14 13:39:58 -04:00
6ced24d0b6 Fix broken volume and container tests
There are a handful of tests that aren't actually being run because
there are missing \ which is prevented the tests from being executed.
Additionally some of the test syntax was incorrect but not showing up
because these tests didn't run.

Signed-off-by: Alex Schultz <aschultz@redhat.com>
2021-07-14 09:33:21 -06:00
01cfb51fe9 auto-update: make output more user friendly
The rather raw and scarce output of `podman auto-update` has been a
thorn in my eyes for a longer while.  So far, Podman would only print
updated systemd units, one per line, without further formatting.

Motivated by issue #9949 which is asking for some more useful
information in combination with a dry-run feature, I sat down and
reflected which information may come in handy.

Running `podman auto-update` will now look as follows:

```
$ podman auto-update
Trying to pull [...]

UNIT                    CONTAINER            IMAGE                   POLICY      UPDATED
container-test.service  08fd34e533fd (test)  localhost:5000/busybox  registry    false
```

Also refactor the spaghetti code in the backend a bit to make it easier
to digest and maintain.

For easier testing and for the sake of consistency with other commands
listing output, add a `--format` flag.

The man page will get an overhaul in a follow up commit.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-14 16:23:51 +02:00
92c9def930 Update nix pin with make nixpkgs
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2021-07-14 21:20:37 +08:00
cbbb1a80f5 Perform a one-sided close of HTTP attach conn on EOF
On EOF of STDIN, we need to perform a one-sided close of the
attach connection on the client side, to ensure that STDIN
finishing will also cause the exec session to terminate, instead
of hang.

Fixes #7360

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-07-13 16:26:53 -04:00
9d98f56a64 Merge pull request #10901 from rsevilla87/manifest-create-args
manifest create subcommand should accept more than 2 arguments
2021-07-13 15:48:42 -04:00
1611e0e5a3 Merge pull request #10921 from containers/dependabot/go_modules/github.com/google/uuid-1.3.0
Bump github.com/google/uuid from 1.2.0 to 1.3.0
2021-07-13 10:49:42 -04:00
7d6f3c4dc6 Bump github.com/google/uuid from 1.2.0 to 1.3.0
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.2.0...v1.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 12:22:13 +00:00
6fcf0b2f32 auto update: minor style nits
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-13 13:52:46 +02:00
a90a4ec7c6 auto update: pass through a context
Pass a single context.Context through the call stack.  If auto-updates
will ever be made available for REST calls, the context will help
supporting disconnected clients.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-13 13:52:46 +02:00
a8847c01fb auto-update: use libimage for image checks
Use the `HasDifferentDigest()` method of the image to replace the
previous checks if an image needs to be updated.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-13 13:52:46 +02:00
eda8d1f584 auto update: fix authfile detection
Fix a bug were an authfile label in a container would mistakenly
override the authfile path for all subsequent checks.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-13 13:52:46 +02:00
db26e1ef94 auto-update: make restarted unit more obvious
The output of auto-update leaves quite some space for improvements.  One
thing is to make it more obvious which systemd units were restarted.

With this change, the output looks as follows:
```
$ podman auto-update
Trying to pull...

Restarted the following systemd units:
$unit-1
$unit-2
$unit-3
```

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-13 13:52:46 +02:00
6ca574dc3a Update USE in order to fix tests
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
2021-07-13 10:54:26 +02:00
4458d2230e Merge pull request #10849 from cevich/fix_cron_mail
[CI:DOCS] Fix cirrus-cron failure notification GH workflow
2021-07-12 14:12:55 -04:00
561ef85570 Merge pull request #10905 from matejvasek/fix-mount
fix: uid/gid for volume mounted to existing dir
2021-07-12 12:53:55 -04:00
f49fd0694d Merge pull request #10903 from containers/dependabot/go_modules/github.com/containers/storage-1.32.6
Bump github.com/containers/storage from 1.32.5 to 1.32.6
2021-07-12 12:52:56 -04:00
fe0bb28e68 Merge pull request #10896 from hshiina/pod-ps
Restore headers of optional information in 'podman pod ps'
2021-07-12 10:57:56 -04:00
fe044d51ea Fix cirrus-cron failure notification GH workflow
The master->main rename broke this.  Also update the runtime along with
a comment w/ link to the actual job definitions.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-12 10:39:34 -04:00
788c2d136b Merge pull request #10890 from rhatdan/main
Don't exclude Dockerfile, Containerfiles from tar content
2021-07-12 10:24:56 -04:00
6cac65c841 fix: uid/gid for volume mounted to existing dir
If mounting to existing directory the uid/gid should be preserved.
Primary uid/gid of container shouldn't be used.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-12 14:56:55 +02:00
084dbeb569 Bump github.com/containers/storage from 1.32.5 to 1.32.6
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.32.5 to 1.32.6.
- [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.32.5...v1.32.6)

---
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-07-12 12:20:58 +00:00
00db5c6eaf Manifest create subcommand should accept more than 2 arguments
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
2021-07-12 10:28:35 +02:00
48ff2ef5a3 Don't exclude Dockerfile, Containerfiles from tar content
If the user specifies "*" in a .dockerignore or a .containerignore
then podman-remote build should not exclude the Dockerfile or
Containerfile or any content pointed to by `-f` in the context
directory.

We still need these files on the server side to complete the build.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-10 06:47:59 -04:00
bef1f03d3c Merge pull request #10868 from cdoern/untilLog
Implemented Until Query Parameter for Containers/logs
2021-07-10 06:31:49 -04:00
6bdb990c9e Restore headers of optional information in 'podman pod ps'
When optional information such as container IDs and names in pods, the
headers are not displayed. This fix restored the headers.

Documentation of this subcommand is also updated.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2021-07-09 18:08:23 -04:00
24a5eeafc5 Merge pull request #10881 from mheon/remove_getstore
Remove GetStore function from Libpod
2021-07-09 14:21:08 -04:00
dd2ca4bad4 Merge pull request #10879 from containers/dependabot/go_modules/github.com/onsi/gomega-1.14.0
Bump github.com/onsi/gomega from 1.13.0 to 1.14.0
2021-07-09 14:20:09 -04:00
78d7ae4e5d Merge pull request #10892 from rugk/patch-2
[CI:DOCS] Mention new hostname for loopback IP
2021-07-09 14:19:11 -04:00
ec97739712 Merge pull request #10893 from baude/issue10795
Add container config to compat image inspect
2021-07-09 14:04:08 -04:00
4624142c2d Implemented Until Query Parameter for Containers/logs
compat containers/logs was missing actual usage of until query param.

fixes #10859

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-09 12:21:46 -04:00
a2d15d9816 Mention new hostname for loopback IP
The hostname `host.containers.internal` is way easier to remember and should IMHO be preferred to be used, as it is:
a) easier to remember than some random IP
b) if the IP changes some time in the future the container will continue to work

And explain hostname adding in more detail
As per @mheon's suggestion.

And explain hostname adding *reason*
Also implies an suggestion for using the hostname instead.

And port change from podman-create man page to podman-run, too

Signed-off-by: rugk <rugk+git@posteo.de>
2021-07-09 17:47:11 +02:00
daebdf3859 Add container config to compat image inspect
With docker-compose, there is a use case where you can `docker-compose
up -d`, then change a file like docker-compose.yml and run up again.
This requires a ContainerConfig with at least Volumes be populated in
the inspect data.  This PR adds just that.

Fixes: #10795

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-07-09 10:10:04 -05:00
43abe006a3 Merge pull request #10872 from ebb-earl-co/rootless_tutorial_revision
[CI:DOCS] Update docs/tutorials/rootless_tutorial.md:
2021-07-09 10:36:08 -04:00
b3c6d1fc7b Merge pull request #10883 from rugk/patch-1
[CI:DOCS] fix: logo not loading after barnch renaming
2021-07-09 09:32:09 -04:00
00ed696ed9 fix: logo not loading after barnch renaming
You've renamed your branch from master to main and thus this URL here did not work anymore and caused a glitch in displaying the image in the docs.

Signed-off-by: rugk <rugk+git@posteo.de>
2021-07-09 14:22:01 +02:00
95c4637851 Update docs/tutorials/rootless_tutorial.md:
* Change references of 'master' to 'main' in URLs e.g. https://github.com/containers/podman/blob/main/install.md
* Wrap names of files or programs by '`' e.g. `dnf`, `containers.conf`, `/etc/subuid`, etc.
* Change sentence with ambiguous subject to 'Root privileges are required to add or update entries within these files'
* Link to kernel.org documentation for the `getpwent` command
* Change sentence: 'Note that the values for each user must be unique ~and without any overlap~'
* Make references to the Podman project upper-case instead of lower-case
* Reorder sentence 'Update the `/etc/subuid` and `/etc/subgid` with fields for each user' to emphasize 'For each user'
* Remove reference to asciiart demos and update README.md link

Signed-off-by: Colin Eberl Coe <ebb-earl-co@pm.me>
2021-07-08 13:38:05 -05:00
e5fcffc551 Remove GetStore function from Libpod
We should not be exposing the store outside of Libpod. We want to
encapsulate it as an internal implementation detail - there's no
reason functions outside of Libpod should directly be
manipulating container storage. Convert the last use to invoke a
method on Libpod instead, and remove the function.

[NO TESTS NEEDED] as this is just a refactor.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-07-08 14:22:33 -04:00
31c3b952e5 Merge pull request #10867 from baude/issue9334
Replace old RESTful tutorial with updated README
2021-07-08 11:09:09 -04:00
563532aef8 Bump github.com/onsi/gomega from 1.13.0 to 1.14.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.13.0...v1.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-08 12:23:01 +00:00
48d49032a1 Merge pull request #10865 from Luap99/rootless-cni
Make rootless-cni setup more robust
2021-07-08 05:13:10 -04:00
1a9cb93f16 Merge pull request #10870 from vrothberg/manifest-push-rm
manifest push --rm: use libimage for removal
2021-07-07 11:40:10 -04:00
38863e7642 Replace old RESTful tutorial with updated README
Remove outdated information on go bindings.  Moved the tips for
debugging into the REAME and tidied up relevant links.

Fixes: #9334
[CI_DOCS]
[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-07-07 10:03:01 -05:00
38bef70b30 manifest push --rm: use libimage for removal
Use libimage for removing the manifest instead of going directly
through the store.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-07 15:55:36 +02:00
2c7c679584 Make rootless-cni setup more robust
The rootless cni namespace needs a valid /etc/resolv.conf file. On some
distros is a symlink to somewhere under /run. Because the kernel will
follow the symlink before mounting, it is not possible to mount a file
at exactly /etc/resolv.conf. We have to ensure that the link target will
be available in the rootless cni mount ns.

Fixes #10855

Also fixed a bug in the /var/lib/cni directory lookup logic. It used
`filepath.Base` instead of `filepath.Dir` and thus looping infinitely.

Fixes #10857

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-06 18:40:03 +02:00
c583d4dd8c Merge pull request #10860 from containers/dependabot/go_modules/github.com/cyphar/filepath-securejoin-0.2.3
Bump github.com/cyphar/filepath-securejoin from 0.2.2 to 0.2.3
2021-07-06 04:31:54 -04:00
ba29b30d74 Merge pull request #10788 from infiniteregrets/multi-pull
support pulling multiple images sequentially in a single podman pull
2021-07-06 04:30:54 -04:00
518457b354 Bump github.com/cyphar/filepath-securejoin from 0.2.2 to 0.2.3
Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
- [Commits](https://github.com/cyphar/filepath-securejoin/compare/v0.2.2...v0.2.3)

---
updated-dependencies:
- dependency-name: github.com/cyphar/filepath-securejoin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 12:20:31 +00:00