Commit Graph

21626 Commits

Author SHA1 Message Date
Urvashi Mohnani 310f971fcf Add tests for podman farm
Add tests for podman farm create, remove, and update.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani dce3ef3c42 Add podman farm update command
Podman farm update allows users to update a farm by addig
connections, removing connections, or changing the default farm.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 44a704dfcf Add podman farm remove command
Podman farm remove allows users to remove one or more
existing farms.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 59a8140f1f Add podman farm list command
The podman farm list command allows users to list
the existing farms.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 6fcdf1a190 Add podman farm create command
The podman farm create command allows users to create
farms from the avaiable podman system connections.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 1d5ef29f01 Add podman farm subcommand
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:33 -04:00
Ed Santiago 23d5b5008c CI: e2e: add delay before podman logs or journalctl
...to reduce flakes.

Reason: journald makes no guarantees. Just because a systemd job
has finished, or podman has written+flushed log entries, doesn't
mean that journald will actually know about them:

   https://github.com/systemd/systemd/issues/28650

Workaround: wrap some podman-logs tests inside Eventually()
so they will be retried when log == journald

This addresses, but does not close, #18501. That's a firehose,
with many more failures than I can possibly cross-reference.
I will leave it open, then keep monitoring missing-logs flakes
over time, and pick those off as they occur.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-09 09:29:11 -06:00
OpenShift Merge Robot c01ec25e6c
Merge pull request #19564 from containers/renovate/golangci-golangci-lint-1.x
chore(deps): update dependency golangci/golangci-lint to v1.54.0
2023-08-09 11:26:02 -04:00
OpenShift Merge Robot 1e6c73f59d
Merge pull request #19562 from Luap99/logs-tail
file logger: fix podman logs --tail with partial lines
2023-08-09 11:22:32 -04:00
Urvashi Mohnani 2951316b20 Add completion for Farms
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 11:07:27 -04:00
Urvashi Mohnani b672ddc792 Vendor c/common changes
Vendor latest c/common with changes to add a new Farms
table to containers.conf and update system connection to
add a connection to a farm when --farm is set.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 11:07:27 -04:00
renovate[bot] 3963c56398
chore(deps): update dependency golangci/golangci-lint to v1.54.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 12:50:44 +00:00
OpenShift Merge Robot 57fac93b30
Merge pull request #19560 from BlackHole1/fix
fix(env): parsing --env incorrect in cli
2023-08-09 08:50:12 -04:00
Paul Holzinger a55c2636de
file logger: fix podman logs --tail with partial lines
There is a problem where our tail code does not handles correctly
partial log lines. This makes podman logs --tail output possibly
incorrect lines when k8s-file is used.

This manifests as flake in CI because partial lines are only sometimes
written, basically always when the output is flushed before writing a
newline.

For our code we must not count partial lines which was already done but
the important thing we must keep reading backwards until the next full
(F) line. This is because all partial (P) lines still must be added to
the full line. See the added tests for details on how the log file looks
like.

While fixing this, I rework the tail logic a bit, there is absolutely no
reason to read the lines in a separate goroutine just to pass the lines
back via channel. We can do this in the same routine.
The logic is very simple, read the lines backwards, append lines to
result and then at the end invert the result slice as tail must return
the lines in the correct order. This more efficient then having to
allocate two different slices or to prepend the line as this would
require a new allocation for each line.

Lastly the readFromLogFile() function wrote the lines back to the log
line channel in the same routine as the log lines we read, this was bad
and causes a deadlock when the returned lines are bigger than the
channel size. There is no reason to allocate a big channel size we can
just write the log lines in a different goroutine, in this case the main
routine were read the logs anyway.

A new system test and unit tests have been added to check corner cases.

