15164 Commits

Author SHA1 Message Date
2133edb2ca compat, build: suppress step errors when quiet is set
Match with docker API and suppress step errors when field quiet is set.

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

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-24 00:21:04 +05:30
5c51e1d26e Merge pull request #14274 from edsantiago/dependabot_release_notes_none
dependabot: add release-note-none label
2022-05-20 07:18:36 -04:00
916d8231c5 Merge pull request #14297 from jwhonce/wip/swagger
Swagger refactor/cleanup
2022-05-20 07:16:35 -04:00
1916fe22a9 Merge pull request #14272 from Luap99/completion2
shell completion: use more constants in the code
2022-05-19 18:45:03 -04:00
5b79cf15a0 Swagger refactor/cleanup
* Remove duplicate or unused types and constants
* Move all documetation-only models and responses into swagger package
* Remove all unecessary names, go-swagger will determine names from
  struct declarations
* Use Libpod suffix to differentiate between compat and libpod models
  and responses. Taken from swagger:operation declarations.
* Models and responses that start with lowercase are for swagger use
  only while uppercase are used "as is" in the code and swagger comments
* Used gofumpt on new code

```release-note

```

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-19 15:24:18 -07:00
913caaa9b1 Merge pull request #14288 from vrothberg/linters
linter: enable unconvert linter
2022-05-19 12:51:12 -04:00
948c5e915a Merge pull request #13870 from kolyshkin/makefile-cleanups
Makefile: simplify for modern Go
2022-05-19 08:08:45 -04:00
9c9fc96d27 shell completion: use more constants instead of duplicating strings
It is better to just reuse the existing constants instead of duplicating
the strings.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-19 14:04:23 +02:00
337f8b9d98 shell completion: podman save --format use all valid values
docker-archive was missing from the completions. To prevent duplication
use the same format list as podman save.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-19 14:04:22 +02:00
74f70315b3 shell completion: update podman inspect --type options
Add all option that are supported by the podman inspect --type flag to
the completions. Also use the same constants instead of duplicating the
strings. In order to do this I had to move the definitions into the
common package to prevent an import cycle.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-19 14:04:22 +02:00
318e95fd2a shell completion: fix podman event --filter values
The completion suggested incorrect values for `podman events --filter
type=` . It should only list types not the event status. Also make sure
to use the constants instead of duplicating the strings.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-19 14:04:10 +02:00
b22143267b linter: enable unconvert linter
Detects unneccessary type conversions and helps in keeping the code base
cleaner.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-19 13:59:15 +02:00
7093885df7 Merge pull request #14228 from rhatdan/api
Deleting an n use image should return conflict not system error
2022-05-18 11:48:06 -04:00
12964c7b93 Merge pull request #14256 from vrothberg/run-1287
k8systemd: run k8s workloads in systemd
2022-05-18 09:39:30 -04:00
9915b8f599 Merge pull request #14234 from stefins/change-permission
Changed permission of .ubuntu_prepare.sh to 755
2022-05-17 17:19:08 -04:00
653117087f ci: pr-should-include-tests: add more exceptions
Add .golangci.yml, podman.spec.rpkg, and non top-level Makefiles.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 14:05:07 -07:00
40a1cd4efb Remove GO111MODULES use
Using it is no longer needed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:42:03 -07:00
d49efde27e Makefile: rm gofmt target
It is superceded by golangci-lint, which has gofmt as one of the
linters.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:41:54 -07:00
9bf81814a2 Makefile: rm CHANGELOG_* and ISODATE vars
Those are not used since commit 0d1ba0a58fdb15af7e.

Fixes: 0d1ba0a58fdb15af7
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:41:44 -07:00
d2070a39ea Makefile: rm -mod=vendor
"go build" no longer requires explicit "-mod=vendor", as this is the
default since go 1.14.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:41:28 -07:00
2b54bf3e64 Move GOPROXY from Makefile to cirrus.yml
GOPROXY's default value is "https://proxy.golang.org,direct"
since go 1.13, so it is redundant to set it explicitly.

