2104 Commits

Author SHA1 Message Date
2fb6ef9f40 Do not hide errors when creating container with UserNSRoot
This one is tricky. By using `:=` operator we have made err variable to be local
in the gorutine and different from `err` variable in the surrounding function.
And thus `createContainer` function returned always nil, even in cases when
some error occurred in the gorutine.

Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-08 22:27:51 +01:00
e106ccf416 Merge pull request #1754 from isimluk/attach-shall-not-lock-me-out
`--interactive` shall keep STDIN attached even when not explicitly set
2018-11-04 04:06:10 -08:00
59f93edacc --interactive shall keep STDIN attached even when not explicitly called out
Addressing:

    podman run -it -a STDERR --rm alpine /bin/ash

hanging. As we droped stdin as soon as -a was used. Notice this is contrary to
what D-tool does and contrary to what podman help implies:

    podman run --help | grep interact
    --interactive, -i                  Keep STDIN open even if not attached

Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-03 19:18:37 +01:00
2efcd63c64 Merge pull request #1753 from isimluk/fix-podman
Do never override podman with docker
2018-11-03 08:39:42 -07:00
c04e090380 Do never override podman with docker
Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-03 08:58:22 +01:00
309f4eb1ef Merge pull request #1748 from jwhonce/issue/1655
Fix long image name handling
2018-11-01 14:50:04 -07:00
d18f243e12 Merge pull request #1737 from baude/parakill
Make kill, pause, and unpause parallel.
2018-11-01 13:04:10 -07:00
b559c19c2f Make kill, pause, and unpause parallel.
Operations like kill, pause, and unpause -- which can operation on one or
more containers -- can greatly benefit from parallizing its main job (eq kill).

In the case of pauseand unpause, an --all option as was added. pause --all will
pause all **running** containers.  And unpause --all will unpause all **paused**
containers.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 14:23:55 -05:00
732a4c814e Merge pull request #1738 from baude/pararestart
Make restart parallel and add --all
2018-11-01 12:19:14 -07:00
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
2011782d9d Make restart parallel and add --all
When attempting to restart many containers, we can benefit from making
the restarts parallel.  For convenience, two new options are added:

--all attempts to restart all containers
--run-only when used with --all will attempt to restart only running containers

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 13:14:12 -05:00
26330aa995 Merge pull request #1746 from baude/renamebaude
replace quay.io/baude to quay.io/libpod
2018-11-01 10:42:02 -07:00
17716d787a Merge pull request #1624 from cevich/update_fedora
Cirrus: Enable updating F28 image
2018-11-01 10:23:27 -07:00
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
641dbda926 Merge pull request #1741 from jwhonce/wip/humanize
Change humanize to use MB vs MiB.
2018-11-01 09:18:29 -07:00
a610f0f869 replace quay.io/baude to quay.io/libpod
images used for our integration suite have moved from my work account
to a group organization called libpod.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 10:31:44 -05:00
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
20a3a53c2f Merge pull request #1740 from baude/ppc64le
allow ppc64le to pass libpod integration tests
2018-11-01 06:19:51 -07:00
0360ec725a allow ppc64le to pass libpod integration tests
this pr allows the libpod integration suite to pass on the
ppc64le architecture.  in some cases, I had to skip tests.
eventually, these tests need to be fixed so that they properly pass. of
note for this PR is:

* changed the ppc64le default container os to be overlay (over vfs) as vfs seems non-performant on ppc64le
* still run vfs for rootless operations
* some images names for ppc64le had to change because they don't exist.
* this should help getting our CI to run on the platform

Signed-off-by: baude <bbaude@redhat.com>
2018-10-31 18:40:09 -05:00
e75469ab99 Merge pull request #1736 from giuseppe/rootless-drop-run-postfix
rootless: do not add an additional /run to runroot
2018-10-31 07:20:09 -07:00
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
02eec644f1 Cirrus: Disable image build job abort on push
Normally cirrus will abort jobs if another push is made to a branch.
However, with image builds, other VMs are created/managed by packer.
Therefor if cirrus aborts a task, it's possible some packer managed VMs
will be left behind.  Disable this behavior for image-building only.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
021ca5780c Cirrus: Add a readme
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
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
9c1985fc4e Merge pull request #1731 from afbjorklund/version
Fix setting of version information
2018-10-31 06:48:12 -07:00
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
cf4288e3cc Merge pull request #1735 from giuseppe/slirp4netns-not-block
rootless: avoid hang on failed slirp4netns
2018-10-31 06:28:24 -07:00
89e9067dec rootless: do not add an additional /run to runroot
we are currently using something like /run/user/UID/run as runroot, as
it is already done by Buildah.  This ends up with
/run/user/UID/run/runc for the runc directory.  Change to drop the
additional /run so that runc will use /run/user/UID/runc.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-31 13:58:55 +01:00
ea50ce6a59 rootless: avoid hang on failed slirp4netns
If for any reason slirp4netns fails at startup, podman waits
indefinitely.  Check every second if the process is still running so
that we avoid to hang.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-31 13:08:23 +01:00
b2fef1a8ba Fix setting of version information
It was setting the wrong variable (CamelCase)
in the wrong module ("main", not "libpod")...

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-10-31 00:27:08 +01:00
ee513cca86 Merge pull request #1704 from giuseppe/attach-cuid-too-long
attach: fix attach when cuid is too long
2018-10-30 14:22:01 -07:00
319a7a7043 Merge pull request #1715 from baude/getusergroup
get user and group information using securejoin and runc's user library
2018-10-30 11:49:15 -07:00
ce24ce7c53 Merge pull request #1728 from baude/trunccommand
truncate command output in ps by default
2018-10-30 07:49:28 -07:00
c65b3599cc runtime: do not allow runroot longer than 50 characters
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-30 15:35:24 +01:00
f77d846536 attach: fix attach when cuid is too long
conmon creates a symlink to avoid using a too long UNIX path.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1641800

