1028 Commits

Author SHA1 Message Date
3901ecc7b6 Merge pull request #909 from haircommander/dev/haircommander/bug/907
Added a defer to an Unlock that immediately followed a Lock
2018-06-05 17:15:19 -04:00
0699b39793 Added a defer to an Unlock that immediately followed a Lock
Signed-off-by: haircommander <pehunt@redhat.com>
2018-06-05 16:07:35 -04:00
06a29f0bde varlink build fixes
the varlink build was not working as designed and required some touch-ups:

* return a struct that includes logs and the new image ID
* pass namespaceoption so that networking in buildah works

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

Closes: #903
Approved by: rhatdan
2018-06-05 19:31:13 +00:00
7965bf5404 podman-varlink: log timeouts
The default timeout of one second when using podman-varlink can confuse
users as podman exits in silence after this timeout in case no
connection to the endpoint is alive.  Print a log (info level) that the
varlink service has expired to guide the user.

This change requires to vendor in the latest master of varlink/go.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #899
Approved by: rhatdan
2018-06-05 17:03:58 +00:00
03cf4ac60a bash completion: remove shebang
Remove the bash completion's shebang, which isn't required as the file
is only meant to be sourced.  rpmlint was complaining about that.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #901
Approved by: rhatdan
2018-06-05 16:43:18 +00:00
b241acaef5 install.md: fix typo
s/conman/conmon/

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
Closes: #900
Approved by: rhatdan
2018-06-05 14:59:36 +00:00
20cae6b502 Vendor in latest buildah code
This fix the issues when you are trying to build from a non existant
image or the registries in registries.conf do not include the registry.

./bin/podman build -t dan -f Dockerfile.suse ~
STEP 1: FROM opensuse:tumbleweed
error creating build container: image "opensuse:tumbleweed" not found in /etc/containers/registries.conf registries: image not known

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

v#

Closes: #897
Approved by: mheon
2018-06-05 14:38:11 +00:00
14cf6d219e Update OWNERS file to be based on reality
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #894
Approved by: @TomSweeneyRedHat
2018-06-04 22:10:30 +00:00
ef651acee7 Add logo to transfer page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #891
Approved by: rhatdan
2018-06-04 18:58:52 +00:00
c9f763456c libpod: Execute poststop hooks locally
Instead of delegating to the runtime, since some runtimes do not seem
to handle these reliably [1].

[1]: https://github.com/projectatomic/libpod/issues/730#issuecomment-392959938

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

Closes: #864
Approved by: rhatdan
2018-06-04 18:36:40 +00:00
28d1cec9f6 Add some test for podman run flag security-opt
Add following test cases for security-opt:
  - Check default selinux value
  - Disable security options in container
  - Setup selinux type in security-opt
  - Disable seccomp protection
  - Configure custom seccomp.json

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #837
Approved by: rhatdan
2018-06-04 18:14:33 +00:00
c69f80c86c Add a function for e2e test to write json file
This function is used to write json format configure files.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #837
Approved by: rhatdan
2018-06-04 18:14:33 +00:00
37751ea5b5 Use go-selinux for selinux check
Use function in opencontainers/selinux/go-selinux to check the
selinux status in our test.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #837
Approved by: rhatdan
2018-06-04 18:14:33 +00:00
6d52ebdd13 Add flag to add annotations to a container
Also add annotations from the image the container was created
from.

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

Closes: #886
Approved by: rhatdan
2018-06-04 17:52:28 +00:00
3416e9f194 Want to change the log level on buildah by default to warnf
Change the level of missing /etc/containers/mount.conf to a debug, since
this is expected on most machines.

Also raised the level of some warnings to errors, so they will be better seen,
even if we are skipping.

Fixed the wording of one error, since stating is not the correct word.

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

