690 Commits

Author SHA1 Message Date
4553f2914c More gracefully handle unexpected storage deletion
We have other tools using containers/storage. They can delete our
containers in c/storage without us knowing. Try and handle this
better by warning instead of erroring when delete our storage and
it is already gone.

This does not handle cases where libpod thinks the container is
mounted, but it is not. This is harder to check for, because
c/storage Mount() and Unmount() take a layer, image, or container
and that complicates our "container no longer exists" question.
Further work is needed here.

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

Closes: #571
Approved by: rhatdan
2018-04-02 14:22:57 +00:00
6b37608260 Remove crictl from Dockerfile
We don't have a CRI API, we'll never use it

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

Closes: #570
Approved by: rhatdan
2018-04-02 12:38:14 +00:00
03ec980dcf Eliminate raceyness of sig-proxy test
Use a socket to coordinate between the test suite and the container and its
script.

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

Closes: #567
Approved by: rhatdan
2018-03-30 09:17:27 +00:00
ae43ce00fe Merge pull request #568 from mheon/bump_0_3_5
Bump to v0.3.5
2018-03-29 13:33:35 -04:00
567902542e Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-29 13:33:09 -04:00
5169e8ce4d Bump version to v0.4.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-29 13:32:22 -04:00
db6bf9e3ad Bump to v0.3.5
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.3.5
2018-03-29 13:31:12 -04:00
1e59053cc5 Allow sha256: prefix for input
We should allow users to pass in image ids with the sha256: prefix
for local images.

Resolves: #493

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

Closes: #560
Approved by: baude
2018-03-29 16:31:43 +00:00
8a96b4acbc Add secrets patch to podman
Adds support for mounting secrets especially on RHEL where the container
can use the host subsription to run yum

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

Closes: #544
Approved by: rhatdan
2018-03-29 14:15:27 +00:00
d0c9835631 Fix tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #557
Approved by: rhatdan
2018-03-29 02:18:45 +00:00
b0526caa93 Remove a loop in container graph
Instead of looping to find containers with no dependencies,
maintain a map of them and remove entries as we add dependency
edges.

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

Closes: #557
Approved by: rhatdan
2018-03-29 02:18:45 +00:00
4ea493d5a1 Only start containers that are not running in pod start
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #557
Approved by: rhatdan
2018-03-29 02:18:45 +00:00
73e13cf688 Change pod Start() to use container dependency graph
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #557
Approved by: rhatdan
2018-03-29 02:18:45 +00:00
b1dfee50e8 Add tests for container graphs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #557
Approved by: rhatdan
2018-03-29 02:18:45 +00:00
120520af34 Initial implementation of container graph generation
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #557
Approved by: rhatdan
2018-03-29 02:18:45 +00:00
471409a5cf Error is already wrapped properly.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #517
Approved by: baude
2018-03-29 01:55:20 +00:00
c54816dfc3 Check for duplicate names when generating new container and pod names.
This fixes the situation where we fail to create a container when a name already exists.

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

Closes: #517
Approved by: baude
2018-03-29 01:55:20 +00:00
f936b745b6 podman: new option --conmon-pidfile=
so that it is possible to use systemd to automatically restart the
container:

[Service]
Type=forking
PIDFile=/run/awesome-service.pid
ExecStart=/usr/bin/podman run --conmon-pidfile=/run/awesome-service.pid --name awesome -d IMAGE /usr/bin/do-something
ExecStopPost=/usr/bin/podman rm awesome
Restart=always

Closes: https://github.com/projectatomic/libpod/issues/534

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #549
Approved by: rhatdan
2018-03-29 01:34:41 +00:00
ecda694a92 Ensure container dependencies are part of the same pod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #558
Approved by: rhatdan
2018-03-29 01:27:40 +00:00
5b6f59e36c Prevent ctrs not in pods from depending on pod ctrs
Containers in pods cannot depend on containers outside of the
same pod. Make the reverse true as well - containers not in pods
cannot depend on containers in pods. This greatly simplifies our
dependency handling, as we can guarantee that removing a pod will
not encounter dependency issues.

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

Closes: #558
Approved by: rhatdan
2018-03-29 01:27:40 +00:00
196c3ab3a5 Disable --sig-proxy tests due to race conditions
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #564
Approved by: rhatdan
2018-03-28 23:29:45 +00:00
9aba605dde Remove dependency on kubernetes
podman parse and attach were using a very small portion of the kubernetes code
but using it caused a signficant increase in binary size.

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

Closes: #559
Approved by: rhatdan
2018-03-27 21:55:33 +00:00
af64e10400 Vendor in lots of kubernetes stuff to shrink image size
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #554
Approved by: mheon
2018-03-27 18:09:12 +00:00
26d7e3c7b8 Fix some minor issues lint has been picking up
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #556
Approved by: baude
2018-03-27 14:46:17 +00:00
304bf53c28 cmd/podman/run.go: Error nicely when no image found
When no image is found, display a useful error message. Also, in imageToRef
protect against a nil image being passed.

Resolves: #553

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

Closes: #555
Approved by: mheon
2018-03-27 00:17:55 +00:00
a3156da21c podman exec should handle options --env foo
If the user does not specify foo=bar, then the exec code should
look for the foo environment variable in its environment and pass it
in.  This is the way podman run works.

Also added tests to make sure this all works.

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

Closes: #552
Approved by: mheon
2018-03-26 23:27:00 +00:00
b18f089545 Remove current SQLite DB driver
The SQLite DB backend has become an unmanageable nightmare. I
like having the option for DB work, but it's become an active
hindrance to further development, and it's definitely not in any
shape to be actively used.

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