There is still one issue when the path length of the symlink has the
same length of the attach socket parent directory since conmon fails
to create the symlink, but that must be addressed in conmon first.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-30 15:35:24 +01:00
aa49675e29 truncate command output in ps by default
when the PS command was reworked for performance and formatting improvements,
i forgot to truncate the command field.  Long container commands was throwing
the formatting off. we now truncated to 17 characters plus the elipses.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-30 08:35:22 -05:00
24d4f114ea Merge pull request #1725 from cevich/newer_runc_commit
Use newer runc commit in VM images
2018-10-30 04:21:39 -07:00
8126eb8a39 Update the runc commit used for testing
Use image ubuntu-1804-bionic-v20180911-libpod-63a86a18 which was built
with RUNC_COMMIT 78ef28e63bec2ee4c139b5e3e0d691eb9bdc748d.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-29 18:32:41 -04:00
d5b600171d Merge pull request #1721 from vrothberg/fix-1695
unmount: fix error logic
2018-10-29 15:29:32 -07:00
5e071f47c0 Merge pull request #1720 from vrothberg/contributing-describe-changes
CONTRIBUTING.md: add section about describing changes
2018-10-29 15:29:27 -07:00
a1b961af50 Merge pull request #1724 from baude/psformatchanges
make various changes to ps output
2018-10-29 15:17:13 -07:00
7052c8534e Merge pull request #1723 from afbjorklund/local_config
Sync default config with libpod.conf
2018-10-29 15:17:04 -07:00
60ba26ab21 Merge pull request #1722 from baude/ps2space
Use two spaces to pad PS fields
2018-10-29 14:49:33 -07:00
058f0e3681 make various changes to ps output
for backwards compatibility and auto-test, we needed a few changes
that slipped in when i reworked ps to be faster to be reverted. the
follow behaviours were reverted:

1. the is_infra column was redacted.  that appears to be a mistake on my
part.
2. a newline after ps prints its format was added
3. a newline prior to printing the headers was removed.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-29 14:33:32 -05:00
1c4880d3ef Sync default config with libpod.conf
Only changed libpod.conf file, which might not even be in use.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-10-29 19:11:47 +01:00
13b05ea476 Use two spaces to pad PS fields
Ed has asked that we revert to using two spaces for padding between PS fields.  I assume
this is for docker autotests.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-29 12:08:41 -05:00
079208cdbc unmount: fix error logic
Only return `ErrCtrStateInvalid` errors when the mount counter is equal
to 1.  Also fix the "can't unmount [...] last mount[..]" error which
hasn't been returned when the error passed to `errors.Errorf()` is nil.

Fixes: #1695
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-29 15:46:54 +01:00
1dd7f13dfb get user and group information using securejoin and runc's user library
for the purposes of performance and security, we use securejoin to contstruct
the root fs's path so that symlinks are what they appear to be and no pointing
to something naughty.

then instead of chrooting to parse /etc/passwd|/etc/group, we now use the runc user/group
methods which saves us quite a bit of performance.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-29 08:59:46 -05:00
a36974585f CONTRIBUTING.md: add section about describing changes
Add a section about describing changes in commit messages.  GitHub tends
to drive the large part of discussions and change descriptions to the
corresponding pull requests and issues, but such information is lost in
the git history.  Not providing sufficient information in commit
messages is painful for reviewing and can cause issues while debugging.
It also complicates studying source code, where reading commit messages
and the code's git history is a common approach to better understand the
code.

Following the descriptions should be enforced by the maintainers of the
libpod project.  Pull requests containing commits without proper
descriptions should not be merged.

This change bases on the documentation of the Linux kernel v4.17:
https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-29 13:13:34 +01:00
aef9d56ae2 Merge pull request #1696 from QiWang19/ExportForCrio
Change ParseDevice to exported name
2018-10-29 04:09:16 -07:00