Fixes #19545

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-09 14:48:01 +02:00
OpenShift Merge Robot 7adc58ffb4
Merge pull request #19547 from containers/renovate/dawidd6-action-send-mail-3.x
[skip-ci] Update dawidd6/action-send-mail action to v3.8.0
2023-08-09 07:55:48 -04:00
OpenShift Merge Robot eb465b40c8
Merge pull request #19549 from rhatdan/quadlet
podman stop --cidfile missing --ignore
2023-08-09 07:50:19 -04:00
Black-Hole1 7ce654fea3
fix(env): parsing --env incorrect in cli
Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-08-09 18:52:30 +08:00
OpenShift Merge Robot 6f92c59bcd
Merge pull request #19559 from containers/renovate/docker.io-library-golang-1.x
Update docker.io/library/golang Docker tag to v1.21
2023-08-09 03:50:28 -04:00
renovate[bot] 4c4bc09227
Update docker.io/library/golang Docker tag to v1.21
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 01:03:32 +00:00
OpenShift Merge Robot d4f967c19e
Merge pull request #19541 from containers/renovate/major-ci-vm-image
Update dependency containers/automation_images to v20230807
2023-08-08 17:11:22 -04:00
OpenShift Merge Robot 195f1be89a
Merge pull request #19371 from danishprakash/daemonset-support
kube: add DaemonSet support
2023-08-08 17:05:09 -04:00
Daniel J Walsh f55c48ad3a
podman stop --cidfile missing --ignore
Podman should ignore failures to find a cidfile when stoping the
container if the user specified --ignore

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-08 17:03:15 -04:00
OpenShift Merge Robot 331d618a8a
Merge pull request #19543 from martinpitt/packit-temp-copr
packit: Build PRs into default packit COPRs
2023-08-08 14:52:58 -04:00
Chris Evich 7ef03517f9
Skip podman exec cannot be invoked on Debian
Ref: https://github.com/containers/podman/issues/19552

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:25 -04:00
Chris Evich 95ceacefbf
Re-enable checkpoint test on Debian SID
An unhelpful comment doesn't give any clues why this test was originally
skipped on Ubuntu.  In any case, now that CI uses Debian SID, re-enable
the test hoping that it now functions.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:25 -04:00
Chris Evich c193dbd942
Require a non-generic reason for non-Fedora skip
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:24 -04:00
Chris Evich d79e3a23db
CI FIXME removal/update.
Ref: https://github.com/containers/automation_images/pull/288/commits

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:24 -04:00
renovate[bot] 5ec856652f
Update dependency containers/automation_images to v20230807
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 11:09:28 -04:00
OpenShift Merge Robot 1899d21212
Merge pull request #19544 from NitrogenUA/build-docs
[CI:DOCS] fixed couple typos in build docs
2023-08-08 11:01:40 -04:00
renovate[bot] 7988dd82c9
[skip-ci] Update dawidd6/action-send-mail action to v3.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 12:38:30 +00:00
OpenShift Merge Robot c13b403c0f
Merge pull request #19534 from giuseppe/cp-close-tmp-file
cp: close temporary file on error path
2023-08-08 08:38:06 -04:00
OpenShift Merge Robot 406c480535
Merge pull request #19533 from hangscer8/fix_waitPidStop_timer
Stop timer in function waitPidStop
2023-08-08 06:59:20 -04:00
Oleh Dmytrychenko 8a410784b4
[CI:DOCS] fixed couple typos in build docs
Signed-off-by: Oleh Dmytrychenko <dmytrychenko.oleh@gmail.com>
2023-08-08 12:57:43 +03:00
OpenShift Merge Robot cc31ac4b0e
Merge pull request #19530 from mheon/fix_19529
Ensure volumes-from mounts override image volumes
2023-08-08 04:55:11 -04:00
OpenShift Merge Robot 2f50d8e579
Merge pull request #19425 from rhatdan/service
Add support for passing container stop timeout as -1 (infinite)
2023-08-08 04:52:33 -04:00
hang.jiang 282594e58f Stop timer in function waitPidStop
Because it will cause memory leak if we do not stop timer when the function has completed.

[NO NEW TESTS NEEDED]

Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
2023-08-08 16:31:27 +08:00
Martin Pitt 7c0bccaf77 packit: Build PRs into default packit COPRs
Building all PRs of all container projects into the same COPR does not
properly isolate PRs from each other: E.g. a podman PR currently runs
against whichever crun PR was opened/updated last; in other words,
sending a broken crun PR will instantly break tests for all subsequent
podman runs.

To avoid that, change the copr_build configuration to use the packit
default COPRs, which are specific to the particular PR, and disappear
after a few weeks. Projects should only run against what landed in
our dependencies' main branches, i.e. the podman-next COPR.

