4537 Commits

Author SHA1 Message Date
068d3bb3bf Update 'generate kube' tests to verify YAML
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-25 12:34:53 -04:00
101a5cd755 Use a different method to retrieve YAML output in tests
OutputToString() was mangling newlines, which made YAML parsers
very, very angry. But not angry enough to actually error, that
would be too easy. Just angry enough to silently not decode
anything.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-25 11:10:50 -04:00
21978c9908 Merge pull request #3332 from rhatdan/cgroupmanager
Correctly identify the defaults for cgroup-manager
2019-06-25 14:54:28 +02:00
d8b18a9879 Merge pull request #3401 from mheon/templating_is_dumb
Fix inspect --format '{{.Mounts}}.
2019-06-25 00:20:25 +02:00
394e12aa65 Merge pull request #3391 from QiWang19/cp_file
fix bug creats directory copying file
2019-06-24 23:49:57 +02:00
2388222e98 update dependencies
Ran a `go get -u` and bumped K8s deps to 1.15.0.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 21:29:31 +02:00
79d835457d Fix tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 15:27:37 -04:00
803a2b04d1 Change Marshal -> Unmarshal in generate kube tests
We need to verify that valid YAML was produced - Marshal will
just pack the generated YAML even further.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:56:41 -04:00
567e7c60fa Add test for generate kube on a pod with ports
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:45:07 -04:00
ebf48ff459 Only include ports in one container in Kube YAML
This likely broke when we made containers able to detect that
they shared a network namespace and grab ports from the
dependency container - prior to that, we could grab ports without
concern for conflict, only the infra container had them. Now, all
containers in a pod will return the same ports, so we have to
work around this.

Fixes #3408

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:27:47 -04:00
2d9f1e95eb Support aliases for .Src and .Dst in inspect .Mounts
This provides backwards compatability with 1.4.0-1.4.2 releases
which name .Source and .Destination as .Src and .Dst - useful for
not breaking toolbox.

Also add a test.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:08:25 -04:00
a1a4a75abe Merge pull request #3412 from mheon/fix_ps_sync_segfault
Fix a segfault in 'podman ps --sync'
2019-06-24 18:36:20 +02:00
72260a296c Merge pull request #3414 from vrothberg/go-modules
Go modules
2019-06-24 16:52:02 +02:00
cf244d87cd Merge pull request #3398 from haircommander/conmon-hotfix
Update conmon to include attach socket unlink
2019-06-24 15:50:39 +02:00
de75b1a277 Fix a segfault in 'podman ps --sync'
We weren't properly populating the container's OCI Runtime in
Batch(), causing segfaults on attempting to access it. Add a test
to make sure we actually catch cases like this in the future.

Fixes #3411

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 09:26:03 -04:00
d697456dc9 migrate to go-modules
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 13:20:59 +02:00
33280d881e Merge pull request #3406 from giuseppe/slirp-entry-to-hosts
rootless: add an entry to /etc/hosts when using slirp4netns
2019-06-24 12:53:11 +02:00
a3211b73c6 Makefile: add go-get function
Add a `go-get` function to the Makefile to wrap `go get -u` into a
wrapper disabling go modules.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 11:15:31 +02:00
bd5e113b71 rootless: add an entry to /etc/hosts when using slirp4netns
Closes: https://github.com/containers/libpod/issues/3405

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-24 10:12:33 +02:00
b611ac1c50 Merge pull request #3404 from QazerLab/docs/rootless-tutorial
Fix configs location in rootless tutorial.
2019-06-23 15:40:51 +02:00
7c4e4449b0 Merge pull request #3409 from giuseppe/add-crun
libpod.conf: add runtime crun
2019-06-23 03:05:50 +02:00
632c12cff1 libpod.conf: add runtime crun
now that crun is available as a Fedora package, we can add an entry to
the default libpod.conf so that it is easier to use it just by using
--runtime crun to Podman.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-22 21:12:08 +02:00
5787f88042 Merge pull request #3399 from astronouth7303/patch-1
Add /usr/local/{s,}bin to conmon paths
2019-06-22 12:18:06 +02:00
ddba0e6964 Merge pull request #3400 from haircommander/install-hotfix
include make podman target in install instructions
2019-06-22 12:08:06 +02:00
d9bdd3c1e0 Merge pull request #3403 from mheon/more_lock_debugging
Add additional debugging when refreshing locks
2019-06-22 04:24:11 +02:00
80440408ad Fix configs location in rootless tutorial.
Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-06-22 02:20:44 +03:00
c233a12772 Add additional debugging when refreshing locks
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 16:00:39 -04:00
7625d28c82 Fix gofmt
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 15:25:06 -04:00
7d76548b41 Adjust names to match struct tags in Inspect
In Go templating, we use the names of fields, not the JSON struct
tags. To ensure templating works are expected, we need the two to
match.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 15:09:59 -04:00
778a634daa Fix inspect --format '{{.Mounts}}.
Go templating is incapable of dealing with pointers, so when we
moved to Docker compatible mounts JSON, we broke it. The solution
is to not use pointers in this part of inspect.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 15:00:30 -04:00
e2b0587c21 runtime.go: Add /usr/local/{s,}bin
Signed-off-by: Jamie Bliss <jamie@ivyleav.es>
2019-06-21 14:38:29 -04:00
3a0d9516ba include make podman target in install instructions
now that podman ships conmon >=0.3.0

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 14:38:25 -04:00
00a7d2067e Add /usr/local/{s,}bin to conmon paths
This is one of the default installation paths in conmon

