10162 Commits

Author SHA1 Message Date
15d36f120c More docker compat API fixes
Fixes wrong VirtualSize, ParentId, Architecture, Author, Os and OsVersion value

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2020-12-04 15:58:46 +01:00
ec0411aecd Merge pull request #8569 from zhangguanzhang/fix-nit
Fix some nit in code and comment
2020-12-04 06:30:31 -05:00
05df0c50ae Merge pull request #8589 from yan12125/container-logs-unix-timestamps
Support Unix timestamps for `podman logs --since`
2020-12-04 06:28:34 -05:00
d1193b1b8c Merge pull request #8587 from jwhonce/jira/RUN-1106-images
Jira RUN-1106 Image handlers updates
2020-12-04 06:23:16 -05:00
a3cb37a04f Merge pull request #8590 from vrothberg/owners
add @Luap99 to OWNERS file
2020-12-04 06:16:22 -05:00
701cc6ab40 add @Luap99 to OWNERS file
@Luap99 is a long-term contributor, does a lot of reviews, contributed
many non-trivial patches, and is very active in the community.

Being in the OWNERS file gives privileges to approve (/approve) and
merge (/lgtm) pull requests.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 09:21:04 +01:00
e58fb21ced Support Unix timestamps for podman logs --since
To match what podman-logs(1) describes --since

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
2020-12-04 15:14:31 +08:00
95b4478fb4 Fix some nit
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-12-04 09:20:42 +08:00
468947d5c8 Jira RUN-1106 Image handlers updates
* Audit and add tests for required fields.
* Added issue for /images/load implementation

Audit:
- GET /images/json GetImages
- POST /build BuildImage
- POST /build/prune 404 not found
- POST /images/create CreateImageFromImage/CreateImageFromSrc
- GET /images/{name}/json GetImage
- GET /images/{name}/history HistoryImage
- POST /images/{name}/push PushImage
- POST /images/{name}/tag TagImage
- DELETE /images/{name} RemoveImage
- POST /images/prune PruneImages
- POST /commit CommitContainer
- GET /images/{name}/get ExportImage
- GET /images/get ExportImages
- POST /images/load LoadImages See https://github.com/containers/podman/issues/8586

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-03 16:11:17 -07:00
70284b18cc Merge pull request #8479 from rhatdan/log
Drop default log-level from error to warn
2020-12-03 10:59:33 -05:00
c675d8a3c6 Merge pull request #8565 from jwhonce/wip/testing
hack/podman-socat captures the API stream
2020-12-03 10:24:19 -05:00
3fd350f050 Merge pull request #8576 from Luap99/docs-network-rootless
[CI:DOCS] Correct which network commands can be run as rootless
2020-12-03 10:22:03 -05:00
caa84cd35d Merge pull request #8551 from rhatdan/default
Support --network=default as if it was private
2020-12-03 09:31:43 -05:00
8437a6df16 Correct which network commands can be run as rootless
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-03 14:43:37 +01:00
f00cc25a7c Drop default log-level from error to warn
Our users are missing certain warning messages that would
make debugging issues with Podman easier.

For example if you do a podman build with a Containerfile
that contains the SHELL directive, the Derective is silently
ignored.

If you run with the log-level warn you get a warning message explainging
what happened.

$ podman build --no-cache -f /tmp/Containerfile1 /tmp/
STEP 1: FROM ubi8
STEP 2: SHELL ["/bin/bash", "-c"]
STEP 3: COMMIT
--> 7a207be102a
7a207be102aa8993eceb32802e6ceb9d2603ceed9dee0fee341df63e6300882e

$ podman --log-level=warn build --no-cache -f /tmp/Containerfile1 /tmp/
STEP 1: FROM ubi8
STEP 2: SHELL ["/bin/bash", "-c"]
STEP 3: COMMIT
WARN[0000] SHELL is not supported for OCI image format, [/bin/bash -c] will be ignored. Must use `docker` format
--> 7bd96fd25b9
7bd96fd25b9f755d8a045e31187e406cf889dcf3799357ec906e90767613e95f

These messages will no longer be lost, when we default to WARNing level.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-03 06:28:09 -05:00
85b412ddcd Merge pull request #8563 from giuseppe/exec-cgroup-create
podman, exec: move conmon to the correct cgroup
2020-12-03 11:37:13 +01:00
9a33e064a1 podman, exec: move conmon to the correct cgroup
move the conmon process to the conmon cgroup also on exec.

The previous implementation would fail to move the conmon process as
the systemd unit already exists so its creation would fail.

When the unit cannot be created, attempt to directly join the cgroup
instead.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-03 10:03:39 +01:00
918087252b Merge pull request #8566 from jwhonce/wip/double_ping
Change bindings to stop two API calls for ping
2020-12-03 01:45:38 +01:00
38a44acd20 Merge pull request #8564 from edsantiago/bats
BATS: add new load test
2020-12-03 01:25:54 +01:00
5cf7aa65fb Merge pull request #8408 from umohnani8/sec-opt
Add mask and unmask option to --security-opt
2020-12-03 00:49:23 +01:00
ee418c8565 Support --network=default as if it was private
Docker defines an option of "default" which means to
use the default network.  We should support this with
the same code path as --network="".

This is important for compatibility with the Docker API.

