14486 Commits

Author SHA1 Message Date
ecd2746ce3 Merge pull request #13527 from machacekondra/set_raw_image_name_for_play_kube
Set rawimage for containers created via play kube
2022-03-17 11:18:01 +01:00
6ce967708d Merge pull request #13299 from npate012/fix_systemd_generate_name_on_empty_prefix
Separator is no longer prepended when prefix is empty on podman generate systemd
2022-03-17 10:34:11 +01:00
714e5a13d9 Separator is no longer prepended when prefix is empty on podman generate systemd
When podman generate systemd is invoked, it previously did not check if
container-prefix or pod-prefix are empty. When these are empty, the file name
starts with the separator, which is hyphen by default. This results in files
like '-containername.service'.

The code now checks if these prefixes are empty. If they are, the filename no
longer adds a separator. Instead, it uses name or ID of the container or pod.

Closes #13272

Signed-off-by: Nirmal Patel <npate012@gmail.com>
2022-03-16 20:26:59 -04:00
b1d37a7e21 Merge pull request #13450 from jwhonce/bz/2052697
Exit code change BZ #2052697
2022-03-16 17:23:50 -04:00
1387b5bd8a Add test for BZ #2052697
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-03-16 11:27:07 -07:00
449f2fc0bd Set rawimage for containers created via play kube
This commit set the containers RawImageName to default image name
specified in Pod YAML, so the containers could be used via autoupdate
feature, which needs the RawImageName to be set.

Currently RawImageName is set only for the create/run/clone podman
commands.

[NO NEW TESTS NEEDED]

Signed-off-by: Ondra Machacek <omachace@redhat.com>
2022-03-16 13:37:44 +01:00
fa33f3527f Merge pull request #13520 from craftyguy/doc_net_macvlan
[CI:DOCS]: Mention netavark limitations for macvlan/ipvlan drivers
2022-03-16 06:36:44 -04:00
bbae81a291 Merge pull request #13489 from Luap99/k8s
move k8s deps into podman
2022-03-16 04:27:41 -04:00
772c6c2206 Merge pull request #13519 from Luap99/version-newline
fix empty newline in version output
2022-03-16 00:02:16 -04:00
ca7376bb11 Exit with 0 when receiving SIGTERM
* systemctl stop podman.service will now return exit code 0
* Update test framework to support JSON boolean and numeric values

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-03-15 14:45:11 -07:00
29f24ff68e [CI:DOCS]: Mention netavark limitations for macvlan/ipvlan drivers
The example is also improved to add the --subnet option, this option is required with netavark, else you get:
    Error: macvlan driver needs at least one subnet specified, DHCP is not supported with netavark

Signed-off-by: Clayton Craft <clayton@craftyguy.net>
2022-03-15 13:08:24 -07:00
45df70ec1e fix empty newline in version output
When podman is build without git commit information it will print a
empty newline instead. This is undesirable and a regression introduced
in commit 7d22cc88ef38.

To test build podman with `go build -mod=vendor -o bin/podman ./cmd/podman`
and check the output of bin/podman version with and without this commit.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 20:44:19 +01:00
fa0d3c564a Merge pull request #13514 from Luap99/bindings
fix breaking change in pkg/bindings
2022-03-15 15:41:52 -04:00
33aa2f2d1c Fix windows win-sshproxy build
Github no longer supports the unauthenticated git protocol, so switch
to using https instead.

https://github.blog/2021-09-01-improving-git-protocol-security-github/

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 17:33:34 +01:00
4e2334c149 Merge pull request #13512 from containers/dependabot/go_modules/github.com/docker/docker-20.10.13incompatible
Bump github.com/docker/docker from 20.10.12+incompatible to 20.10.13+incompatible
2022-03-15 12:19:57 -04:00
ac6ef74937 Merge pull request #13513 from containers/dependabot/go_modules/github.com/spf13/cobra-1.4.0
Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
2022-03-15 11:52:05 -04:00
0db184fb08 fix breaking change in pkg/bindings
pkg/bindings is considered stable. We cannot make changes that would
break any users. If someone uses this field their code would fail to
compile. Since the fix is obviously correct we will keep it but also
add the old field back in to keep compatibility with old code.

