6180 Commits

Author SHA1 Message Date
813b00e439 Merge pull request #4642 from TomSweeneyRedHat/dev/tsweeney/buildah1.11.5
Bump Buildah to v1.11.6
2019-12-05 06:27:15 -08:00
a03c3a9318 Enable multi-platform rpm building
- make: fix python detection for multiple interpreters
- make: create generic `package` and `package-install` targets
- build_rpm.sh: move package installation into package-install
- build_rpm.sh: fix dnf/yum detection
- build_rpm.sh: install md2man rpm only on platfroms where is available
- build_rpm.sh: temporary skip packaging docs and debug on rhel-8
- docs: `make package-install`

This change is validated by new CI jobs run by rdoproject. See link
below for result.

Depends-On: https://review.rdoproject.org/r/#/c/23943/
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-05 10:34:10 +00:00
bc40282aec Merge pull request #4644 from ssbarnea/fix/hack-release
Improve hack/get_release_info.sh
2019-12-05 00:31:45 -08:00
001d06d7f6 Completely rework --change parsing
The way we were trying to parse was very broken. I originally
attempted to use Buildah's Dockerfile parser here, but dealing
with it (and convincing it to accept only a limited subset, and
only one instruction at a time) was challenging, so I rewrote a
subset of Dockerfile parsing. This should handle most common
cases well, though there are definitely unhandled edge cases for
ENV and LABEL.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-04 18:55:30 -05:00
b8ac3f143b Avoid git warnings by using detach on checkout
Git displays a huge and confusing warning when doing a checkout of
a specific commit if the --detach option is not mentioned.

This cleans up our build logs, making it easier to spot real problems.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-04 21:44:11 +00:00
4dbab37e05 Merge pull request #4640 from ssbarnea/fix/dnf
Improve dnf tests inside build_rpm.sh
2019-12-04 08:50:40 -08:00
9db92d540a Improve hack/get_release_info.sh
- Adopt bash strict mode
- Avoid cd errors as seen on CI vendor jobs:
hack/get_release_info.sh: line 9: cd: /go/src/github.com/containers/libpod: No such file or directory

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-04 16:23:55 +00:00
5851dacc32 Bump Buildah to v1.11.6
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-12-04 10:08:14 -05:00
e47b7a61d9 Merge pull request #4637 from giuseppe/check-for-renameat2-runtime
rootless: add fallback for renameat2 at runtime
2019-12-04 05:25:17 -08:00
077ee1a10d rootless: enable stats test on cgroup v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-04 13:11:58 +01:00
578a836d7d Improve dnf tests inside build_rpm.sh
- Fix bug failing to detect dnf in various locations
- Add missing sudo to yum/dnf calls
- Fix bug where pkg_manager may endup with a multi-line value

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-04 10:48:26 +00:00
3f1675d902 libpod: fix stats for rootless pods
honor the systemd parent directory when specified.

Closes: https://github.com/containers/libpod/issues/4634

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-04 11:13:40 +01:00
a94e625868 rootless: add fallback for renameat2 at runtime
the renameat2 syscall might be defined in the C library but lacking
support in the kernel.

In such case, let it fallback to open(O_CREAT)+rename as it does on
systems lacking the definition for renameat2.

Closes: https://github.com/containers/libpod/issues/4570

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-04 10:30:40 +01:00
10f733497f Merge pull request #4635 from ssbarnea/fix/go-md2man
Attempt to install go-md2man only if missing
2019-12-03 17:37:54 -08:00
cf5bca1338 Attempt to install go-md2man only if missing
Fixes: #4632
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-03 19:47:42 +00:00
06e2a20b3d Merge pull request #4630 from TomSweeneyRedHat/dev/tsweeney/rootlesstouchup
Quick grammar touchup in rootless.md
2019-12-03 10:36:10 -08:00
5c3af009c6 Merge pull request #4629 from mheon/fix_indirect_netnsctr_lookup
Allow chained network namespace containers
2019-12-03 09:16:31 -08:00
748de3c52c Merge pull request #4614 from bfallik/patch-1
troubleshooting: warn about secure boot
2019-12-03 08:48:38 -08:00
61e6a5bf39 Quick grammar touchup in rootless.md
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-12-03 11:32:37 -05:00
d8bfd11408 Merge pull request #4599 from raukadah/rpmbuild_without
Updates on making doc building optional
2019-12-03 07:37:36 -08:00
b0b9103cca Allow chained network namespace containers
The code currently assumes that the container we delegate network
namespace to will never further delegate to another container, so
when looking up things like /etc/hosts and /etc/resolv.conf we
won't pull the correct files from the chained dependency. The
changes to resolve this are relatively simple - just need to keep
looking until we find a container without NetNsCtr set.

Fixes #4626

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-03 10:27:15 -05:00
b88f2c4297 Merge pull request #4615 from ssbarnea/fix/prepare
build: improved prepare.sh
2019-12-03 04:01:42 -08:00
9e361fd851 Merge pull request #4622 from rhatdan/rootless
Add comment on rootless containers creating device nodes
2019-12-03 00:49:20 -08:00
588156a9ef Merge pull request #4623 from rhatdan/errors
Ignore ErrCtrRemoved when removing a container
2019-12-03 00:33:27 -08:00
309452dcfc Merge pull request #4624 from mheon/refresh_volume_locks
Ensure volumes reacquire locks on state refresh
2019-12-02 23:32:59 -08:00
6458f960e6 Merge pull request #4584 from nitrocode/patch-2
install.md: added slirp4netns dependency to ubuntu
2019-12-02 21:04:47 -08:00
689329f749 Ensure volumes reacquire locks on state refresh
After a restart, pods and containers both run a refresh()
function to prepare to run after a reboot. Until now, volumes
have not had a similar function, because they had no per-boot
setup to perform.