Note that this does not preclude testing a podman PR against a e.g. a
crun PR: This can be explicitly requested [1]. But most PRs don't change
the API and thus should default to isolation.

[1] https://packit.dev/posts/testing-farm-triggering

[NO NEW TESTS NEEDED]

Signed-off-by: Martin Pitt <mpitt@redhat.com>
2023-08-08 07:28:17 +02:00
OpenShift Merge Robot 2e97c6616d
Merge pull request #19537 from ygalblum/quadlet-network-doc
[CI:DOCS] Quadlet - provide more information about network files
2023-08-07 16:14:39 -04:00
Gregor Eichelberger afaeedef78
Add support for host-gateway
The `--add-host` option now accepts the special string `host-gateway`
instead of an IP Address, which will be mapped to the host IP address.

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2023-08-07 21:38:10 +02:00
Matthew Heon 2de22ebf0d Ensure volumes-from mounts override image volumes
We do not allow volumes and mounts to be placed at the same
location in the container, with create-time checks to ensure this
does not happen. User-added conflicts cannot be resolved (if the
user adds two separate mounts to, say, /myapp, we can't resolve
that contradiction and error), but for many other volume sources,
we can solve the contradiction ourselves via a priority
hierarchy. Image volumes come first, and are overridden by the
`--volumes-from` flag, which are overridden by user-added mounts,
etc, etc. The problem here is that we were not properly handling
volumes-from overriding image volumes. An inherited volume from
--volumes-from would supercede an image volume, but an inherited
mount would not. Solution is fortunately simple - just clear out
the map entry for the other type when adding volumes-from
volumes.

Makes me wish for Rust sum types - conflict resolution would be a
lot simpler if we could use a sum type for volumes and bind
mounts and thus have a single map instead of two maps, one for
each type.

Fixes #19529

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-08-07 15:04:33 -04:00
OpenShift Merge Robot f6c2be918d
Merge pull request #19539 from cevich/minor_gha_updates
[CI:DOCS] Minor mac/windows GHA workflow updates
2023-08-07 13:58:58 -04:00
Chris Evich 03d7a5120c
Minor: Include shasums in GHA workflow artifacts
This may be helpful in case SHA comparison is needed w/ files elsewhere.
For example, the files uploaded to a github release page.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-07 11:42:39 -04:00
Chris Evich d63ac06521
Minor: Add important comment to windows GHA workflow
Ref:
https://github.com/containers/podman/pull/19418#issuecomment-1665938019

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-07 11:37:33 -04:00
Chris Evich 9d7fe4e90f
Minor: Update/fix dry-run input descriptions
These are visible when running either job manually.  Fix the windows
workflow by including a `v` prefix to an obviously fictitious version
number.  For consistency, update the mac workflow text to match.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-07 11:30:32 -04:00
Ygal Blum 518daef729 [CI:DOCS] Quadlet - provide more information about network files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-08-07 16:53:40 +03:00
OpenShift Merge Robot b3a2ce3dc1
Merge pull request #19535 from edsantiago/manpage_dups
[CI:DOCS] man-page xref: check for duplicate entries
2023-08-07 15:07:10 +02:00
OpenShift Merge Robot d56b61ef4a
Merge pull request #19532 from dfr/freebsd-build
Makefile: work around the lack of 'man -l' on FreeBSD
2023-08-07 15:04:38 +02:00
Ed Santiago 819129b0d7 man-page xref: check for duplicate entries
Check for duplicate subcommands, flags, and format specifiers.
I assumed this would never be necessary, that code review would
catch dups, but it happened (#19462). Prevent future ones.

Also, make it a fatal error for a --format to be undocumented,
except for 'podman inspect'. So many exceptions ... :(

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-07 05:52:20 -06:00
Giuseppe Scrivano 39641482c1
cp: close temporary file on error path
follow-up for https://github.com/containers/podman/pull/19526

on io.Copy() errors make sure the temporary file is closed.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-08-07 12:39:25 +02:00
OpenShift Merge Robot c04ead152e
Merge pull request #19522 from containers/renovate/golang.org-x-net-0.x
Update module golang.org/x/net to v0.14.0
2023-08-07 12:25:41 +02:00