Commit graph

8603 commits

Author SHA1 Message Date
Jhon Honce
b64d29bdf2 Remove help/usage from --remote pre-check
--remote pre-check was providing usage context, which was also being
provided by the root podman command.

Fixes #7273

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-08-30 15:39:01 +02:00
Ed Santiago
8b38d27ebd system tests: podman-remote, image tree
- new sanity checks for podman-remote:
  - first, confirm that when PODMAN is "-remote",
    we actually talk to a server (validated by
    presence of "Server:" string in "podman version").
  - second, add test for #7212, in which we run
    "podman --remote" (podman with --remote flag,
    not podman-remote command) and make sure --remote
    is allowed both as the first option and also
    with other flag options preceding.

- new test for "podman image tree" (piggybacking on
  top of a "podman build" test, because that gives
  us lots of layers).

- skip "podman exec - basic test" when remote. It is consistently
  causing CI failures, breaking all of CI, due to #7241.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-08-30 12:11:19 +02:00
Jhon Honce
33cf7aec51 Refactor parsing to not require --remote to be first
Use cobra.Command.FParseErrWhitelist to no longer require --remote to be
the first argument in flags when using CLI

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-08-30 12:11:19 +02:00
OpenShift Merge Robot
3ae1cd806c
Merge pull request #7491 from Luap99/2.0-remoteflag
Enable --remote flag v2.0
2020-08-28 15:34:30 -04:00
Daniel J Walsh
e17cd49a78 Enable --remote flag
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 18:24:09 +02:00
OpenShift Merge Robot
145a366d0f
Merge pull request #7488 from mheon/206_rc1
Bump to v2.0.6-rc1
2020-08-28 12:10:47 -04:00
Matthew Heon
dc006c1640 Bump to v2.0.6-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-28 11:07:02 -04:00
Matthew Heon
f27d00f13e
Bump to v2.0.6-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-28 11:06:43 -04:00
Matthew Heon
d6e948aaf6 Update release notes for v2.0.6
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-28 11:04:28 -04:00
OpenShift Merge Robot
538273e696
Merge pull request #7478 from ashley-cui/2.0docs
[CI:DOCS] remote doc fixes
2020-08-28 05:44:18 -04:00
OpenShift Merge Robot
d1593e6a85
Merge pull request #7483 from TomSweeneyRedHat/dev/tsweeney/bumpcommonv2
Bump c/common to v0.14.10 and c/conmon to v2.0.20
2020-08-27 20:12:37 -04:00
TomSweeneyRedHat
023c4fadf5 Bump c/common to v0.14.10 and c/conmon to v2.0.20
As the title says.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-08-27 16:38:44 -04:00
Paul Holzinger
2e5c620a29 [CI:DOCS] Update podman-remote docs
Add support for multi level subcommands.
e.g. podman system connection.

Update the flags and add note for containers.conf.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-27 15:00:42 -04:00
Ashley Cui
b0d4f08743 [CI:DOCS] Making docs build on mac
sed syntax on mac is different

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-08-27 15:00:35 -04:00
OpenShift Merge Robot
9c8e0a0f25
Merge pull request #7475 from baude/v2triminit
abi: trim init command
2020-08-27 13:40:29 -04:00
Giuseppe Scrivano
4da3677e3f abi: trim init command
without it the systemd detection fails.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-27 10:38:56 -05:00
OpenShift Merge Robot
679da6c61b
Merge pull request #7450 from baude/v2msiremotestuff
podman-remote fixes for msi and client
2020-08-26 05:14:24 -04:00
Brent Baude
31180fa2b1 podman-remote fixes for msi and client
correct small typo that sets the path on windows via the msi xml.