When both fields are set ImportArchive is preferred over ImportAchive.

Fixes changes from commit 217197340c8f

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 15:06:42 +01:00
19d0c5a8a3 pkg/k8s.io: add small readme with copyright notice
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:48:11 +01:00
dd9e4dc72b pkg/k8s.io/api/core/v1: remove unneeded types
Remove types that are not applicable for podman. This are types I do not
think we need, there is definitely more that could be removed but this
should be handled by someone who knows the k8s code better than me.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:48:11 +01:00
f106867acd pkg/k8s.io/...: remove more unneeded files
We do not use the types defined in these fields.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:48:11 +01:00
0612f859b8 pkg/k8s.io/...: remove protobuf field tags
Since we do not use protobuf we can remove these field tags. This will
save some KB in the final binary size.

This change was automated with the following commands:
find pkg/k8s.io/ -type f -name "*.go" -exec sed -i -e 's/\sprotobuf\:\".*\"//g' {} +
find pkg/k8s.io/ -type f -name "*.go" -exec sed -i -e 's/\s`protobuf\:\".*\"`//g' {} +

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:48:11 +01:00
f8577766d0 pkg/k8s.io/...: fix lint errors
Fix linting errors. We use different/stricter linters, instead of
skipping these packages we should fix it.

Most errors are about naming conventions, since I do not want to change
the names I added the nolint comment there. I also removed some unused
fields where the linter complained.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:48:10 +01:00
a0ad1f2ad4 remove unneeded k8s code
There is a lot of unneeded code, k8s is the by far the biggest
dependency in podman. We should remove as much as possible so that we
only have the stuff left that we use.

This is just a quick skim over the code which removes a lot of the
generated code and many packages that are now unused.
I know that this will be impossible to properly review. I will try to
make smaller changes in follow up work.

Right now this reduces about 8 MB in binary size!!!

[NO NEW TESTS NEEDED] Hopefully existing tests will catch any problems.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:48:08 +01:00
918fc88a98 move k8s deps into podman
We only need a small part of the k8s dependencies but they are the
biggest dependencies in podman by far. Moving them into podman allows us
to remove the unnecessary parts.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-15 14:46:29 +01:00
3d82d17f8c Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-15 12:09:17 +00:00
439323cd2e Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.12+incompatible to 20.10.13+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.12...v20.10.13)

---
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-03-15 12:09:10 +00:00
68ce83fe91 Merge pull request #13238 from lsm5/e2e-aardvark
test/e2e: add aardvark specific tests
2022-03-15 06:34:07 -04:00
758f2c7a09 Merge pull request #13498 from flouthoc/podman-vendor-buildah
vendor: update `c/buildah`, `c/image` and `c/storage`
2022-03-15 06:32:07 -04:00
ae7997ab50 Merge pull request #13485 from Luap99/ipv6-slirp
slirp: fix setup on ipv6 disabled systems
2022-03-14 16:06:04 -04:00
daebf50b89 apply-podman-deltas: skip modified test case for --add-host which adds anomaly
All podman tests in CI expects exit code 125, which might not be true since exit code from runtime
is relayed as it is without any modification both in `buildah` and `podman`. Following behviour is seen when PR https://github.com/containers/buildah/pull/3809
added a test here https://github.com/containers/buildah/blob/main/tests/bud.bats#L3183 which relays exit code from runtime as it
is, in case of both `podman` and `buildah`. However apart from this test case no other test case was able to trigger this behviour hence
marking this test as an anomaly. Since its debatable if we should override this returned error number or not hence adding a note here.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-14 20:41:38 +05:30
33d808108f Merge pull request #13499 from rst0git/fix-typo
Fix typo
2022-03-14 10:28:33 -04:00
3bb046a5e3 slirp: fix setup on ipv6 disabled systems
When enable_ipv6=true is set for slirp4netns (default since podman v4),
we will try to set the accept sysctl. This sysctl will not exist on
systems that have ipv6 disabled. In this case we should not error and
just ignore the extra ipv6 setup.

