742 Commits

Author SHA1 Message Date
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
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
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
191da318cb Merge pull request #616 from mheon/bump_0_4_2
Bump to v0.4.2
2018-04-13 14:51:18 -04:00
df9ebb024d Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-13 14:51:23 -04:00
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
f740ee0ba6 Bump to v0.4.2
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.4.2
2018-04-13 14:49:45 -04:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
fbc9d189b1 Merge pull request #595 from mheon/bump_0_4_1
Bump to v0.4.1
2018-04-05 13:11:02 -04:00
782cf60ebb Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-05 13:10:29 -04:00
e6011be325 Bump to v0.4.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-05 13:09:57 -04:00
b51d32703f Bump to v0.4.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.4.1
2018-04-05 13:08:53 -04:00
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
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
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
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
35a10c9ba5 Only allocate tty when -t
In our ezrly development, we always allocated a tty when not -d.  Now we should only allocated when the user asks for it.

Resolves: #573

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

Closes: #574
Approved by: rhatdan
2018-04-03 22:23:23 +00:00
b1a8d769b8 Stopping a stopped container should not be an error
Resolves: #575

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

Closes: #588
Approved by: mheon
2018-04-03 18:37:41 +00:00
4640e79667 Add conmon-pidfile flag to bash completions/manpages
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #584
Approved by: rhatdan
2018-04-03 17:13:43 +00:00
6fab1c1b78 --entrypoint= should delete existing entrypoint
Resolves: #572

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

Closes: #585
Approved by: mheon
2018-04-03 15:19:30 +00:00
750f000e7c Fix golint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
f64c1f106c Remove explicit Init() calls in run and start
We no longer require an explicit Init() to start a container, as
Start() will now call Init() if the container is not initialized.
Remove explicit Init() invocations from run and start to help
with dependency ordering - less time for a dependency to go down
before we start.

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

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
98b19aeb0c Refactor dependency checks from init() into public API
Instead of checking during init(), which could result in major
locking issues when used with pods, make our dependency checks in
the public API instead. This avoids doing them when we start pods
(where, because of the dependency graph, we can reasonably say
all dependencies are up before we start a container).

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

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
4d4646d09b Do not require Init() before Start()
This will help dependency races

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

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
489d977b22 Ensure dependencies are running before initializing containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
0fb38659b7 Add container dependencies to Inspect output
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
a1c0f18bca Add backend code for generic dependencies
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #577
Approved by: rhatdan
2018-04-03 14:57:16 +00:00
838df4eec4 Vendor in latest containers/image
Some more features.
    docker-archive generates docker legacy compatible images
    Do not create $DiffID subdirectories for layers with no configs
    Ensure the layer IDs in legacy docker/tarfile metadata are unique
    docker-archive: repeated layers are symlinked in the tar file
    sysregistries: remove all trailing slashes
    Improve docker/* error messages
    Fix failure to make auth directory
    Create a new slice in Schema1.UpdateLayerInfos
    Drop unused storageImageDestination.{image,systemContext}
    Load a *storage.Image only once in storageImageSource
    Support gzip for docker-archive files
    Remove .tar extension from blob and config file names
    ostree, src: support copy of compressed layers
    ostree: re-pull layer if it misses uncompressed_digest|uncompressed_size
    image: fix docker schema v1 -> OCI conversion
    Add /etc/containers/certs.d as default certs directory

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

Closes: #569
Approved by: mheon
2018-04-03 14:48:52 +00:00
f41dc0b258 Makefile: Fix typo podmon -> podman
This typo was introduced in 3aa63b2b

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

Closes: #578
Approved by: rhatdan
2018-04-02 20:16:06 +00:00
94301bab8f Correct a godoc comment
Correct the names of the files in the godoc for
pkg/chrootuser/GetUser().

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

Closes: #579
Approved by: rhatdan
2018-04-02 20:03:17 +00:00
2eb38a0271 Sleep for 5 seconds before pushing to registry in tests
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #576
Approved by: rhatdan
2018-04-02 17:57:28 +00:00