Fixes: https://github.com/containers/podman/issues/8544

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-02 18:38:35 -05:00
60d3e658ce Change bindings to stop two API calls for ping
* existing code caused an unnecessary 301 redirect

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 16:14:53 -07:00
e55320efde hack/podman-socat captures the API stream
* verify socat and podman binaries exist
* setup a sandboxed podman service
* run podman service with socat proxy to capture API stream
* clean up sandbox leaving the log files for review

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 16:03:56 -07:00
c8ab4c878f BATS: add new load test
Looks like #7337 was fixed (by #8112). Reenable a disabled
test for it; and make it actually work. Confirmed that
newly-added test fails on d45676549 (the commit before #8112).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-02 14:45:51 -07:00
0334b61958 Add mask and unmask option to --security-opt
Add the mask and unmask option to the --security-opt flag
to allow users to specify paths to mask and unmask in the
container. If unmask=ALL, this will unmask all the paths we
mask by default.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-02 16:07:18 -05:00
7984842d7e Merge pull request #8556 from mheon/fix_8539
Use Libpod tmpdir for pause path
2020-12-02 22:03:19 +01:00
e74072e742 Merge pull request #8112 from QiWang19/load-optional-name
Drop name argument from Load API
2020-12-02 21:35:31 +01:00
d45676549d Merge pull request #8392 from jwhonce/wip/report
Fix `podman images...` missing headers in table templates
2020-12-02 20:25:54 +01:00
ab88632835 Use Libpod tmpdir for pause path
Previously, we always computed pause path from the Rootless
runtime directory. Problem: this does not match the behavior of
Libpod when the directory changes. Libpod will continue to use
the previous directory, cached in the database; Pause pidfiles
will swap to the new path. This is problematic when the directory
needs to exist to write the pidfile, and Libpod is what creates
the directory.

There are two potential solutions - allow the pause pidfile to
move and just make the directory when we want to write it, or use
the cached Libpod paths for a guaranteed location. This patch
does the second, because it seems safer - we will never miss a
previously-existing pidfile because the location is now
consistent.

Fixes #8539

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-02 14:18:37 -05:00
2e55543cca Merge pull request #8557 from baude/mountcommas
add commas between mount options
2020-12-02 19:52:52 +01:00
2a02833e9f Fix podman images... missing headers in table templates
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 10:50:37 -07:00
ccc0201a64 add commas between mount options
when formatting mount options into a string for the compat container create, the options need to be comma delimited.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-02 10:19:21 -06:00
e82ec90007 Merge pull request #8552 from baude/buildtarget
target is not tag
2020-12-02 16:58:28 +01:00
7210b86d9e Merge pull request #8549 from Luap99/network-id-support
Add support for network ids
2020-12-02 15:27:14 +01:00
f525d8b843 Do not pass name argument to Load API
Not pass the name argument to Load API. Specify in the document the usage of the optional argument is tagging an additional image.
Close #7337

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-02 09:25:01 -05:00
3a5cd57bb4 target is not tag
remove mistaken use of target being used for tag

Signed-off-by: baude <bbaude@redhat.com>
2020-12-02 08:21:03 -06:00
d28874b2f4 Merge pull request #8550 from Luap99/fix-completion-ancestor-filter
Fix shell completion for ps --filter ancestor
2020-12-02 13:58:30 +01:00
a3ddedda49 Fix shell completion for ps --filter ancestor
The `ancestor` option was missing an equal sign. Therefore
the completion did not work as expected.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-02 10:48:40 +01:00
c31a5c0d9c Add support for network ids
The network ID is not stored. It is just the sha256 hash from
the network name. There is a risk of a potential hash collision.
However it's very unlikely and even if we hit this it will
complain that more than network with this ID exists.

The main benefit is that the compat api can have proper
network ID support. Also this adds the support for
`podman network ls --format "{{.ID}}"` and `--filter id=<ID>`.

It also ensures that we can do network rm <ID> and network
inspect <ID>.

Since we use a hash this commit is backwards compatible even for
already existing networks.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-02 10:27:00 +01:00
9c5fe954cc Merge pull request #8543 from mheon/no_syslog_true
Do not use "true" after "syslog" in exit commands
2020-12-02 01:03:40 +01:00
c585012db3 Merge pull request #8457 from afbjorklund/bridge-mtu
Add podman network create flag for bridge mtu
2020-12-02 01:01:09 +01:00
b2cd6e0402 Merge pull request #8542 from rhatdan/test
Fix typo in tests
2020-12-01 22:38:58 +01:00
db70e91bde Validate that the bridge option is supported
Thanks Luap99 for the validation suggestion

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
de2b15f4d5 Add integration test for the bridge options
Thanks Luap99 for doing the implementation

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
7f1be76b5c Add podman network create option for bridge vlan
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
b1b35707aa Add podman network create option for bridge mtu
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:03 +01:00
7f084a8ae2 Merge pull request #8357 from mheon/add_volume_interface_package
Add API for communicating with Docker volume plugins
2020-12-01 22:32:08 +01:00
c71ad9a557 Merge pull request #8541 from rhatdan/man
Fix potential race condition in testing
2020-12-01 22:09:38 +01:00
e3313fdd50 Merge pull request #8488 from rhatdan/platform
Add support for --platform
2020-12-01 21:48:40 +01:00
b7ff6f0912 Merge pull request #8505 from Luap99/network-labels
podman network label support
2020-12-01 21:43:27 +01:00