Unfortunately, this was not noticed when in-memory locking was
introduced to volumes. The refresh() routine is, among other
things, responsible for ensuring that locks are reserved after a
reboot, ensuring they cannot be taken by a freshly-created
container, pod, or volume. If this reservation is not done, we
can end up with two objects using the same lock, potentially
needing to lock each other for some operations - classic recipe
for deadlocks.

Add a refresh() function to volumes to perform lock reservation
and ensure it is called as part of overall refresh().

Fixes #4605
Fixes #4621

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-02 23:06:00 -05:00
b90585042c Merge pull request #4616 from ssbarnea/fix/makefile
build: improved main makefile
2019-12-02 19:41:51 -08:00
2eda555ebe Ignore ErrCtrRemoved when removing a container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-03 04:14:57 +01:00
8cb1af9afc Add comment on rootless containers creating device nodes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-03 03:38:41 +01:00
c9696c451d Merge pull request #4596 from kunalkushwaha/container-prune
container prune command fixed as per docker prune command
2019-12-02 18:33:58 -08:00
1414a063f5 Updates on making doc building and debug optional
It changes the podman spec from using with_doc to bcond_without
for building docs so that anyone can pass --without doc as well
as other rpmbuild args to the build_rpm.sh script to skip
building docs.

Since go-md2man is not available in CentOS8 repo. without the
help fo extra_args, it makes it conditional.

It also moves the manpages to a seperate package.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-12-03 07:57:50 +05:30
f4302a52cb troubleshooting: warn about secure boot
Add an additional troubleshooting item to warn users that Secure Boot
can prevent Podman from running containers. The error messages and
initial debugging steps don't make it clear that this all stems from a
BIOS setting. Hopefully adding this item to the troubleshooting doc
will avoid future headaches.

Signed-off-by: Brian Fallik <brian@clypd.com>
2019-12-02 20:11:45 -05:00
711728672f Merge pull request #4617 from giuseppe/fix-error-case
libpod: fix case for executable file not found errors
2019-12-02 19:24:54 +01:00
e13e5502e3 libpod: fix case for executable file not found errors
do not change the runtime error to be lowercase, but use a case
insensitive regex matching.  In this way the original error from the
OCI runtime is reported back.

regression introduced by bc485bce47f55135d6ead80537bc145edb779ae9

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-02 18:03:33 +01:00
8d00c838fb Merge pull request #4608 from rhatdan/vendor
Fix podman-remote version to print client and server
2019-12-02 17:57:44 +01:00
86ef7db536 build: improved main makefile
* added .install.md2man as dependency for docs, fixed broken build
  on systems that do not have go-md2man preinstalled.
* sorted PHONY targets

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-02 16:47:30 +00:00
3befbb1997 build: improved prepare.sh
* assure we use bash strict mode
* avoid shallow errors on full clones
* make script bit more idempotent

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-02 16:33:51 +00:00
e4275b3453 Merge pull request #4493 from mheon/add_removing_state
Add ContainerStateRemoving
2019-12-02 16:31:11 +01:00
b9b2ab5e5f Fix podman-remote version to print client and server
If the user specifies .Server.* on a non podman-remote,
substitute .Client for .Server and return the value.
This is for compatability with Docker.

Since prior versions documented --format {{ .Version }}, we
have to continue to support that.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-02 15:50:00 +01:00
bca01ed461 man page updated with examples of filter option
examples with filter added

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-12-02 11:47:56 +09:00
6c757949ce install.md: added slirp4netns dependency to ubuntu
https://github.com/containers/libpod/issues/1234
Signed-off-by: nitrocode <nitrocode@users.noreply.github.com>
2019-12-01 20:01:46 -05:00
39c705e940 Merge pull request #4558 from rhatdan/reset
Add podman system reset command
2019-11-29 15:05:03 +01:00
7b99ef0b84 Merge pull request #4597 from openSUSE/nostore
Do not initialize store on rootless podman
2019-11-29 14:50:42 +01:00
7f53178a7d Merge pull request #4576 from giuseppe/oci-errors-only-match
oci: print only matching part for the errors
2019-11-29 12:22:58 +01:00
1c0356ee91 Merge pull request #4587 from raukadah/btrfs
Disable btrfs for RHEL in podman spec
2019-11-29 12:02:37 +01:00
39b14405c3 Merge pull request #4589 from ssbarnea/fix/build2
Detect Python executable in Makefile
2019-11-29 11:46:56 +01:00
79bf5010ed Add podman system reset command
This command will destroy all data created via podman.
It will remove containers, images, volumes, pods.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-29 05:34:52 -05:00
b4313b296a fix commands.go to get links from correct directory
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-29 05:32:53 -05:00
17646e9c7d Merge pull request #4590 from raukadah/docs
Make doc building in spec optional
2019-11-29 11:32:52 +01:00