Signed-off-by: Jamie Bliss <jamie@ivyleav.es>
2019-06-21 14:00:02 -04:00
a06bb80b4b update cirrus image
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 11:39:29 -04:00
aa21ec158a Merge pull request #3392 from mheon/missing_periods
Add some missing periods to the readme
2019-06-21 17:11:12 +02:00
284208a238 Update conmon to include attach socket unlink
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 10:55:24 -04:00
c0bc768ff1 Merge pull request #3395 from adrianreber/diff
Add --latest, -l to 'podman diff'
2019-06-21 16:15:00 +02:00
7d8aba9248 Merge pull request #3378 from mheon/multiple_runtimes
Begin adding support for multiple OCI runtimes
2019-06-21 14:46:54 +02:00
54920601ae Merge pull request #3386 from baude/windowsbridge
add windows bridge format
2019-06-21 14:36:55 +02:00
1e706a021d Add --latest, -l to 'podman diff'
The man page of 'podman diff' claims that the diff sub-command knows
about --latest, -l. This adds support, as described in the man-page, to
the diff sub-command for --latest, -l.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-21 13:37:04 +02:00
c3b75b2328 Merge pull request #3393 from openSUSE/werror
Build cgo files with -Wall and -Werror
2019-06-21 12:59:00 +02:00
4bfbc355de Build cgo files with -Wall -Werror
To avoid unnecessary warnings and errors in the future I'd like to
propose building all cgo related sources with `-Wall -Werror`. This
commit fixes some warnings which came up in `shm_lock.c`, too.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-06-21 10:14:19 +02:00
f446ccf0b0 Merge pull request #3379 from openSUSE/rootless-fix
Fix format specifiers in rootless_linux.c
2019-06-21 00:18:24 -07:00
39fdf91ba6 Merge pull request #3385 from mheon/read_only_validate
Make configuration validation not require a DB commit
2019-06-20 18:06:43 -07:00
86826629f7 Merge pull request #3388 from baude/openstackcs
vendor containers/storage v1.12.11
2019-06-20 17:52:57 -07:00
39d6a86195 Merge pull request #3390 from Foxboron/morten/reprobuilds
Support reproducible builds in the Makefile
2019-06-20 17:39:40 -07:00
9aeba12d61 Add some missing periods to the readme
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-20 19:56:57 -04:00
c962d214e6 fix bug creats directory copying file
close #3384

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-06-20 17:52:12 -04:00
156ebcbdf9 Support Reproducible Builds by removing build path
An issue for achieving reproducible builds is build artifacts where
build paths are embedded. We remove them by passing the current working
directory to -gcflags and -asmflags which prefix trims the paths.

Note: Go 1.13 includes `-trimpath`

https://reproducible-builds.org/docs/build-path/

Signed-off-by: Morten Linderud <morten@linderud.pw>
2019-06-20 23:25:44 +02:00
8f7255657a Support SOURCE_DATE_EPOCH
Build artifacts embeds the current date of the build into the artifact.
If anyone want to reproduce the software at a later date there is no way
to pass a recorded date or fake it in the build system at a later point.

https://reproducible-builds.org/docs/source-date-epoch/

Signed-off-by: Morten Linderud <morten@linderud.pw>
2019-06-20 23:25:21 +02:00