Commit graph

355 commits

Author SHA1 Message Date
baude f080ba846d prepare for move to validate on 1.11 only
Signed-off-by: baude <bbaude@redhat.com>
2018-12-19 13:43:09 -06:00
Kunal Kushwaha 658f772c16 perf test a stress test to profile CPU load of podman
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-12-19 16:05:21 +09:00
OpenShift Merge Robot 51d80ed01b
Merge pull request #2022 from baude/flakeflake
all flakes must die
2018-12-18 11:16:09 -08:00
baude 8e62d0120e all flakes must die
when cleaning up after a test, don't fail if cleanup doesn't run
perfectly.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-18 12:43:49 -06:00
Chris Evich 4bf7c4b62b
Cirrus: One IRC notice only
The podbot messages are becoming obnoxious as more distributions are
tested.  Only call the `success.sh` script once, after all testing was
successful.  Also make update the message to include more helpful text
and url.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-18 09:16:05 -05:00
Daniel J Walsh 68414c5ee3
Merge pull request #2010 from cevich/cirrus_editors
Cirrus: Add text editors to cache-images
2018-12-17 15:55:03 -05:00
Chris Evich 7b53e86e4f
Add script to create CI VMs for debugging
Frequently debugging of CI-related problems requires going hands-on
within the environment.  However, reproducing the environment by hand is
very tedious and error prone.  This script permits authorized users to
produce VM's based on any available cache-image, and automatically remove
them upon logout.

Also: Bump up VM disk sizes to 200GB due to performance reasons

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 14:34:43 -05:00
Chris Evich a1a5f3ba51
Cirrus: Migrate PAPR testing of F28 to Cirrus
Since the most recent TWO versions of Fedora are officially supported
upstream, both need to be tested.  Implement the concept of a 'prior'
Fedora release in both base-image and cache-image production.  Utilize
the produced cache-image to test libpod.  Remove F28 testing from PAPR.

Much thanks to @baude @giuseppe for help with this.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:19:41 -05:00
Chris Evich 401fb2bf2f
Cirrus: Add text editors to cache-images
Occasionally people need to access the VM's for
troubleshooting/debugging.  Having an editor pre-installed makes life
easier and doesn't cost any extra test-time.

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 10:51:39 -05:00
Chris Evich d038497b09
Fix documentation links and flow
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-12 10:56:18 -05:00
Chris Evich ac7ddc189e
Cirrus: Update base-image build docs
Mostly minor tweaks and clarifications.  Though there was
one missing (required) make value I fixed.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-10 16:03:37 -05:00
OpenShift Merge Robot d266460f7b
Merge pull request #1893 from jwhonce/bug/1869
Refactor CLI booleans to be consistent and defined behavior
2018-12-07 08:31:55 -08:00
OpenShift Merge Robot d4af59d57c
Merge pull request #1788 from cevich/cirrus_base_images
Codify and document base-image production + Enable testing with Fedora
2018-12-07 07:46:46 -08:00
Matthew Heon ae35efb432 Bump to v0.12.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-06 17:33:10 -05:00
Matthew Heon 7ba215f759 Bump to v0.12.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-06 17:33:06 -05:00
Chris Evich cb900798ce
Cirrus: Document and codify base-image production
A number of images required for future testing are not present in GCE.
Importing them is a long proscribed process prone to errors and
complications.

Improve this situation by documenting, and encoding the majority of the
steps required.  Due to the required complexity, these are clearly
identified as 'semi-automated'.  This means a discerning eye is
sometimes needed to address unforeseen problems (networking issues,
format or packaging changes, etc).

Nevertheless, having these steps in writing, will reduce current and
future  maintenance burden while supporting future testing needs of
RHEL, Fedora and Fedora Atomic Host.

Also:

* Add necessary configuration, scripts, and Makefile updates needed to
  prepare RHEL, Fedora, & FAH cloud images for use in GCE.  This
  is a complex, multi-step process where the cloud image is booted
  un a local user-mod qemu-kvm instance, where it can be modified.
  From there, it's converted into a specific format, and imported into
  GCE.  Lastly, the imported raw disk data is made available as a GCE
  VM image.

  Note: As of this commit, the RHEL base-image builds (CentOS has native
  image), however neither RHEL or CentOS cache-images build correctly.

* Left testing on FAH disabled, the GCE/Cirrus integration needs needs more
  work.  Specifically, the python3-based google startup script service
  throws a permission-denied (as root) when trying to create a temp.
  directory.  Did not investigate further, though manually running the
  startup script does allow the libpod tests to start running.

* Enabled Fedora 29 image to execute tests and general use.

* Utilize the standardized F28-based container image  for gating
  of more the intensive unit and integration testing.  Update
  documentation to reflect this as the standard platform for
  these checks.  Rename tasks with shorter names and to better
  reflect their purpose.

* Cirrus: Trim unnecessary env vars before testing since the vast
  majority are only required for orchestration purposes.  Since most
  are defined within `.cirrus.yml`, it's a good place to store the
  list of undesirables.  Since each of the cirrus-scripts runs in
  it's own shell, unsetting these near the end will have no
  consequence.  Also trim down the number of calls to show_env_vars()

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
Chris Evich 8d7fdc7d79
Cirrus: Use Makefile for image-building
The packer tool takes JSON as input for the details of producing VM
images to be used for PR CI-testing.  JSON is not a very human-friendly
format, without support for comments and frequently containing lots of
duplicate data.

Fix this by using a Makefile + simple python one-liner to convert
from a human-friendly YAML format into packer-native JSON.  This allows
use of anchors/aliases to reduce duplication, and allows inline comments
for easier maintainability.  This also allows separating the 'test'
action from the 'build' action, for earlier and better syntax problem
detection.

Lastly, there are some minor ``lib.sh`` and ``integration_test.sh``
updates to support future work, and slightly improve the build and
test environments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
Jhon Honce c60489da47 Refactor BooleanAction to mimic golang interface
* Change all store_true or store_false to use store_bool.
  New behavior documented in BooleanAction docstring.