Closes: #882
Approved by: mheon
2018-06-04 15:12:12 +00:00
2ec1a645fa vendor in latest github.com/varlink/go
Fixes: #888
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #890
Approved by: rhatdan
2018-06-04 13:24:35 +00:00
41a3f48f6d hooks: Add debug logging for initial hook loading
We've had logrus logging in the monitor code since it landed in
68eb128f (pkg/hooks: Version the hook structure and add 1.0.0 hooks,
2018-04-27, #686).  This commit adds similar logging to the initial
hook.New() and Manager.Hooks() calls to make it easier to see if those
are working as expected.

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

Closes: #887
Approved by: rhatdan
2018-06-04 13:01:56 +00:00
d5bedf42cf hooks/docs: Fix 1.0.0 Nvidia example (adding version, etc.)
Reported by Gary Edwards [1].  Both typos are originally from 68eb128f
(pkg/hooks: Version the hook structure and add 1.0.0 hooks,
2018-04-27, #686).

[1]: https://github.com/projectatomic/libpod/issues/884#issuecomment-394174571

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

Closes: #887
Approved by: rhatdan
2018-06-04 13:01:56 +00:00
fd126d8453 hooks/1.0.0/when_test: Fix "both, and" -> "both, or" name typo
The typo is a copy/paste error from 68eb128f (pkg/hooks: Version the
hook structure and add 1.0.0 hooks, 2018-04-27, #686).

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

Closes: #887
Approved by: rhatdan
2018-06-04 13:01:56 +00:00
8f198e67ca hooks/1.0.0: Fix 'annotation' -> 'annotations' in JSON
This typo from 68eb128f (pkg/hooks: Version the hook structure and add
1.0.0 hooks, 2018-04-27, #686) was causing any 'annotations' entries
in hook JSON to be silently ignored.

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

Closes: #887
Approved by: rhatdan
2018-06-04 13:01:56 +00:00
947e410fe6 hooks: Fail ReadDir if a configured hook executable is missing
The continue here is from 5676597f (hooks/read: Ignore IsNotExist for
JSON files in ReadDir, 2018-04-27, #686), where it was intended to
silently ignore missing JSON files.  However, the old logic was also
silently ignoring not-exist errors from the os.Stat(hook.Hook.Path)
from 68eb128f (pkg/hooks: Version the hook structure and add 1.0.0
hooks, 2018-04-27, #686).  This commit adjusts the check so JSON
not-exist errors continue to be silently ignored while hook executable
not-exist errors become fatal.

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

Closes: #887
Approved by: rhatdan
2018-06-04 13:01:56 +00:00
cae49fca29 Cleanup transfer.md page, remove CRI-O content
This page has not been updated since we copied it from CRI-O repo.

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

Closes: #883
Approved by: mheon
2018-06-03 15:58:31 +00:00
13f745092f Vendor in latest containers/storage
This vendor will improve the performance of using userns
since it will save aside the image layer of the chown, so
followup runnings of podman will use the new layer rather
then chowning again.

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

Closes: #881
Approved by: mheon
2018-06-02 15:58:33 +00:00
22e6f11641 Merge pull request #880 from mheon/bump-0.6.1
Bump to v0.6.1
2018-06-01 18:23:07 -04:00
0521670432 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-01 18:20:13 -04:00
e156208280 Bump to v0.6.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-01 18:20:12 -04:00
3e0ff127c2 Bump to v0.6.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.6.1
2018-06-01 18:20:06 -04:00
96dc5fd0d5 hack/release.sh: Bump spec in dev_version_commit
Bump it to the next version (without a -dev suffix), based on the
precedent set by 70672652 (Bump to v0.6.1-dev, 2018-05-25, #834).
Previously I had VERSION there, which was a copy/paste error.

I've also added an explicit write_spec_version to release_commit.
That *should* be a no-op, with the spec version having already been
set by the previous release's dev_version_commit.  But better to be
safe than to cut a release with the wrong version number in the spec
file (e.g. maybe we guessed NEXT_VERSION wrong during the last
release).

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

Closes: #879
Approved by: mheon
2018-06-01 21:39:45 +00:00
500b94968b hack/release.sh: No longer need to bump setup.py
Since 727ecfea (Use Version from spec file in setup.py, 2018-05-18, #807),
setup.py has been pulling this from a PODMAN_VERSION environment
variable (which can be set in spec files), and there's no need for us
to bump it as part of our releases.

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

Closes: #879
Approved by: mheon
2018-06-01 21:39:45 +00:00
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
b6753238bc Bump Buildah vendor to pick up fix for tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #878
Approved by: mheon
2018-06-01 20:58:39 +00:00
c2e3058b3b Log podman build failures in papr
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #875
Approved by: mheon
2018-06-01 20:39:15 +00:00
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
2446ebc70f Attempt to use fedora 28 atomic host
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #873
Approved by: mheon
2018-06-01 20:14:28 +00:00
e83b007d51 Merge pull request #876 from jwhonce/wip/commit
Fix label handling
2018-06-01 15:46:48 -04:00
80baf0d800 Fix lable handling
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-06-01 10:03:54 -07:00
8c68fddd1c Merge pull request #839 from baude/varlinkcreatefixes
varlink build
2018-06-01 13:00:30 -04:00
3c63a48bb8 Merge pull request #859 from rhatdan/onbuild
Add OnBuild support for podman build
2018-06-01 12:59:47 -04:00
10d440a1c8 Merge pull request #872 from giuseppe/add-usr-libexec-podman-conmon
runtime: add /usr/libexec/podman/conmon to the conmon paths
2018-06-01 12:58:51 -04:00
3f29e3e881 Merge pull request #869 from jwhonce/wip/attach
Implement container attach
2018-06-01 11:41:16 -04:00
46e0cf0ef8 runtime: add /usr/libexec/podman/conmon to the conmon paths
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-01 16:43:35 +02:00
62ea88fa19 varlink build
Add the endpoint and methods for build so users can build an image
with varlink.  build can also use the more method for streaming
output back more regularily; however, it looks like a bug in buildah
does not output all build output to the writer provided.

Tidy up some create fixes and add endpoint for GetImage requested by
jhonce.

Signed-off-by: baude <bbaude@redhat.com>
2018-06-01 09:13:31 -05:00
29c831f9d6 Add OnBuild support for podman build
Only supported for docker formated images. OCI Does not support this flag.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-06-01 10:08:56 -04:00
ff3b46e769 Merge pull request #867 from wking/release-script
hack/release.sh: Add a release script
2018-06-01 09:40:48 -04:00
8f14f966be return all inspect info for varlink containerinspect
when obtaining the inspect information for a container through varlink, we need
to extract more container related information by parsing the data through the
method 'GetCtrInspectInfo' which was previously only in podman's main.

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

Closes: #866
Approved by: rhatdan
2018-06-01 08:37:55 +00:00
34886a79d6 hooks/exec: Allow successful reaps for 0s post-kill timeouts
I'd been getting the failed-to-reap errors locally, but on an
unrelated pull-request the FAH27 suite successfully reaped that hook
[1]:

  --- FAIL: TestRunKillTimeout (0.50s)
  	assertions.go:226:

  	Error Trace:	exec_test.go:210

  	Error:      	Expect "signal: killed" to match "^failed to reap process within 0s of the kill signal$"
  FAIL

The successful-reap cases limit our coverage, but I don't think that's
a big enough problem to be worth repeated polling or similar until we
do get the failed-to-reap error.

[1]: 96c1535fdc.0.1527811547665239762/output.log

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

Closes: #868
Approved by: rhatdan
2018-06-01 08:28:06 +00:00
8405ff9baa hack/release.sh: Add a release script
Matthew had expressed interest in a lovely release script on IRC.
Here's my attempt to encode the changes from the v0.5.4 release
branch.  I've also added tag signing, so you may be prompted for your
passphrase during that step.

The version scheme for 0.x.y is 0.${month}.${count_that_month} [1].
We could automatically calculate those with a dozen or so lines of
shell script, but we don't think that's worth the maintenance burden
when it's easy enough for the caller to think them up on their own
[2].

The spec sed also bumps the Python package version to match, which
seems like the intended behavior until 1.0 when the Python code will
move into its own repository [3].

[1]: https://github.com/projectatomic/libpod/pull/867#issuecomment-393731907
[2]: https://github.com/projectatomic/libpod/pull/867#issuecomment-393743295
[3]: https://github.com/projectatomic/libpod/issues/786#issuecomment-390682012

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-05-31 21:04:46 -07:00
2cb881fa58 Implement container attach
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-05-31 20:13:35 -07:00
a9e9fd4f5b If user specifies UIDMapSlice without GIDMapSlice, set them equal
We need to map slices set for both UID and GID maps to be equivalent if
not specified by user.  Currently if you do not specify both the containers
are not running.

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

Closes: #865
Approved by: baude
2018-05-31 22:30:16 +00:00
0eda60957d fix panic with podman pull
when there are no registries configured for the system and the user provided
a short image name, we panic'd due a logic bug in recent image pull changes.

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

Closes: #841
Approved by: rhatdan
2018-05-31 22:07:15 +00:00