8011 Commits

Author SHA1 Message Date
a4c8198afd Fix remote handling of podman images calls
Enable three more tests
Fix handling of image filters

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-21 09:28:42 -04:00
72e880351a Merge pull request #6311 from mheon/fix_darwin_build
Fix build on OS X
2020-05-21 14:22:49 +02:00
2bdb8f1804 Bump k8s.io/api from 0.18.2 to 0.18.3
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.18.2...v0.18.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-21 07:36:12 -04:00
cdd1f2bbaf Bump github.com/onsi/gomega from 1.10.0 to 1.10.1
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.0 to 1.10.1.
- [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.10.0...v1.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-21 07:35:42 -04:00
498c6eb19a Enable system prune test remote client
Removed the use of lastest flags as not supported in remote client
and latest flag alredy teseted in indivisual pod start stop test.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-05-21 06:10:30 -04:00
8db7b9ea21 Merge pull request #6284 from baude/v2remotetestfixes
Test fixes for remote integration
2020-05-21 02:06:56 +02:00
66cae3209e Fix build on OS X
We disabled the OS X and Windows cross-building tests. This,
predictably, led us to regress a bit in our ability to build for
both of these.

This fixes the build on OS X and fixes one obvious Windows bug.
Unfortunately, we're dragging in all of `pkg/spec` somewhere on
Windows, and things are blowing up spectacularly because of it
(plus a few uses of the `syscall` package in the bindings).

I've giving up for the day. This fixes OS X, but does not fully
enable the cross-build CI (need Windows fixes for that).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 18:24:56 -04:00
02b29db3b7 Merge pull request #6295 from edsantiago/bats_pod
system tests: more podman-pod tests
2020-05-20 23:35:40 +02:00
9ceff66a7d Update Derivative API tutorial to reflect the HTTP API
Once the HTTP API becomes stable, I think we want to drive people
towards using it, as opposed to directly calling our CLI (when
possible).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 17:35:24 -04:00
588df90397 Merge pull request #6161 from kunalkushwaha/network-inspect
`--format` and `--filter` options for `network ls` and `network inspect` command
2020-05-20 23:32:52 +02:00
cc65430145 Turn off 'noexec' option by default for named volumes
We previously enforced this for security reasons, but as Dan has
explained on several occasions, it's not very valuable there
(it's trivially easy to bypass) and it does seriously annoy folks
trying to use named volumes. Flip the default from 'on' to 'off'.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-20 16:48:20 -04:00
e8e5a5f96e Merge pull request #6305 from baude/v2podcreatetest
enable pod_create remote integration tests
2020-05-20 22:44:12 +02:00
46ca450436 Merge pull request #6300 from baude/v2governattach
govern remote attach and start
2020-05-20 22:41:22 +02:00
37ecff9157 enable remote integration tests for init
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 15:35:24 -05:00
24158d4a2e Add a test for detached exec
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:29:49 -04:00
6330e7bd32 Update manpage for podman exec to include detach flag
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:16:58 -04:00
6b9e9610d8 Enable cleanup processes for detached exec
The cleanup command creation logic is made public as part of this
and wired such that we can call it both within SpecGen (to make
container exit commands) and from the ABI detached exec handler.
Exit commands are presently only used for detached exec, but
theoretically could be turned on for all exec sessions if we
wanted (I'm declining to do this because of potential overhead).

I also forgot to copy the exit command from the exec config into
the ExecOptions struct used by the OCI runtime, so it was not
being added.

There are also two significant bugfixes for exec in here. One is
for updating the status of running exec sessions - this was
always failing as I had coded it to remove the exit file *before*
reading it, instead of after (oops). The second was that removing
a running exec session would always fail because I inverted the
check to see if it was running.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
5ec56dc790 Add ability to clean up exec sessions with cleanup
We need to be able to use cleanup processes to remove exec
sessions as part of detached exec. This PR adds that ability. A
new flag is added to `podman container cleanup`, `--exec`, to
specify an exec session to be cleaned up.

As part of this, ensure that `ExecCleanup` can clean up exec
sessions that were running, but have since exited. This ensures
that we can come back to an exec session that was running but has
since stopped, and clean it up.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
05a034118f Add CLI frontend for detached exec
Add a new ContainerEngine method for creating a detached exec
session, and wire in the frontend code to do this. As part of
this, move Streams out of ExecOptions to the function signature
in an effort to share the struct between both methods.

Fixes #5884

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
43413887c0 Add backend code for detached exec
As part of the massive exec rework, I stubbed out a function for
non-detached exec, which is implemented here. It's largely
similar to the existing exec functions, but missing a few pieces.

This also involves implemented a new OCI runtime call for
detached exec. Again, very similar to the other functions, but
with a few missing pieces.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
e7f4e98c45 Add exit commands to exec sessions
These are required for detached exec, where they will be used to
clean up and remove exec sessions when they exit.

As part of this, move all Exec related functionality for the
Conmon OCI runtime into a separate file; the existing one was
around 2000 lines.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
fed4ef09ce enable pod_create remote integration tests
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 14:57:30 -05:00
6a75dfa8a8 Merge pull request #6297 from mheon/minor_fix_attach
Print container state when erroring that it is improper
2020-05-20 21:46:55 +02:00
141b34f6be Fix remote integration for healthchecks
the one remaining test that is still skipped do to missing exec function

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 14:43:01 -05:00
aeba6dbcac Merge pull request #6302 from baude/v2remotecreate
Fix create_test for remote integration
2020-05-20 21:39:01 +02:00
b5a134262b Merge pull request #6291 from haircommander/journald-container-name
oci conmon: tell conmon to log container name
2020-05-20 21:25:27 +02:00
e2247b9fb1 Fix create_test for remote integration
fixes tests to pass for remote integration.  the two remaining tests that are skipped are due to lack of logs command.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 13:49:35 -05:00
b0bfa0e6da Merge pull request #6271 from jwhonce/wip/version
V2 API Version Support
2020-05-20 20:10:51 +02:00
ce24e1139c govern remote attach and start
fixes a race where container would start before attach could occur resulting in an error.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 13:02:18 -05:00
2624c043d1 Test fixes for remote integration
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 12:56:38 -05:00
f9c392f50a V2 API Version Support
* Update blang/semver to allow ParseTolerant() support
* Provide helper functions for API handlers to obtain client's 'version'
  path variable focused on API endpoint tree: libpod vs. compat
* Introduce new errors:
  * version not given in path, endpoints may determine if this is a hard
    error (ErrVersionNotGiven)
  * given version not supported (ErrVersionNotSupported), only a soft
    error if the handler is going to hijack the connection
* Added unit tests for version parsing
* bindings check version on connect:
  * client <= Server API version connection is continued
  * client >= Server API version connection fails

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-05-20 10:21:30 -07:00
07d82d111a Print container state when erroring that it is improper
This is a nice little convenience - lets people know why we won't
let them attach to a container.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-20 13:19:01 -04:00
a4bfcd75aa system tests: more podman-pod tests
* rename pod-top.bats to pod.bats
* add test for TCP port communication between pods
* add test for various podman-pod-create options

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-20 11:04:54 -06:00
09f8f14b4f Merge pull request #6273 from vrothberg/registry_helper
Registry helper : go bindings
2020-05-20 18:39:37 +02:00
70d89bfc62 Merge pull request #6293 from baude/v2docstree
[CI:DOCS] Image tree endpoint should return 404
2020-05-20 17:31:14 +02:00
d2d338b7ec don't skip log tests unless remote
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-05-20 11:11:15 -04:00
8675a09e2e [CI:DOCS] Image tree endpoint should return 404
when trying to get an image tree for a missing image, it should return a 404.  doc fix only.

Fixes: #6289

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 09:30:20 -05:00
a6700147a8 Merge pull request #6277 from rhatdan/readme
[CI:DOCS] Get MAC, Windows and Linux podman-remote from latest version links.
2020-05-20 16:17:17 +02:00
92acb3676c oci conmon: tell conmon to log container name
specifying `-n=ctr-name` tells conmon to log CONTAINER_NAME=name if the log driver is journald

add this, and a test!

also, refactor the args slice creation to not append() unnecessarily.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-05-20 10:07:54 -04:00
dfe0579a2f add go-bindings for hack/podman-registry
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-20 15:12:35 +02:00
973d624418 New tool: hack/podman-registry, manages local registry
In response to #6207: this is a helper script intended for
use in starting and stopping a local container registry.
It takes care of port, username, password assignments;
generates a self-signed certificate; and starts the
container in an isolated podman root/runroot to avoid
conflicting with the caller's environment.

Intended usage: invoke from shell script, using 'eval'
to get results into calling process environment. See
help message (-h) for invocation details. This will
work for shell scripts but will be difficult if
called from Go or C - if that is likely to happen,
I'd love to hear suggestions for alternate ways to
get the settings back to the caller.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-20 10:22:16 +02:00
087fdda199 Testcase added for network commands
New testcase for network ls --filter and inspect --format
added. Also bash completion options updated.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
ade20f3323 format option added to network inspect command.
This helps user to print the inspect output in go template format.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
1dde2730e8 filter option added to network ls command.
filter option helps to filter output based on name or supported plugins
by CNI networks.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
4eee0d840f Merge pull request #6177 from baude/v2enableremote
v2 enable remote integration tests
2020-05-20 01:45:00 +02:00
35829854a2 Fix mountpont in SecretMountsWithUIDGID
In FIPS Mode we expect to work off of the Mountpath not the Rundir path.
This is causing FIPS Mode checks to fail.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-19 16:33:24 -04:00
e0a0d2fb07 Update troubleshoot page
Add information about podman with SELinux and using container_init_t.

Add informantion about Centos7 as well as RHEL7 init containers not working
on a cgroups V2 system.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-19 15:34:45 -04:00
8ec08a426e v2 enable remote integration tests
enable remote integration tests

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-19 14:26:19 -05:00
9f07eff1a4 Get MAC, Windows and Linux podman-remote from latest version links.
The links to latest windows and MAC versions are broken, and snapd version is i
out of date. Users should just go to release and grab packages from there.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-19 08:59:14 -04:00
0f8ad03923 Merge pull request #6266 from mheon/bump-2.0.0-rc1
Bump to v2.0.0-RC1
2020-05-18 22:22:01 +02:00