* Remove any extraneous code identified by pylint in files from above.

Fixes #1869

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-12-05 15:43:08 -07:00
Jhon Honce 7c7231ce01 Invert tlsverify default in API
Fixes #1929

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-12-05 15:42:33 -07:00
OpenShift Merge Robot 480a179f01
Merge pull request #1894 from jwhonce/bug/1876
Only include container SizeRootFs when requested
2018-12-04 08:16:15 -08:00
Giuseppe Scrivano deeb3eaf7d
tests: always install runc on Ubuntu
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-01 06:46:24 +01:00
Giuseppe Scrivano 2842b8ad40
cirrus: make apt noninteractive
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-30 22:45:56 +01:00
Jhon Honce 57f7b79400 Only include container SizeRootFs when requested
* API always returns value, so we remove it if not asked for

Fixes #1876

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-28 15:44:46 -07:00
Ed Santiago 3d0cdd898c pypod create/run: ignore args for container command
Don't try to argparse command-line arguments on the right-hand
side of the image; those are intended for the container command:

   pypodman create fedora ls -l
   pypodman run fedora find / -name foo
   pypodman run fedora bash -c 'echo hi'

If/when `pypodman exec` gets implemented, it should use this too.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2018-11-28 11:27:52 -07:00
OpenShift Merge Robot d3bc70d5d0
Merge pull request #1851 from jwhonce/wip/cmd
Add support for --all in pypodman ps command
2018-11-28 09:27:11 -08:00
OpenShift Merge Robot 88c23b0632
Merge pull request #1885 from edsantiago/split_token_none
_split_token(): handle None
2018-11-28 08:57:21 -08:00
Jhon Honce 2a6b683673 Add support for --all in pypodman ps command
* Updated field widths to match changes in go code

Fixes #1654

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-28 08:59:28 -07:00
Jhon Honce f8c5e75a10 Fixes #1867
* Some items included in the CLI and currently not supported by the API.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-28 08:56:24 -07:00
Ed Santiago 8b2affbd5b _split_token(): handle None
The conditional + list comprehension in images.py:_split_token()
wasn't quite working as intended; in particular, when fed None,
it chokes with

    TypeError: 'NoneType' object is not iterable

This is the correct behavior: comprehensions iterate first,
then apply the conditional.

Solution: special-case None, and remove the now-unnecessary
conditional.

Context: seen when trying 'pypodman run' against
docker.io/stackbrew/centos:7, which has no .ContainerConfig.Eng

Signed-off-by: Ed Santiago <santiago@redhat.com>
2018-11-27 16:13:36 -07:00
Anders F Björklund f84452f411 Actually set version for podman module / pypodman
The environment variable wasn't set, giving 0.0.0

It is a still a problem if you use python3 to build,
rather than make. You *need* to set $PODMAN_VERSION,
or your module and packages won't have the version.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-11-25 13:50:19 +01:00
Jhon Honce e955ff04ab Improve speed of containers.list()
* Clean up code in containers.py
* Pass pylint tests
* Pass tox tests

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-19 15:39:45 -07:00
OpenShift Merge Robot ea928f2de6
Merge pull request #1824 from afbjorklund/pypodman_user
pypodman: Don't use $HOST and $USER variables for remote
2018-11-19 08:45:06 -08:00
OpenShift Merge Robot 4eecc8cf70
Merge pull request #1823 from jwhonce/wip/cmd
Implement pypodman start command
2018-11-19 07:49:40 -08:00
OpenShift Merge Robot 47ffaae840
Merge pull request #1780 from cevich/un-magic
Reveal magic, parallel system-testing and system-testing simplification
2018-11-19 05:14:30 -08:00
Anders F Björklund 4adc69f4f9 Don't use $HOST and $USER variables for remote
Also, don't use $PORT. These are too generic.

Make sure to read $LOGNAME _after_ the config.

Prefix all the remote variables with PODMAN_

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-11-18 17:37:14 +01:00
Jhon Honce 0d21b90016 Implement pypodman start command
* Improve error messages from argparse Actions
* Silence more pylint errors when supporting a given API
* Refactor BooleanAction to support lower and mixed case input
* Remove spurious print()

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-16 14:57:17 -07:00
Daniel J Walsh dba45a13c0
Add version command to pypodman
pypodman does not currently support the version command.  We want to
have as close to the same functionality between podman and pypodman,
so adding this command.

Also had to fix some validate errors.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-15 20:15:52 -05:00
Chris Evich 8b3fcb374b
Cirrus: Add documentation for system-testing
***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
Chris Evich 2cc9b78ab9
Cirrus: Simplify optional system-test script
Previously it was required to call the verify, unit, and integration
scripts in order to build/install dependencies, and libpod.  This
wastes time during the (optional) system-testing, since the
actual unit/integration testing is also happening in parallel.

Consolidate only the distribution-specific build steps into the
system-testing script.  This way, only the required steps are performed
in their respective (parallel) tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
Chris Evich aa742e9e68
Cirrus: Reveal magic, parallel system-testing
Previously, several magic strings were in place to affect cirrus-ci
operations.  Two were buried within scripts.  One to optionally
execute system-tests within a PR. Another to avoid re-building
cache-images upon every merge.