For some reason though, GOPROXY in Cirrus CI is set to direct,
which makes things such as go mod tidy very slow. So, set the
proper (default) value for in in .cirrus.yml. Do the same for GOSUMDB.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:41:17 -07:00
11d3cf2697 Makefile, podman.spec.rpkg: rm GOBIN and GOPATH
Remove GOPATH setting as since Go 1.9 it defaults to $HOME/go (for
earlier versions it had to be specified explicitly).

Remove GOPATH-related code from the spec, using relative paths when
compiling packages, and enable Go modules, simplifying the spec.

Remove support for multiple paths in GOPATH (which is rarely used and
doesn't really work with modules).

Remove setting GOBIN, rely on $GOPATH/bin instead. In case GOBIN is
explicitly set (which is highly unlikely), forcefully ignore by
unsetting it.

Remove GOBIN from tools invocation since we added GOPATH/bin to PATH.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:41:07 -07:00
c63bb6b9a8 Makefile,.gitignore: rm .install.goimports
Recent commit 3b9177995e0124beb064ef8615ba9a2ae7ca4f4b removes
this target, but some artifacts remain. Remove those.

Fixes: 3b9177995e0124beb064ef8615ba9a2ae7ca4f4b
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:40:57 -07:00
e2d2b537af Makefile: rm .gopathok
Since about Go 1.10 (or whereabouts) the specific package structure
is no longer required.

This also removes GOPKGDIR and GOPKGBASEDIR as they were only used by
gopathok.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:40:46 -07:00
d8c42de412 Makefile: rm .install.libseccomp.sudo target
This was originally added in commit a824186ac9803ef to be used from
Travis CI. Travis was removed in commit 8771a03af1f17f and there is
no need to have this target ever since (October 2018).

Also, remove the comment about BUILD_TAGS, which originally belonged to
varlink target (removed by commit f62a356515e387b0) but got misplaced
later.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:40:10 -07:00
c632a2efcd dependabot: add release-note-none label
Followup to https://github.com/openshift/release/pull/28686
in which we ask openshift-ci-bot to enforce a release-note
label on new PRs.

Dependabot PRs do not need release notes. Add a config setting
(copied from cri-o) that tells dependabot to set release-note-none
on new PRs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-17 13:55:01 -06:00
105c6c7dd1 Merge pull request #14254 from flouthoc/api-allow-remote
api: make no-op `remote` functional in `/libpod/build`
2022-05-17 14:19:45 +02:00
4a78992ac7 Merge pull request #14258 from mheon/no_hard_error_on_exec_cleanup
Make errors on removing exec sessions nonfatal
2022-05-17 11:10:52 +02:00
e28d46b76b Merge pull request #14255 from hiredman/pr-for-14249
Don't complain about XDG_RUNTIME_DIR, Closes  #1424
2022-05-17 11:08:50 +02:00
8684d41e38 k8systemd: run k8s workloads in systemd
Support running `podman play kube` in systemd by exploiting the
previously added "service containers".  During `play kube`, a service
container is started before all the pods and containers, and is stopped
last.  The service container communicates its conmon PID via sdnotify.

Add a new systemd template to dispatch such k8s workloads.  The argument
of the template is the path to the k8s file.  Note that the path must be
escaped for systemd not to bark:

Let's assume we have a `top.yaml` file in the home directory:
```
$ escaped=$(systemd-escape ~/top.yaml)
$ systemctl --user start podman-play-kube@$escaped.service
```

Closes: https://issues.redhat.com/browse/RUN-1287
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-17 10:18:58 +02:00
6f9155cbb3 api: make no-op remote functional in /libpod/build
Podman API `libpod/build` accepts paramemter `remote` which overrides
`dockerfile` but currently parameter is no-op. Following commit adds
support for `remote` parameter in libpod API.

See: https://docs.podman.io/en/v3.2.3/_static/api.html#operation/ImageBuildLibpod
Closes: https://github.com/containers/podman/issues/13831

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-16 22:01:39 +05:30
21a5ef859c Don't complain about XDG_RUNTIME_DIR, Closes #1424
Code is not directly reading XDG_RUNTIME_DIR, it is reading a value in
the state that may initially be from XDG_RUNTIME_DIR, but then is
overriden by a value from the boltdb that podman stores some state in.

XDG_RUNTIME_DIR and the RunRoot path may not have the same value, so
complaining about XDG_RUNTIME_DIR here may cause confusion when trying
to debug things.

[NO TESTS NEEDED]

Signed-off-by: Kevin Downey <hiredman@thelastcitadel.com>
2022-05-16 09:02:56 -07:00
eb26fa45f1 Merge pull request #14229 from n1hility/fix-buildtag
Cleanup strange buildtag edit
2022-05-16 17:27:52 +02:00
dc435ecb22 Make errors on removing exec sessions nonfatal
Removing exec sessions is guaranteed to evict them from the DB,
but in the case of a zombie process (or similar) it may error and
block removal of the container. A subsequent run of `podman rm`
would succeed (because the exec sessions have been purged from
the DB), which is potentially confusing to users. So let's just
continue, instead of erroring out, if removing exec sessions
fails.

[NO NEW TESTS NEEDED] I wouldn't want to spawn a zombie in our
test VMs even if I could.

Fixes #14252

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-05-16 10:53:11 -04:00
b94595bdfc Merge pull request #14199 from edsantiago/parse_localbenchmarks
[CI:DOCS] Benchmarks: new tool for parsing results
2022-05-16 16:41:17 +02:00
ee782fcb70 Deleting an n use image should return conflict not system error
Fixes: https://github.com/containers/podman/issues/14208

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-16 09:59:19 -04:00
d8e8e62822 Merge pull request #14246 from n1hility/update-tutorials-index
[CI:DOCS] Update tutorial list to include Podman for Windows
2022-05-16 13:37:16 +02:00
931ee8950c Merge pull request #14250 from n1hility/wsl-linger
Update WSL machine OS to enable user lingering
2022-05-16 13:33:36 +02:00
0c7124289f Merge pull request #14232 from vrothberg/bz-2083997
[BZ #2083997] pod: build pause image in custom user NS
2022-05-16 13:19:32 +02:00
76c85b1a0b Merge pull request #14241 from SandroCasagrande/robust-split-proc-stat
Robust whitespace split of cpu utilization line from /proc/stat
2022-05-16 09:38:50 +02:00
977cd9bd17 Update WSL machine OS to enable user lingering
Also migrate old machines that were missing this setting

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-05-15 13:35:46 -05:00
0961002d94 Update tutorial list to include Podman for Windows
Label remote client tutorial as advanced so that users favor the managed machine approach.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-05-15 11:48:25 -05:00
5b2d5c365b Robust whitespace split of cpu utilization line from /proc/stat
Signed-off-by: Sandro Casagrande <sc.casagrande@gmail.com>
2022-05-14 00:34:56 +00:00
de4f76e7ea Fix strange buildtag edit
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-05-13 12:11:51 -05:00
c45d51899a [BZ #2083997] pod: build pause image in custom user NS
Use the host UID and host GID mapping when building the local pause
image for a Pod with a custom mapping.  Otherwise, the mappings are off
and the build fails. Propagating the mapping to the build container is
not needed since the pause image ships merely a copied `catatonit` from
the host.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2083997
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-13 15:41:28 +02:00
c058b828cd Changed permission to 755
[NO NEW TESTS NEEDED]

Signed-off-by: Stefin <stefin@pm.me>
2022-05-13 19:09:46 +05:30
bde8dba877 Merge pull request #14235 from containers/dependabot/go_modules/github.com/docker/docker-20.10.16incompatible
build(deps): bump github.com/docker/docker from 20.10.15+incompatible to 20.10.16+incompatible
2022-05-13 08:11:47 -04:00
25f80941a0 build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.15+incompatible to 20.10.16+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.15...v20.10.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 12:09:31 +00:00
53c39cf256 Merge pull request #14205 from rhatdan/VENDOR
Vendor in latest containers/common
2022-05-13 11:58:26 +02:00
a1e83227d3 Merge pull request #14226 from edsantiago/treadmill_reset
[CI:DOCS] Treadmill script: add --reset option
2022-05-13 11:36:26 +02:00