Also the current logic to wait for the slirp4 setup was kinda broken, it
did not actually wait until the sysctl was set before starting slirp.
This should now be fixed by using two `sync.WaitGroup`s.

[NO NEW TESTS NEEDED]

Fixes #13388

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-14 15:19:54 +01:00
219f116240 Merge pull request #13221 from LStandman/main
Add support for --chrootdirs
2022-03-14 07:50:15 -04:00
217197340c Fix typo
[NO NEW TESTS NEEDED]

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-03-14 10:53:31 +00:00
e8968c867f Add support for --chrootdirs
Signed-off-by: LStandman <65296484+LStandman@users.noreply.github.com>
2022-03-14 10:31:58 +02:00
c845216fdd docs: podman-build add --no-hosts
Add newly added `--no-hosts` to build docs and document its conflicting
nature with `--add-host`

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-14 12:26:18 +05:30
780d4b2d65 vendor: bump buildah, c/image and c/storage
Bumps

c/buildah to -> `v1.24.3-0.20220310160415-5ec70bf01ea5`
c/storage to -> `v1.38.3-0.20220308085612-93ce26691863`
c/image to -> `v5.20.1-0.20220310094651-0d8056ee346f`

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-14 12:26:12 +05:30
0144cabc41 Merge pull request #13481 from PascalBourdier/golang-1.17
Bump golang to 1.17
2022-03-13 11:22:12 -04:00
f0039bf281 Merge pull request #13494 from n1hility/fix-tty
Fixes TTY & resizing on Mac and Windows
2022-03-13 11:02:13 -04:00
ece2fd29cd Merge pull request #13486 from lsm5/copr-auto-build-rhel-8
podman.spec.rpkg: enable rhel8 builds on copr
2022-03-13 11:00:15 -04:00
edc62b5294 Fixes TTY & resizing on Mac and Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-03-12 12:00:38 -06:00
8934c5cfc3 Merge pull request #13483 from containers/dependabot/go_modules/github.com/spf13/cobra-1.4.0
Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
2022-03-11 12:18:38 -05:00
6e41d1f441 podman.spec.rpkg: enable rhel8 builds on copr
fix conditionals and buildtags to enable rhel8 builds

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-11 11:02:07 -05:00
7ab85b322b Merge pull request #13484 from containers/dependabot/go_modules/github.com/docker/docker-20.10.13incompatible
Bump github.com/docker/docker from 20.10.12+incompatible to 20.10.13+incompatible
2022-03-11 09:26:37 -05:00
c06460bea3 Bump golang to 1.17 in vendor-in-container
Go 1.17 compiler got faster

Signed-off-by: Pascal Bourdier <pascal.bourdier@gmail.com>
2022-03-11 13:45:25 +01:00
4ab24a0681 Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.12+incompatible to 20.10.13+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.12...v20.10.13)

---
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-03-11 12:07:45 +00:00
9314774614 Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 12:07:32 +00:00
7ba81ead38 Merge pull request #13445 from rhatdan/annotation
Add podman play kube --annotation
2022-03-10 14:36:53 -05:00
a5e3279414 Merge pull request #13440 from eriksjolund/remove_web_tab_number
[CI:DOCS] Remove "(1)" from web tab text
2022-03-10 12:18:41 -05:00
32fd5d885a Merge pull request #13475 from PascalBourdier/golangci-lint-install-fix
CI: fix golangci-lint installation
2022-03-10 09:14:09 -05:00