Move these magic strings out into the open, buy locating their
logic up-front in the ``.cirrus.yml`` file.  This improves
readability and reduces surprise/astonishment at runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
OpenShift Merge Robot dd42c1dcff
Merge pull request #1804 from cevich/lint_verify_image
Standardized container image for gofmt and lint
2018-11-13 09:03:10 -08:00
Chris Evich 86d1196f9b
Standardized container image for gofmt and lint
Having a standardized image allows uniform application of format and
lint checking across multiple host platforms.  This ensures all
contributors and disparate CI systems to play by a common set of basic
rules.  It also makes it easier to maintain the common rules over-time.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 07:55:07 -05:00
Daniel J Walsh e2013b4ff4
Cleanup podman spec to not show git checkout is dirty
Currently we modify the git checkout which ends up showing that the checkout is dirty.  This patch sets the PYTHON_VERSION so that python code will handle
it correctly without having to modify the actual code.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-12 17:09:01 -05:00
OpenShift Merge Robot ada55ab7e0
Merge pull request #1784 from cevich/cirrus_ignore_irc
Cirrus: Ignore any error from the IRC messenger
2018-11-08 18:06:38 -08:00
Matthew Heon acb974f682 Bump to v0.11.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-08 14:09:03 -05:00
Matthew Heon a4adfe5e0c Bump to v0.11.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-08 14:08:59 -05:00
Chris Evich 916a3ba9d1
Cirrus: Ignore any error from the IRC messenger
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-08 13:51:36 -05:00
OpenShift Merge Robot 48914d67ae
Merge pull request #1762 from mheon/fix_python_tests
Temporarily fix the Python tests to fix some PRs
2018-11-07 08:23:49 -08:00
OpenShift Merge Robot 81cef49144
Merge pull request #1616 from cevich/cirrus_add_systemtest
Cirrus-CI: Add option to run system-tests
2018-11-07 08:06:07 -08:00
Matthew Heon fa76b86e3e Temporarily fix the Python tests to fix some PRs
The Python podman bindings have issues around kill - specifically
attempting to make it act like stop, when it should not. We
provide no guarantee of what state a container if in after kill -
it should be stopped, but we might have sent something that's not
SIGKILL. If you want a container or pod stopped, guaranteed, use
Stop().

The Python code attempted to ensure a container was actually
stopped after kill was run, which runs counter the above. This
was holding up some PRs that caused changes in how libpod obtains
its state, so for now, change pod kill to pod stop until the
proper changes in the Python code can be made.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 09:46:44 -05:00
OpenShift Merge Robot 76360d9a6e
Merge pull request #1743 from jwhonce/issue/1702
Add ChangeAction to parse sub-options from --change
2018-11-05 04:50:16 -08:00
Jhon Honce 573e21f8a0 Fix long image name handling
* Fixed issue where podman printed '<none>' and pypodman
  skipped the image
* Fixed issue where port was printed in place of tags

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-01 11:36:46 -07:00
Jhon Honce a4c0cdedb9 Add ChangeAction to parse sub-options from --change
* Covers both commit and import commands
* Cleaned up export command
* Removed unneeded calls to super().__init__()

Fixes #1702

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-01 10:32:39 -07:00
OpenShift Merge Robot 17716d787a
Merge pull request #1624 from cevich/update_fedora
Cirrus: Enable updating F28 image
2018-11-01 10:23:27 -07:00
OpenShift Merge Robot 7772350f52
Merge pull request #1603 from cevich/fix_cirrus_image_build
Fix Cirrus/Packer VM image building
2018-11-01 10:23:17 -07:00
Jhon Honce 0f232037f6 Change humanize to use MB vs MiB.
Fixes #1653

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-01 07:39:35 -07:00
Chris Evich 989affa2dd
Cirrus-CI: Add option to run system-tests
Normally, we would not run system-tests as part of PR-level CI, they're
simply too heavy-weight and complex.  However, in some instances it may
be desirable to provide a quick feedback loop, prior to release packaging
and official testing.  Enable this by executing the system-tests when
a magic string is present in the PR description:

``***CIRRUS: SYSTEM TEST***``

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:50:53 -04:00
Chris Evich 91f398db4c
Cirrus: Skip rebuilding images unless instructed
Given frequent merges, it doesn't make sense to rebuild the VM testing
images every time.  Instead, monitor the PR title and description for
a magic string, only triggering builds on a match:

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
Chris Evich 021ca5780c
Cirrus: Add a readme
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
Chris Evich 4929662c8a
Ubuntu VM image build: try update twice
Occasionally, short-term temporary connectivity problems prevent ubuntu
from updating on GCE.  As a workaround, attempt these commands twice.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:30 -04:00
Chris Evich ed67d302ef
Cirrus: Enable updating F28 image
Previously this was disabled as some package was breaking networking on
GCE after updating + rebooting.  This is fixed now, so we should update
packages when building the fedora test VM image.

https://pagure.io/cloud-sig/issue/292

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:47:43 -04:00
Jhon Honce d62fa127a1 Ensure test container in running state
* Save storage if tests fail

Fixes #1643

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-25 12:20:11 -07:00
Jhon Honce a7ea7e9d5c Downgrade code to support python3.4
* Added tox configuration to test python 3.4, 3.5 and 3.6.
  Tox testing not enabled on every PR
* Updated MANIFEST.ini to support tox
* Correct comments

Fixes #1641

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-23 07:58:48 -07:00
OpenShift Merge Robot 79befd5158
Merge pull request #1648 from cevich/cirrus_podbot
Add simple IRC messenger
2018-10-23 07:41:43 -07:00
Chris Evich 89b5484ad2
Cirrus: Install CRIU in test images
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:09 -04:00
Chris Evich a18494a345
Cirrus: Use different CNI_COMMIT for Fedora
Just noticed this in Dockerfile.Fedora.  Updated all the right
places to make this happen.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:08 -04:00
Chris Evich 02bc3c9962
Fix Cirrus/Packer VM image building
An invalid GCE value is being passed to packer, preventing it from
building VM images.  Fix this, and centralize the definition of the
image name suffix by setting it at ``setup_environment.sh`` call-time,
rather encoding inside packer's `libpod_images.json`.  This makes
the value available for use by other scripts.