Closes: #548
Approved by: baude
2018-03-26 20:18:24 +00:00
f2894f243b Update containers/storage to pick up overlay driver fix
New pinned commit is ff8a6d2bf496daf46ab1a153f783a0f6b8762a54

This includes a fix to error reporting with overlayfs, and will
produce more verbose errors when initializing overlayfs fails.

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

Closes: #546
Approved by: baude
2018-03-26 16:21:10 +00:00
1d4f40bd1a First tag, untag THEN reload the image
Signed-off-by: baude <bbaude@redhat.com>

Closes: #543
Approved by: mheon
2018-03-26 14:54:10 +00:00
7d4f82c020 Add files section to podman man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #536
Approved by: TomSweeneyRedHat
2018-03-26 12:03:20 +00:00
684eb8fbfc Merge pull request #542 from mheon/bump_0_3_4
Bump to v0.3.4
2018-03-23 14:00:57 -04:00
6a0282a609 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-23 14:00:15 -04:00
1554fe18ee Bump version to v0.3.5-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-23 14:00:15 -04:00
57b403eda1 Bump version to v0.3.4
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.3.4
2018-03-23 14:00:09 -04:00
3f5da4d0dd Make container env variable conditional
Add only when it's not already present.

Add a more specific version in podman spec generation
so we get 'container=podman' not 'container=libpod'

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

Closes: #540
Approved by: baude
2018-03-23 17:28:09 +00:00
f7c8dd5836 Stage 4 Image cleanup
Cull funcs from runtime_img.go which are no longer needed.  Also, fix any remaining
spots that use the old image technique.

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

Closes: #532
Approved by: mheon
2018-03-23 15:35:37 +00:00
8ca3bcc85d Add CONTAINER environment variable
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #533
Approved by: baude
2018-03-23 15:22:01 +00:00
c1ff034a6c Small manpage reword
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #533
Approved by: baude
2018-03-23 15:22:01 +00:00
5fc5b4eacb Document .containerenv in manpages. Move it to /run.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #533
Approved by: baude
2018-03-23 15:22:01 +00:00
75f9fdf21c Add .containerenv file
This will allow programs to easily identify they are running in a
container

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

Closes: #533
Approved by: baude
2018-03-23 15:22:01 +00:00
6cf7ddbcfa Add script to determine dependency sizes
export GOPATH=/foo
sh contrib/script/size.sh

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

Closes: #535
Approved by: baude
2018-03-23 14:12:14 +00:00
c55e371365 If cidfile exists, do not proceed
Both podman run and create have an option to write the container ID to a file. The option
is called cidfile.  If the cidfile exists, we should not create or run a container but rather
output a sensical error message.

Resolves: #530

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

Closes: #531
Approved by: rhatdan
2018-03-23 12:49:39 +00:00
d364d41e1b Removing tagged images change in behavior
An image name is really just a tag.  When an image has multiple tags, we should be
able to "delete" the one of its tags without harm. In this case, the "delete' is
really a form of Untag (removing the tag from the image).

If an image has multiple tags and the user tries to delete by ID without force, this
should be denied because when you delete by ID there is no distinguishing it like
image tags.

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

Closes: #528
Approved by: mheon
2018-03-22 19:06:51 +00:00
2cc51dbb1c Use podman to test podman on FAH
Signed-off-by: baude <bbaude@redhat.com>

Closes: #524
Approved by: baude
2018-03-22 13:47:28 +00:00
d0835493d5 Migrate podman inspect and tag to image library
Signed-off-by: baude <bbaude@redhat.com>

Closes: #525
Approved by: baude
2018-03-21 19:14:50 +00:00
3428de0672 Migrate podman images to image library
Signed-off-by: baude <bbaude@redhat.com>

Closes: #523
Approved by: mheon
2018-03-21 16:20:14 +00:00
64416f14be Merge pull request #515 from vrothberg/make-changelog
Makefile: add changelog target
2018-03-21 10:58:06 -04:00
9416e2d784 Makefile: add changelog target
Maintaining a changelog for each new version or release of Podman helps
users to quickly skim for new changes.  Add a `make changelog` target to
facilitate creating a new log.

There are two env variables to control the base and target commit for
the new log.  The output gets prepended to the changelog.txt file, which
is a textfile in following format:
- Changelog for $(CHANGELOG_TARGET) (ISO-8601 DATE):
  * Commit subject
  * Commit subject...

Notice that the list of commit subjects excludes merge commits, and can
be manually modified after generation if needed.

`CHANGELOG_BASE=v0.3.2 CHANGELOG_TARGET=v0.3.3 make changelog` would
generate the following shortened output to the changelog.txt file:

Changelog for v0.3.3 (2018-03-17):
  * Bump to v0.3.3
  * Fix build after c/image changes
  * Update containers/image
  * Fix E2E tests
  * Address review comments
  * Fix E2E tests
  * Add restart to main podman manpage
  * Add podman restart to podman bash completions and commands

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-03-21 13:44:35 +01:00
38a1b2f16d Image library stage 4 - create and commit
Migrate the podman create and commit subcommandis to leverage the images library.  I also had
to migrate the cmd/ portions of run and rmi.

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

Closes: #498
Approved by: mheon
2018-03-20 16:20:12 +00:00
ecfa321288 Add 'podman restart' asciinema
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #512
Approved by: rhatdan
2018-03-17 10:06:11 +00:00