Commit graph

757 commits

Author SHA1 Message Date
Matthew Heon 46b0e1bb27 Small logic fix for podman pull with tls-verify
Ensure we don't force TLS verification when --tls-verify is set
to false.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #636
Approved by: rhatdan
2018-04-18 15:53:30 +00:00
baude 95f272a0c5 Allow podman start to attach to a running container
If a container is already running, and a user asks to start it -a (attach), we should
honor this and attach to the container.

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

Closes: #634
Approved by: baude
2018-04-18 14:44:51 +00:00
baude 313e5e83e9 regression: tls verify should be set on registries.conf if insecure
In the case where podman needs to pull an image, if that registry that the image
resides on is known to be insesure (as defined in /etc/containers/registries.conf),
tls-verify should be altered on the fly.

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

Closes: #626
Approved by: mheon
2018-04-18 14:07:59 +00:00
Nathan Williams 982927468c ip validation game too strong
Signed-off-by: Nathan Williams <nath.e.will@gmail.com>

Closes: #635
Approved by: rhatdan
2018-04-18 10:58:24 +00:00
Nathan Williams 94f20cdd00 - reverse host field order (ip goes first)
- fix host string split to permit IPv6

Signed-off-by: Nathan Williams <nath.e.will@gmail.com>

Closes: #635
Approved by: rhatdan
2018-04-18 10:58:24 +00:00
Matthew Heon 96d11622c6 Allow podman to exit exit codes of removed containers
We can read the exit file created by conmon to get the exit code
instead of querying libpod.

Also, do not error on cleanup if the container is already gone,
as a completely removed container is definitely cleaned up.

Resolves: #527

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #632
Approved by: rhatdan
2018-04-17 16:00:34 +00:00
umohnani8 6449704232 Modify diff and inspect docs
Format the examples in podman-diff.md better.
The description for --type in the inspect docs was slightly different
from that in the inline help.
Also stated what values to use in the Go template for the --format flag.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #620
Approved by: mheon
2018-04-17 14:49:47 +00:00
Daniel J Walsh 18b9f2bd10
Merge pull request #566 from ypu/push_test
Add several podman push tests
2018-04-17 03:41:56 -04:00
baude 63facbec15 Add oci-systemd-hook as a runtime dep to copr spec
Signed-off-by: baude <bbaude@redhat.com>

Closes: #623
Approved by: rhatdan
2018-04-16 20:49:23 +00:00
baude 474d95e5a4 validate dns-search values prior to creation
Signed-off-by: baude <bbaude@redhat.com>

Closes: #628
Approved by: baude
2018-04-16 20:25:24 +00:00
TomSweeneyRedHat 6c5ebb0315 Change container.locked to batched
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #619
Approved by: mheon
2018-04-16 15:18:38 +00:00
Yiqiao Pu f1a4867bcd Add a function for check if command exist
Use this function to check if command exist before execute it
in our test.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-04-16 10:55:29 +08:00
Yiqiao Pu d6d7edb841 Add WaitContainerReady for wait for docker registry ready
Sometime podman push local registry still failed caused by the
docker registry is not start yet after sleep 5s in the test.
So add this function to check the container status by its output
and skip the test when the docker registry can not start normally
instead of failed the case.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-04-16 10:55:21 +08:00
Yiqiao Pu 0fe0c79dc9 Add several podman push tests
Add five tests for podman push tests:
- push to docker with authorization
- push to docker-archive
- push to docker-daemon
- push to oci-archive
- push to ostree

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-04-16 10:55:11 +08:00
baude fa8442e4a0 podman pull should always try to pull
In the case where you have an image local, if the the user runs
podman pull, we should always attempt to pull an updated image.

Added a forceRemote bool to New (image) so we can differentiate
between "pull" or run because the actions differ.  Run does not
need to pull the latest -- only run.

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

Closes: #618
Approved by: baude
2018-04-14 23:55:24 +00:00
baude 62b59df053 Allow the use of -i/-a on any container
We used to not allow the use of -a/-i on containers that were not
started with -i or a tty.  Given the improvements in our terminal
handling, this should work now.

This also fixes a systemic problem with the autotests.

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