in the remote client, prompt for SSH password when no identity or alternate means of authentication are provided.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-25 15:20:27 -05:00
OpenShift Merge Robot
374b2c65cf
Merge pull request #7443 from mheon/undo_our_hacks
Undo v2.0 branch hacks
2020-08-25 14:37:03 -04:00
OpenShift Merge Robot
c02fe7e9d6
Merge pull request #7439 from edsantiago/fix_failing_userns_test
run test: use explicit uid/gid
2020-08-25 13:15:22 -04:00
Matthew Heon
b7828b7ce4 Update c/storage to v1.20.3
This includes an important patch to fix a CI issue where the
cleanup process's unmount of a container was not being
registered by `podman system service`.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-25 13:06:00 -04:00
Matthew Heon
ab4283c5a6 Revert "HACK: Disable build-each-commit"
This reverts commit 44e5d0c1e8. We
temporarily disabled this for the last few backports for 2.0.5,
given how painful the libpod->podman move made things. We do not
want to keep this around long-term, each commit should be
required to build.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-25 13:04:36 -04:00
Matthew Heon
c1a6e67183 Revert "HACK: Manually include c/storage #698"
This reverts commit ae2ee65eff.
This was a horrible hack that we did for time reasons, to get
2.0.5 out on schedule; now that it has been merged into c/storage
properly we no longer need or want it.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-25 13:03:01 -04:00
Ed Santiago
a60b4cc1d8 run test: use explicit uid/gid
Fixes Fedora gating test failure: if the host tests are running
under UID 1000, --userns=keep-id will (of course) add current
user as 1000, and the in-container 'adduser' will assign 1001.
To prevent that, assign UID 4242 (and hope that that's not
our calling user's UID).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-08-25 07:26:23 -06:00
OpenShift Merge Robot
024f47068a
Merge pull request #7402 from mheon/last_pr_before_205_really_this_time
Final v2.0.5 backports
2020-08-24 18:35:59 -04:00
Matthew Heon
13d5b2d661 Bump to v2.0.6-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 15:19:20 -04:00
Matthew Heon
776abc5210 Bump to v2.0.5
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 15:18:09 -04:00
Matthew Heon
ae2ee65eff HACK: Manually include c/storage #698
We need this release out by end of day, so we don't have time to
do this right. Disable the vendor task and manually add c/storage
PR #698 to the vendored copy of c/storage to make the tests pass.

Once #698 merges into c/storage, we need to remove this commit
and backport it to the v1.20 stable branch, then cut a release
there.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 15:10:53 -04:00
Matthew Heon
884355c681 Final release notes update for v2.0.5.
Really. I promise. No more after this.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 11:31:37 -04:00
Matthew Heon
c5723785b7 Clean up pods before returning from Pod Stop API call
This should help alleviate races where the pod is not fully
cleaned up before subsequent API calls happen.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 11:31:37 -04:00
Matthew Heon
484bd0af1d Ensure pod infra containers have an exit command
Most Libpod containers are made via `pkg/specgen/generate` which
includes code to generate an appropriate exit command which will
handle unmounting the container's storage, cleaning up the
container's network, etc. There is one notable exception: pod
infra containers, which are made entirely within Libpod and do
not touch pkg/specgen. As such, no cleanup process, network never
cleaned up, bad things can happen.

There is good news, though - it's not that difficult to add this,
and it's done in this PR. Generally speaking, we don't allow
passing options directly to the infra container at create time,
but we do (optionally) proxy a pre-approved set of options into
it when we create it. Add ExitCommand to these options, and set
it at time of pod creation using the same code we use to generate
exit commands for normal containers.

Fixes #7103

Signed-off-by: Matthew Heon <mheon@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 11:31:37 -04:00
Brent Baude
23251149ab error when adding container to pod with network information
because a pod's network information is dictated by the infra container at creation, a container cannot be created with network attributes.  this has been difficult for users to understand.  we now return an error when a container is being created inside a pod and passes any of the following attributes:

* static IP (v4 and v6)
* static mac
* ports -p (i.e. -p 8080:80)
* exposed ports (i.e. 222-225)
* publish ports from image -P

Signed-off-by: Brent Baude <bbaude@redhat.com>

<MH: Fixed cherry pick conflicts and compile>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 11:31:37 -04:00
OpenShift Merge Robot
c78c6b44ce
Merge pull request #7410 from rhatdan/v2.0
Vendor in containers/common v0.14.9
2020-08-24 08:59:22 -04:00
Daniel J Walsh
6505322c51
Vendor in containers/common v0.14.9
This will fix the localions of the containers.conf file
on Windows and MacOS Boxes.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-23 06:41:37 -04:00
OpenShift Merge Robot
e06cb25e81
Merge pull request #7399 from rhatdan/v2.0
In podman 1.* regression on --cap-add
2020-08-21 19:22:22 +02:00
Daniel J Walsh
7ed653804c
In podman 1.* regression on --cap-add
In podman 1.0 if  you executed a command like:

podman run --user dwalsh --cap-add net_bind_service alpine nc -l 80

It would work, and the user dwalsh would get the capability,  in
podman 2.0, only root and the binding set gets the capability.

This change restores us back to the way podman 1.0 worked.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-21 10:55:22 -04:00
OpenShift Merge Robot
11372c4c4d
Merge pull request #7363 from mheon/lets_try_this_again
Lets try this again: v2.0.5 backports, round 2
2020-08-21 12:58:55 +02:00
OpenShift Merge Robot
84180d99bc
Merge pull request #7353 from rhatdan/v2.0
Cleanup handling of podman mount/unmount
2020-08-20 22:08:25 +02:00
Paul Holzinger
7fc3c25410 fix pod creation with "new:" syntax followup + allow hostname
Fixes: 4c75fe3f70 ("fix pod creation with "new:" syntax")

Commit 4c75fe3f70 passes all net options to the pod but forgot
to unset the options for the container creation. This leads to
erros when using flags like `--ip` since we tried setting
the ip on the pod and container which obviously fails.

I didn't notice the bug because we don't throw an error when
specifing port bindings on a container which joins the pods
network namespace. (#7373)

Also allow the use of `--hostname` and pass that option to the
pod and unset it for the container. The container has to use
the pods hostname anyway. This would error otherwise.

Added tests to prevent regression.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-20 14:59:21 -04:00
Matthew Heon
f12f2456af Fix a Makefile issue
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-08-20 14:18:12 -04:00
Matthew Heon
7fc0fbfb65 Fix a system test failure
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-08-20 14:17:48 -04:00
Daniel J Walsh
4e31c8136d
Cleanup handling of podman mount/unmount
We should default to the user name unmount rather then the internal
name of umount.

Also User namespace was not being handled correctly. We want to inform
the user that if they do a mount when in rootless mode that they have
to be first in the podman unshare state.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-20 13:35:11 -04:00
Matthew Heon
de75ae29ff Fix imports (podman -> libpod for v2.0 branch)
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-08-20 13:21:17 -04:00
Matthew Heon
314813c162 Final set of updates to release notes
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-08-20 12:43:25 -04:00
Daniel J Walsh
bcd9b8125c Add support for --connection
* override --url and/or --identity fields from containers.conf
* --connection flag has higher precedence than ActiveService from
containers.conf. Which is set via podman system connection default
* Add newline to error message printed on stderr
* Added --connection to bash completion and documentation
* Updated bindings to query server in case of no path or /

Closes #jira-991
Fixes #7276

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Squashed commits to work around CI issue

<MH: Fixed rebase conflicts on v2.0>

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-08-20 12:42:28 -04:00
Brent Baude
14379d6dbd remove --latest for all remote commands
instead of hiding the latest options for podman-remote or catching an error if podman --remote <cmd> -l is used, we no longer add the latest option to any remote command.  podman will error with a "unknown flag" option.

Fixes: #7127

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-20 12:40:08 -04:00
Matthew Heon
855ce48a92 Further release notes updates for v2.0.5
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-08-20 12:26:33 -04:00
Paul Holzinger
0ef6688785 fix podman create/run UTS NS docs
Add better error message when using `--pod` and `--hostname`.
Improve the docs to better explain the uts hostname relation.
Add more valid options for the `--uts` flag.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-20 12:25:55 -04:00
Giuseppe Scrivano
ce1389bde7 abi: fix detection for systemd
create a scope everytime we don't own the current cgroup and we are
running on systemd.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-20 12:24:38 -04:00
Paul Holzinger
d3ef4770d4 fix podman version output to include git commit and builttime
Add the go module version v2 to the libpod path.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-20 12:24:16 -04:00