Commit graph

355 commits

Author SHA1 Message Date
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
baude 401953ed82 Spec file changes for COPR
COPR needed slight tweaks to our spec file.

Signed-off-by: baude <bbaude@redhat.com>
2018-02-08 13:52:41 -06:00
baude 7092d2d40d COPR setup
Changing the spec file location and adding a COPR Makefile
so the package can get a dynamic name.

Signed-off-by: baude <bbaude@redhat.com>
2018-02-08 13:38:41 -06:00
baude 7f531263e6 Add default CNI configuration
podman needs a pair of configuration files to set up its default
network configuration: a bridge and loopback file.

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

Closes: #161
Approved by: baude
2017-12-22 19:23:36 +00:00
Matthew Heon c13f61798a Prune Server package. Convert to new github location.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 13:22:04 -04:00
Matthew Heon a031b83a09 Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 11:24:59 -04:00