Closes: #617
Approved by: baude
2018-04-14 13:48:35 +00:00
umohnani8 9aafc25a3d Fix secrets patch
The secrets code was just tarring and copying the contents of the secrets directory on host as is.
This meant it was not accounting for any symlinks inside the directory, leading up to the contents
not being copied over.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #611
Approved by: mheon
2018-04-13 21:25:15 +00:00
umohnani8 ac910c7aa8 Remove demos.sh file from test
I must have accidentally added this extra file in one of my older PRs.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #611
Approved by: mheon
2018-04-13 21:25:15 +00:00
Matthew Heon 191da318cb
Merge pull request #616 from mheon/bump_0_4_2
Bump to v0.4.2
2018-04-13 14:51:18 -04:00
Matthew Heon df9ebb024d Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-13 14:51:23 -04:00
Matthew Heon 905e075150 Bump version to v0.4.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-13 14:50:29 -04:00
Matthew Heon f740ee0ba6 Bump to v0.4.2
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-13 14:49:45 -04:00
Matthew Heon 8265294d78 Fix podman run --attach tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 39b2295e3e Fix another comparison of a Go interface against nil
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 2961c9e293 Allowing attaching stdin to non-interactive containers
Mimics docker's behavior

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 5eb9ebcf59 Add tests for podman attach
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 8d7635b1ac Change attach to accept a struct containing streams
Comparing Go interfaces, like io.Reader, to nil does not work. As
such, we need to include a bool with each stream telling whether
to attach to it.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 6609d555f7 Fix terminal attach
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 5e03cec7ec Changes to attach to enable per-stream attaching
This allows us to attach to attach to just stdout or stderr or
stdin, or any combination of these.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon b8394600d8 HACK temporary fix for test suite
We leak open files when creating new c/storage stores (locks do
not close themselves, so the open FDs in the test suite increase
every time we use c/storage to load cached images for the tests).
Fix this temporarily by increasing rlimits on open files until we
can create a permanent fix next release.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #615
Approved by: baude
2018-04-13 17:51:27 +00:00
Matthew Heon 4b25039cf4 Fix locking interaction in batched Exec() on container
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #610
Approved by: giuseppe
2018-04-13 16:36:09 +00:00
Matthew Heon ec90d6f4cc Fix leaking files in Ginkgo
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #612
Approved by: rhatdan
2018-04-13 04:24:28 +00:00
Nalin Dahyabhai 6f51a5b2f9 Force host UID/GID mapping when creating containers
Until we can handle running containers which use UID/GID mappings, make
sure that we always create containers that use the host mappings.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #609
Approved by: baude
2018-04-12 15:24:46 +00:00
Matthew Heon 49f9397217 Do not lock all containers during pod kill
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #600
Approved by: rhatdan
2018-04-12 03:48:40 +00:00
Matthew Heon 8b67fbb3f2 Make pod stop lock one container at a time
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #600
Approved by: rhatdan
2018-04-12 03:48:40 +00:00
Matthew Heon 542f8fe98d Do not lock all containers during pod start
This solves a nasty locking issue with getting the path of
namespaces for dependencies

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #600
Approved by: rhatdan
2018-04-12 03:48:40 +00:00
baude 77a1665c05 Containers transitioning to stop should not break stats
When a container is transitioning from running to stopped and stats is runnings,
we should not break stats if we are unable to get stats for that container.

Resolves: #598

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

Closes: #599
Approved by: mheon
2018-04-11 18:35:37 +00:00
baude 22c00ceebb Add -i to exec for compatibility reasons
No change to functionality

Issue: #606

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

Closes: #607
Approved by: rhatdan
2018-04-11 15:02:50 +00:00
Boaz Shuster 864b9c06c0 Unescape characters in inspect JSON format output
This patch changes the way the inspect command output is displayed
on the screen when the format is set to JSON.

Note: if the output is redirected to a file the output is *not*
escaped.

For example, before this commit if you run:
$ sudo podman inspect --format "json" daveimg
[
   {
   ...
      "Author": "Dave \u003cdave@corp.io\u003e",
   }
   ...
]

with this patch the output will be:
[
   {
   ...
      "Author": "Dave <dave@corp.io>",
   }
   ...
]

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>

Closes: #602
Approved by: mheon
2018-04-10 14:05:25 +00:00
baude 1700f2b238 Use buildah commit for podman commit
Resolves: #586 and #520
Signed-off-by: baude <bbaude@redhat.com>

Closes: #592
Approved by: mheon
2018-04-10 13:31:59 +00:00
umohnani8 998fd2ece0 Functionality changes to the following flags
--group-add
	--blkio-weight-device
	--device-read-bps
	--device-write-bps
	--device-read-iops
	--device-write-iops

--group-add now supports group names as well as the gid associated with them.
All the --device flags work now with moderate changes to the code to support both
bps and iops.
Added tests for all the flags.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #590
Approved by: mheon
2018-04-06 00:09:46 +00:00
Daniel J Walsh c3e2b00333 Vendor in latest containers/storage and containers/image
Containers/storage brings in support for UserNS ID Mappings
This means we can start experimenting with User NS Support in
podman

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

Closes: #596
Approved by: TomSweeneyRedHat
2018-04-05 21:21:08 +00:00
Matthew Heon fbc9d189b1
Merge pull request #595 from mheon/bump_0_4_1
Bump to v0.4.1
2018-04-05 13:11:02 -04:00
Matthew Heon 782cf60ebb Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-05 13:10:29 -04:00
Matthew Heon e6011be325 Bump to v0.4.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-05 13:09:57 -04:00
Matthew Heon b51d32703f Bump to v0.4.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-05 13:08:53 -04:00
TomSweeneyRedHat 54bd0ae716 Remove image via storage if a buildah container is associated
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #522
Approved by: mheon
2018-04-05 15:44:11 +00:00
Daniel J Walsh fdcf633a33 Add hooks support to podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #155
Approved by: mheon
2018-04-05 14:13:49 +00:00
baude ca3b241451 Run images with no names
When an image name has no reponames, you should still be able to run it
by ID.  When doing so, imageName needs to be set to "" so we don't hit an index
out of range error

Resolves: #587

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

Closes: #593
Approved by: mheon
2018-04-04 17:51:33 +00:00
Matthew Heon eb0d5dfff1 Prevent a potential race when stopping containers
If sending a signal fails, check if the container is alive. If it
is not, it probably stopped on its own before we could send the
signal, so don't error out.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #591
Approved by: rhatdan
2018-04-04 01:09:23 +00:00