Also, switch the unique component of the name, to be based on the
commit-sha being tested.  This will improve traceability, since the git
history is more permanent than the `CIRRUS_BUILD_ID` env. var.  The
later is subject to log-rotation, destroying evidence of the images
source state.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:08 -04:00
Chris Evich 4de69da7bd
Revert "Cirrus: Enable debugging delay on non-zero exit"
This reverts commit b610913ef5.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich 0c17f2010a
Cirrus: IRC message when cirrus testing successful
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich a50410467a
cirrus: Add simple IRC messenger
Add a naive python script that's able to connect to IRC and send a
single line of text to the #podman channel.  Wrap this in a new
library function to ensure nick-name collisions are unlikely.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich b610913ef5
Cirrus: Enable debugging delay on non-zero exit
There have been some python-podman flakes observed across multiple CI
systems.  Support capturing a VM for further investigation in the
event of a non-zero exit.  This is done by printing a warning message
and delaying script-exit for a long time.  Hopefully a human will notice
and have an opportunity to enable deletion-protection on the VM.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-15 09:48:19 -04:00
Giuseppe Scrivano 1f8b844c2b
tests: do not fail in the cleanup phase
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-14 16:52:31 +02:00
Jhon Honce 40cb756801 Add support for pod commands
* Add support for pod -- create, inspect, kill, pause, ps, rm,
  restart, start, stop, top, unpause
* Update pylintrc to better reflect pep8 code standards
* Fix various pylint reported errors
* Refactor code that determines screen width to no longer
  require initializing curses.  Improved start up time and
  pushing data blob down ssh tunnel.
* Correct pod-create man page, cgroupparent not boolean
* Abort integration tests if podman service fails to start

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-12 09:34:23 -07:00
Matthew Heon c260b5aa8c Bump to v0.10.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-11 16:51:28 -04:00
Matthew Heon e4a155328f Bump to v0.10.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-11 16:51:24 -04:00
OpenShift Merge Robot 141a1327fb
Merge pull request #1573 from baude/readdgolang
re-add BR for golang compiler to contrib/spec/podman.spec.in
2018-10-07 00:07:26 -07:00
Chris Evich 52f0547f64
Re-add source-verify in cirrus-ci
Don't waste GCE VM resources for 30-min of testing,
when verify would fail after 3-minutes.  This is
the simpelest mechanism to save cloud CPU-time
while GCE is under trial-status (can not set quotas).

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-05 11:23:21 -04:00
Chris Evich c53163b75a
Add configuration for Cirrus-CI
Testing podman requires exercising on a full-blown VM.  The current
containerized-approach is complicated, and mostly a band-aid over
shortcomings in the other CI systems.  Namely, we want:

* To pre-build environments with dependencies to reduce the
  setup time needed for testing.
* The ability to verify the pre-built environments are working
  before utilizing them for further testing.
* A simple, single set of flexible automation instructions to
  reduce maintenance burden.
* Ease of environment reproduction across clouds or locally, for
  debugging failures.

This change leverages Cirrus-CI + Packer + collection of shell scripts
to realize all of the above.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-04 16:30:48 -04:00
baude c6a6c06435 re-add BR for golang compiler to contrib/spec/podman.spec.in
Signed-off-by: baude <bbaude@redhat.com>
2018-10-04 09:48:22 -05:00
Matthew Heon 978aac6650 Fix python tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-02 14:53:15 -04:00
Jhon Honce ff38edaafe * Update documenation
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-01 07:24:50 -07:00
Jhon Honce 9074565f4e Implement pod varlink bindings
* Update varlink document
* Add NoContainersInPod error in go and python
* Add support for varlink pod interface
* New code passes pylint
* Fix bug in test_runner.sh
* Update integration tests for race condition on status check
* Add missing port config file support

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-01 07:24:50 -07:00
Matthew Heon 9bcf7ce83a
Merge pull request #818 from wking/python-2-clean
Makefile: Call contrib/python's clean regardless of HAS_PYTHON3
2018-09-27 09:42:43 -04:00
baude 4073541981 rework CI tests to test on VMs
This PR makes several key changes to our CI testing.  Firstly, we now test
podman on fedora 28, fedora 29, and centos VMS (rather than containers). Any
of these that having failing tests are not marked as required yet. We
still preserve the podman in podman and podman in docker tests as well and
they are marked as required.

The lint and validate work is now done on a openshift container.  We also
removed the rpm verification on papr and perform this test under the "images"
test on the openshift ci.

This PR exposes integration test fails on some of our OSs.  My expectation is we
will fix those in additional PRs and as they are fixed, we should be flipping
the boolean bit to required.

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

Closes: #1492
Approved by: mheon
2018-09-26 15:47:29 +00:00
Matthew Heon 4e4cd0b5f5 Bump to v0.9.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-21 18:24:27 -04:00
Jhon Honce 785e9ea1fd Updates from reviews
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1519
Approved by: rhatdan
2018-09-21 19:36:01 +00:00
Jhon Honce e6074eb9ac Implement new subcommands
* Refactor create subparser to share arguments with run subparser
* Add argparse.*Action subclasses to reduce duplicate code in parsers
* Using BooleanAction now accept True/False value as expected
* .pylintrc added to loosen variable name policing
* Update AbstractBaseAction to remove unset arguments before
  transmitting to podman service
* Align logging messages to podman output
* Renamed global argument from --user to --username, to avoid conflict
  with create/run podman commands
* Add new subcommands: run, create, history, import, info, push,
  restart and search

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1519
Approved by: rhatdan
2018-09-21 19:36:01 +00:00
Daniel J Walsh fbd1392a46 Don't output inodes created to run a container
There is a group of inodes that get created when running a container
if they do not exist.

containerMounts = map[string]bool{
	"/dev":               true,
	"/etc/hostname":      true,
	"/etc/hosts":         true,
	"/etc/resolv.conf":   true,
	"/proc":              true,
	"/run":               true,
	"/run/.containerenv": true,
	"/run/secrets":       true,
	"/sys":               true,
}

If the destination inode does not exist, libpod/runc will create the inode.
This can cause programs like podman diff to see the image as having changed,
when actually it has not.  This patch ignores changes in these inodes.

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

Closes: #1508
Approved by: giuseppe
2018-09-21 09:45:14 +00:00
Daniel J Walsh 92b28a88d8
Vendor in latest containers/buildah
Switch from projectatomic/buildah to containers/buildah

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-18 17:20:30 -04:00
Matthew Heon fc86a9261a Bump to v0.9.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 18:13:33 -04:00
W. Trevor King 356765aa95 contrib/python/*/Makefile: Fallback to unversioned 'python'
And pull these from the PATH by default.  This way systems like CentOS
that don't have a python3 can still execute 'make clean', which
doesn't care about the Python major version.

The setup.py shebang, mode change, and ./ prefixing helps address
cases where PYTHON is empty.  This could be the result of improper
user configuration:

  $ make PYTHON='' clean

It could also be the state on systems with no Python installed, in
which case you'll see:

  $ make PYTHON='' clean
  ./setup.py clean --all
  /usr/bin/env: 'python': No such file or directory
  make: *** [Makefile:13: clean] Error 127

I've also shifted the Python invocations to the end of the clean
recipies so that as much as possible gets cleaned up even on systems
without Python installed.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-09-13 22:15:22 -07:00
baude 08936c3241 do not build with devicemapper
as of now, we do not want to build with device mapper because it cannot
handle parallel requests which would be common-place in podman.

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

Closes: #1445
Approved by: mheon
2018-09-12 22:21:50 +00:00
Matthew Heon 3904680858 Bump to v0.9.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-07 14:55:16 -04:00
Daniel J Walsh 6f2bd8d795 Change references to cri-o to point at new repository
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1425
Approved by: mheon
2018-09-07 17:47:45 +00:00
Matthew Heon b5495910dc Bump to v0.9.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-31 16:43:58 -04:00
Jhon Honce 6d067fcba2 Turn on test debugging
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1369
Approved by: rhatdan
2018-08-31 16:52:52 +00:00
Jhon Honce 8245f09428 Add support for remote commands
* Add support for commit, export, inspect, kill, logs, mount, pause
  port commands
* Refactored Report class to allow column lengths to be optionally
  driven by data
* Refactored Ps class to truncate image names on the left vs right
* Bug fixes

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1369
Approved by: rhatdan
2018-08-31 16:52:52 +00:00
baude 2caf1a9c33 add conmon to copr spec
For COPR rpms, it is desirable to have conmon built into the podman RPM.  No
code is impacted.

Signed-off-by: baude <bbaude@redhat.com>
2018-08-30 19:18:27 -05:00
baude 9e315518aa Test RPM build and install for regressions
On Fedora and now Centos (added), we build RPMs based on the spec in
contrib/spec to make sure we protect against regressions when creating
RPMs.  Once the RPM is built, we then test actually installing the RPM
to ensure that no deps are missing for install.

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

Closes: #1356
Approved by: rhatdan
2018-08-28 11:53:09 +00:00
Matthew Heon 017e2d3468 Bump to v0.8.5-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-24 17:16:36 -04:00
Lokesh Mandvekar f1b4f43d75 rpm-spec: use skopeo-containers instead of containers-common
skopeo-containers is available everywhere, but not containers-common

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Closes: #1332
Approved by: rhatdan
2018-08-24 12:17:10 +00:00
Lokesh Mandvekar 7310697b73 rpm-spec: update distro-specific dependencies
remove slirp4netns as hard dep as it isn't available on rhel7.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Closes: #1328
Approved by: baude
2018-08-23 15:29:47 +00:00
Jhon Honce 75588a4333 Add retry decorator for flakey tests
* Update doc strings

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1302
Approved by: baude
2018-08-20 21:07:09 +00:00
Jhon Honce 937398abcf Update error message from reviews
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1296
Approved by: rhatdan
2018-08-20 15:26:09 +00:00
Jhon Honce 3bfe07b4f5 Support Attach subcommand in pypodman
* Fix some random error handling

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1296
Approved by: rhatdan
2018-08-20 15:26:09 +00:00
Matthew Heon 4068ec82b8 Bump to v0.8.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-17 15:47:18 -04:00
Jhon Honce 95c7d20142 Add dependency for python3-psutil module
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1290
Approved by: baude
2018-08-17 18:12:11 +00:00
Daniel J Walsh cd73f77414 Fix handling of socket connection refusal.
Currently if the socket was never started you get an error about
the service being started.  But if the service was started and later
stopped, you get a useless error.

This change causes the error to always be the same for connection refused.

The error message was also repeating the address twice which looked bad.

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

Closes: #1287
Approved by: baude
2018-08-17 08:41:19 +00:00
Daniel J Walsh 1b87fbc591
Merge pull request #1271 from vrothberg/recommend-slirp4netns
podman.spec: recommend slirp4netns
2018-08-16 16:58:39 -04:00
Daniel J Walsh d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

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

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
Valentin Rothberg 7855d0ac71 podman.spec: recommend slirp4netns
Fixes: #1234
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-08-16 08:05:27 +02:00
Jhon Honce 3445abd89d Add create and pull commands
* Rename id_ to ident, make non-PEP8'ers happier
* Fix bug where port was required on local connections
* Improve error messages for exceptions

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1246
Approved by: rhatdan
2018-08-14 18:25:51 +00:00
Matthew Heon 7d116f5f73
Merge pull request #1254 from mheon/systemd_cgroups_default
Switch default CGroup manager to systemd
2018-08-11 15:07:29 -04:00
Daniel J Walsh 86410523dc Bump to v0.8.3-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1256
Approved by: rhatdan
2018-08-10 22:27:35 +00:00
Matthew Heon 9c42e84173 Fix python tests again
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 16:18:44 -04:00
Matthew Heon f4d124da93 Fix python tests to use cgroupfs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 15:48:35 -04:00
Matthew Heon ab4f190f41 Force cgroupfs for python tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 14:32:28 -04:00
baude 14b6106c7b enabled copr epel builds again
centos/epel does not understand the Recommends tag

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

Closes: #1231
Approved by: rhatdan
2018-08-08 09:03:08 +00:00
baude 69a741817b Test regressions against the RPM spec file
We need to make sure we dont break the RPM spec files week-to-week.  If we do, the
packagers need to have a place to look at what changes are needed to the SPEC so
they can pull the changes into the distributions.

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

Closes: #1230
Approved by: rhatdan
2018-08-07 20:23:53 +00:00
Daniel J Walsh 7d43e7c451 Pass DESTDIR down to python Makefile
In order to get a cleaner build out of the rpms we should
pass down the DESTDIR to the python Makefiles.  Then we
can use them instead of hard coding other inteligence into
the spec files.

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

Closes: #1214
Approved by: baude
2018-08-07 14:52:30 +00:00
Jhon Honce 606b5f9a61 Remove inotify work around
PR#1215 fixed issue with podman blowing up inotify

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1222
Approved by: baude
2018-08-06 16:58:26 +00:00
baude bd9d3a8fa5 Rename varlink socket and interface
io.projectatomic.podman -> io.podman

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

Closes: #1204
Approved by: mheon
2018-08-06 14:49:11 +00:00
baude 3c20bb0e70 Change tarball filename in copr prepare and match short-commit length
Signed-off-by: baude <bbaude@redhat.com>
2018-08-06 08:45:34 -05:00
baude 9987dd961b update copr spec, lets get it building again
Signed-off-by: baude <bbaude@redhat.com>
2018-08-05 11:38:21 -05:00
Jhon Honce 54eec54b2a Add missing dependencies to build system
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1199
Approved by: rhatdan
2018-08-05 11:06:18 +00:00
Jhon Honce 47620961fe Port to MacOS
* Refactor Tunnel to support selecting port for remote sshd
* Refactor ssh tunnel to support MacOS version of ssh
* Refactor Tunnel.close() to find and kill off zombie siblings
* Add psutil dependency
* Add logging setup, letting library produce debugging records
* Clean up Tunnel API
* Fix test_runner.sh to propagate returncode to caller

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1199
Approved by: rhatdan
2018-08-05 11:06:18 +00:00
Matthew Heon 11264dabda Bump to v0.8.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-03 14:46:15 -04:00
Jhon Honce 5aa36c1861 Clean up pylint warnings and errors for podman
* Some of the pedantic errors were not corrected
* Clean up prep for porting to MacOS and PyPi hosting
* Fix broken unittest

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1159
Approved by: rhatdan
2018-07-28 11:49:11 +00:00
Matthew Heon 07a1f33edc Bump to v0.8.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-27 12:05:41 -04:00
Jhon Honce 32b690e902 Clean up pylint warnings and errors
* Some of the pedantic errors were not corrected
* Clean up prep for porting to MacOS and PyPi hosting

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1155
Approved by: baude
2018-07-25 02:50:16 +00:00
Jhon Honce 9a18681ba6 [WIP] Refactor and simplify python builds
* pypodman namespaced in site-packages
* version numbers pulled from requirements.txt
* add python-podman spec file to install eggs

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1106
Approved by: rhatdan
2018-07-23 18:53:44 +00:00
Matthew Heon 7476efe565 Bump to v0.7.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-20 14:06:45 -04:00
Jhon Honce 06c546e88d Downgrade setup.py
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1095
Approved by: mheon
2018-07-14 03:40:20 +00:00
Matthew Heon adf588bed8 Bump to v0.7.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-13 16:36:27 -04:00
Jhon Honce 74ccd9ce5f Update python directories to better support setup.py
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-07-13 12:50:12 -07:00
Jhon Honce 44b523c946 remote python client for podman
* Use podman library for access
* Verbose error checking
* Planned windows and macosx ports

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-07-13 11:29:28 -07:00
Jhon Honce 86154b6538 Refactor attach()/start() after podman changes
* Update examples
* Update/Clean up unittests
* Add Mixins for container attach()/start()

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1080
Approved by: baude
2018-07-12 01:38:30 +00:00
Jhon Honce ca6ffbccc2 Refactor unittest for change in history API
* test_images.TestImages.test_history changed to allow
  '<missing>' as legal image ID.  Previously all layers
  used the image ID.  Now layer 0 reports '<missing>'.

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1056
Approved by: jwhonce
2018-07-06 21:59:36 +00:00
Matthew Heon 6fb7a68848 Bump to v0.7.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-06 14:32:50 -04:00
W. Trevor King 8aed3857d3 contrib/python/test/test_tunnel: Fix -nNT -> -nNTq
Catching the tests up with 60427ab3 (add podman remote client,
2018-06-22, #986) to avoid non-fatal smoketest failures like [1]:

  ======================================================================
  FAIL: test_tunnel (test.test_tunnel.TestTunnel)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/lib64/python3.6/unittest/mock.py", line 1179, in patched
      return func(*args, **keywargs)
    File "/go/src/github.com/projectatomic/libpod/contrib/python/test/test_tunnel.py", line 79, in test_tunnel
      mock_Popen.assert_called_once_with(cmd, close_fds=True)
    File "/usr/lib64/python3.6/unittest/mock.py", line 825, in assert_called_once_with
      return self.assert_called_with(*args, **kwargs)
    File "/usr/lib64/python3.6/unittest/mock.py", line 814, in assert_called_with
      raise AssertionError(_error_message()) from cause
  AssertionError: Expected call: Popen(['ssh', '-nNT', '-L', '/tmp/user/socket:/run/podman/socket', '-i', '~/.ssh/id_rsa', 'ssh://user@hostname'], close_fds=True)
  Actual call: Popen(['ssh', '-nNTq', '-L', '/tmp/user/socket:/run/podman/socket', '-i', '~/.ssh/id_rsa', 'ssh://user@hostname'], close_fds=True)

[1]: 0d792d5c92.1.1529764423989739036/output.log

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #1035
Approved by: mheon
2018-07-06 16:38:42 +00:00
Matthew Heon c71845fa70 Bump to v0.7.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-29 15:59:22 -04:00
baude 60427ab3d2 add podman remote client
podman client that is capable of:
 * images
 * ps
 * rm
 * rmi

this is only a mockup to frame out and prove python library and ssh
tunnelling usage.

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

Closes: #986
Approved by: rhatdan
2018-06-27 04:52:22 +00:00
Matthew Heon 32bfb5107c Bump to v0.6.5-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-22 15:55:05 -04:00
Jhon Honce 2f0f9944b6 Add unittests and fix bugs
* Improved error messages
* Improved checking of user input

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #978
Approved by: mheon
2018-06-22 17:25:44 +00:00
Daniel J Walsh 2c81a756e3 Update the version of conmon used in test
Also start using podmin in /usr/libexec/podman rather then crio.

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

Closes: #979
Approved by: baude
2018-06-22 13:19:08 +00:00
Jhon Honce 7ea95a6afa Implement SSH tunnels between client and podman server
* client currently forks ssh client pending finding a well
  maintained ssh library for python.  Including support for
  AF_UNIX forwarding.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-06-19 20:08:20 -07:00
Matthew Heon 5d0557530a Bump to v0.6.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-15 11:15:14 -04:00
Daniel J Walsh 4bed83a54c
Bump to v0.6.3-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-06-08 12:23:13 -04:00
Jhon Honce 93c1722caa Add support for BuildImage
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #908
Approved by: baude
2018-06-05 21:23:54 +00:00
Matthew Heon e156208280 Bump to v0.6.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-01 18:20:12 -04:00
Jhon Honce 4f5e6728b7 Provide examples for python podman API
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #870
Approved by: rhatdan
2018-06-01 21:19:56 +00:00
Jhon Honce 727ecfeadf Use Version from spec file in setup.py
- If envvar PODMAN_VERSION not set use default version of 0.0.0

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #807
Approved by: rhatdan
2018-06-01 20:18:23 +00:00
Jhon Honce 80baf0d800 Fix lable handling
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-06-01 10:03:54 -07:00
Jhon Honce 2cb881fa58 Implement container attach
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-05-31 20:13:35 -07:00
baude 8ee0f2bf91 add go generate varlink to copr spec
Now that we make the varlink .go file on the fly, we need to have the
spec call go generate on it to build properly.

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

Closes: #843
Approved by: baude
2018-05-29 20:59:08 +00:00
Matthew Heon 70672652b6 Bump to v0.6.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-25 13:48:56 -04:00
Jhon Honce 0a4ade1c17 Implement python podman create and start
- Added alias 'container()' to image model for CreateContainer()
- Fixed return in containers_create.go to wrap error in varlink
  exception
- Added a wait time to container.kill(), number of seconds to wait
  for the container to change state
- Refactored cached_property() to use system libraries
- Refactored tests to speed up performance

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #821
Approved by: rhatdan
2018-05-25 09:31:21 +00:00
Jhon Honce 684b544e9c Spell check strings and comments
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #831
Approved by: rhatdan
2018-05-25 08:45:15 +00:00
Jhon Honce d252fa710e Fix test_runner call of podman varlink
- Updated some tests due to slippage between tests and code
- Skipped tests will be reinstated in a separate PR

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #825
Approved by: rhatdan
2018-05-23 19:46:23 +00:00
Jhon Honce 5f0d4b10e9 Add support for Zulu timestamp parsing
- Improve error message when podman varlink service is not running

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #800
Approved by: rhatdan
2018-05-23 17:54:09 +00:00
baude ae7c45968d set varlink timeout to 1 seconds
Add option to varlink for --timeout.  Input for this option is in milliseconds

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

Closes: #814
Approved by: baude
2018-05-22 13:50:10 +00:00
baude 390bd16d37 tidy up the copr spec
on os's (like centos) where python3 might not be installed, do not attempt to build
the python3 varlink client.  varlink python is only supported on python3.

also, change the conditions for f28 to match the fedora official specs.

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

Closes: #813
Approved by: baude
2018-05-21 17:19:14 +00:00
Daniel J Walsh 9d7c50aa03 Tighten the security on the podman varlink socket
We only want root to be allowed to access this socket.
Also move socket to /run/podman directory.  This requires
us to drop a podman.conf tmpfiles.d file.

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

Closes: #806
Approved by: mheon
2018-05-19 07:47:03 +00:00
Jhon Honce 4b804e8516 Implement podman.containers.commit()
- Add API support
- Update tests
- Make changes from reviews

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #798
Approved by: mheon
2018-05-18 21:08:21 +00:00
Matthew Heon 2b7ba84ae1 Bump to v0.5.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-18 12:41:08 -04:00
baude bbc522be8e remove hooks files reference and no varlink-python on f27 or epel
Signed-off-by: baude <bbaude@redhat.com>

Closes: #802
Approved by: baude
2018-05-18 15:12:52 +00:00
W. Trevor King a9e2373f18 contrib/spec/podman.spec.in: Drop README-hooks
I'd tried to drop it here with ea415610 (hooks/docs: Add oci-hooks.5
and per-package man page building, 2018-05-15, #772), but had missed
the reference added in 796d6c89 (Add python3 package to podman,
2018-05-17, #791) when rebasing around that package.  With this
commit, I'm killing it again ;).

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #801
Approved by: rhatdan
2018-05-18 14:59:49 +00:00
baude ca528d80c1 make sure hooks are renamed for copr spec
Signed-off-by: baude <bbaude@redhat.com>
2018-05-17 15:57:34 -05:00
W. Trevor King ea4156108d hooks/docs: Add oci-hooks.5 and per-package man page building
This allows us to reference the hooks docs from podman(1) in a way
that will survive system installation.  The downside is that the
GitHub rendered pages become less usable, now that we can no longer
embed links as freely as we could before.

I've followed the "Sections within a manual page" suggestions from
[1].

locale(7) is [2], which is Linux-specific.  Even section numbering is
platform-dependent [3], so it's unlikely that these external man
references are particularly portable.  Platform packagers can adjust
our local references to match their target system, but that leaves the
GitHub rendering in an awkward place.  For now, I think a
Linux-centric GitHub rendering without clickable links may be the best
we can do without moving away from go-md2man.

As far as I can tell, there's not a nice way to get go-md2man to wrap
the links in SEE ALSO without sometimes hyphenating a URL (which makes
it harder for man-page readers to copy/paste those links into their
browser).

I've also fixed some "extention" -> "extension" typos.

[1]: http://man7.org/linux/man-pages/man7/man-pages.7.html
[2]: http://man7.org/linux/man-pages/man7/locale.7.html
[3]: https://en.wikipedia.org/wiki/Man_page#Manual_sections

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #772
Approved by: mheon
2018-05-17 18:22:10 +00:00
baude 796d6c894a Add python3 package to podman
Signed-off-by: baude <bbaude@redhat.com>

Closes: #791
Approved by: mheon
2018-05-17 17:03:16 +00:00
Jhon Honce 2fdd4a1610 Skip tests that are flaking, holding up merge queue
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #783
Approved by: baude
2018-05-16 19:20:24 +00:00
Jhon Honce 1aaf8df5be Refactor libpod python varlink bindings
- More pythonic
- Leverage context managers to help with socket leaks
- Add system unittest's
- Add image unittest's
- Add container unittest's
- Add models for system, containers and images, and their collections
- Add helper functions for datetime parsing/formatting
- GetInfo() implemented
- Add support for setuptools
- Update documentation
- Support for Python 3.4-3.6

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #748
Approved by: baude
2018-05-16 14:01:10 +00:00
baude 99532e6f3e Add packaging for hooks/README.md
Signed-off-by: baude <bbaude@redhat.com>

Closes: #763
Approved by: baude
2018-05-14 14:42:09 +00:00
Matthew Heon e5e3a5b2ac Bump to v0.5.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-11 13:21:37 -04:00
Matthew Heon 4691706d01 Bump to v0.5.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-04 11:35:56 -04:00
baude c8c39779a7 correct varlink command in service file
The struct of the varlink command changed to accept a URI
as input.  This was never updated in the service file

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

Closes: #691
Approved by: mheon
2018-04-30 20:45:33 +00:00
Matthew Heon d91b24e2eb Bump to v0.5.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-27 17:24:46 -04:00
baude 39a7a773a6 varlink images
implement varlink image functions for working with libpod with the exception of a
couple due to incompletions on the libpod side of things (build).

also, created a first pass at a libpodpy package which will stand as a client to
working with libpod's varlink methods using python.

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

Closes: #669
Approved by: baude
2018-04-26 19:14:44 +00:00
baude bef93de431 Add unit files to the copr spec
Signed-off-by: baude <bbaude@redhat.com>

Closes: #665
Approved by: baude
2018-04-24 20:25:12 +00:00
baude b77695d68f Dusty would prefer it to be part of the release.
Signed-off-by: baude <bbaude@redhat.com>

Closes: #657
Approved by: baude
2018-04-24 01:54:12 +00:00
Daniel J Walsh c78ce0e8fd
Merge pull request #641 from nathwill/man-libpod
add libpod.conf man page (closes #537)
2018-04-23 20:49:30 -04:00
baude 8493dba23c Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com>

Closes: #627
Approved by: mheon
2018-04-23 14:29:45 +00:00
Nathan Williams 79f08c4699 add libpod.conf man page
Signed-off-by: Nathan Williams <nath.e.will@gmail.com>
2018-04-21 22:37:21 -07:00
baude cf1d884ffa Add seconds after epoch to copr rpms to tie break versioning
Signed-off-by: baude <bbaude@redhat.com>

Closes: #654
Approved by: mheon
2018-04-21 21:38:10 +00:00
Matthew Heon 3ccbdf5c1b Bump to v0.4.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-20 11:40:46 -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
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 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 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
Daniel J Walsh 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
Matthew Heon 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
baude 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
Matthew Heon 106fcaaab6 Bump release to v0.3.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-16 11:05:16 -04:00
Matthew Heon 8e71647269 Bump to version v0.3.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-09 10:07:48 -05:00
Matthew Heon bd7de5d5dd Bump to v0.3.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-02 15:38:34 -05:00
Matthew Heon 98b95ff47f Bump to v0.3.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-02 15:38:34 -05:00
baude 45478b7843 Re-enable copr builds
New structure for copr builds which hopefully is more stable

Signed-off-by: baude <bbaude@redhat.com>
2018-02-28 13:08:35 -06:00
baude df7bf04dc6 Resolve contention between copr and fedora repos
In order for the podman in podman tests to work, we need to install a copr
RPM that has the function we need (and is not in a fedora build yet).  Because
the copr rpms are not versioned correctly (relative to the fedora ones), we now
set the version in the copr rpm.

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

Closes: #368
Approved by: mheon
2018-02-20 16:18:11 +00:00
baude d3b432a06c Add copr deps
The COPR spec needs to require:
* atomic-registries
* iptables
* containernetworking-cni

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

Closes: #332
Approved by: baude
2018-02-14 22:02:51 +00:00
baude fa9658cbfa podman logs: fix tailing
Fix issues with tailing of container logs as described
in issue #16.  Also add in the ability to use a duration or
known time stamp formats for the --since flag.

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

Closes: #317
Approved by: mheon
2018-02-09 15:27:52 +00:00