19308 Commits

Author SHA1 Message Date
c7a8d29f12 refactor: improve get ssh path duplicate code
Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-07 09:03:35 +08:00
137c8ef4d5 logformatter: better recognition of ginkgo test names
Ginkgo test names can have more than two levels: there can be
a nested series of Describes() before the final It(). (e.g.,
quadlet_test.go). Handle that.

Before: we just assumed that the third-or-maybe-fourth line
after a "-----" divider was the test name.

Now: examine every line after the "-----" divider, until the
first empty line. Lines with /path/to/source/file are ignored,
lines with text strings are assembled together to make anchors.
This is still imperfect but it's much better than before.

SPECIAL NOTE: in order to allow linking to timing results
in the AfterSuite, I've changed the test name from Leaf to Full.
This will now be a much longer string, and hence much less
readable, but I'm inclined to think it's more correct. Please
review carefully and lmk if I should revert.

Finally, as an unrelated add-on, add links (at top) to original
log, journal, and (if applicable) podman-remote server logs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-06 14:32:15 -06:00
944673c883 Address review feedback and add manpage notes
The inspect format for `.LockNumber` needed to be documented.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-06-06 11:04:59 -04:00
8e3ecc8936 Merge pull request #18772 from esendjer/main
fix ignition config creation (propagation of proxy settings)
2023-06-06 10:45:55 -04:00
3b79f241b1 Add support for SecurityLabelNested flag in quadlet
This flag will allow us to run nested containers within
a quadlet service.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-06 10:30:48 -04:00
6f38a72c2a Merge pull request #18764 from containers/renovate/github.com-crc-org-vfkit-digest
fix(deps): update github.com/crc-org/vfkit digest to 3d57f09
2023-06-06 06:46:23 -04:00
a1c1d8d0a7 fix(deps): update module github.com/burntsushi/toml to v1.3.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-06 10:45:12 +00:00
953eaffbf8 Merge pull request #18766 from containers/renovate/github.com-mattn-go-sqlite3-1.x
fix(deps): update module github.com/mattn/go-sqlite3 to v1.14.17
2023-06-06 06:43:46 -04:00
4fda7936c5 system locks now reports held locks
To debug a deadlock, we really want to know what lock is actually
locked, so we can figure out what is using that lock. This PR
adds support for this, using trylock to check if every lock on
the system is free or in use. Will really need to be run a few
times in quick succession to verify that it's not a transient
lock and it's actually stuck, but that's not really a big deal.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-06-05 19:34:36 -04:00
92309d917b fix(deps): update module github.com/mattn/go-sqlite3 to v1.14.17
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 21:17:26 +00:00
f84a2ff9f7 Merge pull request #18725 from fatelei/docs
[CI:DOCS] feat: add insecure registry troubleshooting solution
2023-06-05 16:03:18 -04:00
0948c078c2 Add a new hidden command, podman system locks
This is a general debug command that identifies any lock
conflicts that could lead to a deadlock. It's only intended for
Libpod developers (while it does tell you if you need to run
`podman system renumber`, you should never have to do that
anyways, and the next commit will include a lot more technical
info in the output that no one except a Libpod dev will want).
Hence, hidden command, and only implemented for the local driver
(recommend just running it by SSHing into a `podman machine` VM
in the unlikely case it's needed by remote Podman).

These conflicts should normally never happen, but having a
command like this is useful for debugging deadlock conditions
when they do occur.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-06-05 14:47:12 -04:00
eec15a108a Merge pull request #18657 from arizvisa/GH-18120
Added the "--out" parameter and fixed an issue with "--noout" which prevented stdout from being written to.
2023-06-05 14:34:21 -04:00
1013696ad2 Add number of free locks to podman info
This is a nice quality-of-life change that should help to debug
situations where someone runs out of locks (usually when a bunch
of unused volumes accumulate).

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-06-05 14:00:40 -04:00
3b39eb1333 Include lock number in pod/container/volume inspect
Being able to easily identify what lock has been allocated to a
given Libpod object is only somewhat useful for debugging lock
issues, but it's trivial to expose and I don't see any harm in
doing so.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-06-05 12:28:50 -04:00
d669d948a3 Merge pull request #18788 from ygalblum/quadlet-pull
Quadlet - add support for Pull key in .container
2023-06-05 11:27:21 -04:00
1ce53677aa fix ignition config creation
* the sequence of Ignition config creation was broken,
so that the part responsible for propagation of proxy
settings has been out of the final ignConfig

* e2e test for proxy settings propagation

Signed-off-by: esendjer <esendjer@gmail.com>
2023-06-05 18:03:14 +03:00
4584350f6e Makefile binaries target adopted for Mac and Win
Signed-off-by: esendjer <esendjer@gmail.com>
2023-06-05 17:59:47 +03:00
e143a0ff8e Merge pull request #18774 from dgibson/bad-default-protocol
pasta: Correct handling of unknown protocols
2023-06-05 10:40:00 -04:00
18eb74fd4e Merge pull request #18789 from edsantiago/logformatter_fix_h2
logformatter: proper status color for failed tests
2023-06-05 10:32:16 -04:00
99a8e9450f Merge pull request #18733 from umohnani8/ulimit
Add default ulimit test for gen kube
2023-06-05 08:59:16 -04:00
e93b1f9974 fix(deps): update github.com/crc-org/vfkit digest to 3d57f09
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 12:53:57 +00:00
c51c6675ee logformatter: proper status color for failed tests
Fix an oops in my ginkgo-v2 handling: subtest-status was
getting re-reset back to "passed", resulting in incorrect
and misleading green titles on failed tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-05 05:59:11 -06:00
cf9bc25bbc pasta: Test handling of unknown protocols
Test that pasta generates a sensible error message if asked to forward a
protocol it doesn't understand.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-05 19:32:54 +10:00
6eb8157602 Merge pull request #18787 from containers/renovate/github.com-sirupsen-logrus-1.x
fix(deps): update module github.com/sirupsen/logrus to v1.9.3
2023-06-05 05:01:32 -04:00
b2c0006706 pasta: Correct handling of unknown protocols
setupPasta() has logic to handle forwarding of TCP or UDP ports.  It has
what looks like logic to give an error if trying to forward ports of any
other protocol.  However, there's a straightforward error in this that it
will in fact only give the error if you try to use a protocol called
"default".  Other unknown protocols will fall through and result in a
nonsensical pasta command line which will almost certainly cause a cryptic
error later on.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-05 12:21:08 +10:00
6611735aeb Quadlet - add support for Pull key in .container
Update code, doc and test
Remove doc comment on pull policy

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-06-04 09:06:30 +03:00
5b629e9c4a fix(deps): update module github.com/sirupsen/logrus to v1.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-03 22:41:38 +00:00
aee7a3c16a Merge pull request #18769 from edsantiago/getport_rewrite
e2e: GetPort(): safer allocation of random ports
2023-06-02 15:39:43 -04:00
d68121a609 Add default ulimit test for gen kube
Add a test for generate kube to verify that the ulimit
annotation is not set for the default case when the user
doesn't set any ulimits.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-06-02 11:19:59 +00:00
57797d8559 Merge pull request #18771 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.9.3
2023-06-02 07:08:02 -04:00
1b7df2e99e Merge pull request #18770 from containers/renovate/github.com-coreos-stream-metadata-go-0.x
fix(deps): update module github.com/coreos/stream-metadata-go to v0.4.2
2023-06-02 06:22:57 -04:00
81d64547f1 feat: add insecure registry troubleshooting solution
Signed-off-by: fatelei <fatelei@gmail.com>
2023-06-02 14:50:13 +08:00
1768bf1509 fix(deps): update module golang.org/x/tools to v0.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 23:40:32 +00:00
7e550f78e1 fix(deps): update module github.com/coreos/stream-metadata-go to v0.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 22:09:12 +00:00
28934897e3 e2e: GetPort(): safer allocation of random ports
Intented to fix an obscure, unlikely race condition in which (I
think) two parallel jobs called GetPort() and were assigned the
same port.

Also, add actual proper testing to two HTTP-registry tests, and
Skip a third that's a waste of cycles (filed #18768)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-01 16:04:34 -06:00
2c9f18182a The removeContainer function now accepts a struct
We had something like 6 different boolean options (removing a
container turns out to be rather complicated, because there are a
million-odd things that want to do it), and the function
signature was getting unreasonably large. Change to a struct to
clean things up.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
4e6efbbbb3 Revert "test/e2e: fix "podman run ipcns ipcmk container test""
This reverts commit 9bd833bcfd07bf2b3c258a617d88255327b91669.

With the fix for `podman rm -fa` merged, we no longer require
this patch.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
b75ff3a8fa Add a test for removing dependencies with rm -fa
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
bafb3d6cc5 Revert "ginkgo-v2 cleanup workaround for #18180"
This reverts commit c4b9f4b34e75da3df5b40fd8e8d42dde224cbd1c.

This was a temporary workaround until a fix for #18180 landed.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
ef1a22cdea Fix a deadlock when removing pods
The infra container would try to remove the pod, despite the pod
already being in the process of being removed - oops. Add a check
to ensure we don't try and remove the pod when called by the
`podman pod rm` command.

Also, wire up noLockPod - it wasn't previously wired in, which is
concerning, and could be related?

Finally, make a few minor fixes to un-break lint.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:25 -04:00
8cb5d39d43 Pods now return what containers were removed with them
This probably should have been in the API since the beginning,
but it's not too late to start now.

The extra information is returned (both via the REST API, and to
the CLI handler for `podman rm`) but is not yet printed - it
feels like adding it to the output could be a breaking change?

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:24:59 -04:00
bc1a31ce6d Make RemoveContainer return containers and pods removed
This allows for accurate reporting of dependency removal, but the
work is still incomplete: pods can be removed, but do not report
the containers they removed as part of said removal. Will add
this in a subsequent commit.

Major note: I made ignoring no-such-container errors automatic
once it has been determined that a container did exist in the
first place. I can't think of any case where this would not be a
TOCTOU - IE, no reason not to ignore them. The `--ignore` option
to `podman rm` should still retain meaning as it will ignore
errors from containers that didn't exist in the first place.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:24:56 -04:00
e8d7456278 Add an API for removing a container and dependencies
This is the initial stage of implementation. The current API
functions but does not report the additional containers and pods
removed. This is necessary to properly display results to the
user after `podman rm --all`.

The existing remove-dependencies code has been removed in favor
of this more native solution.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 15:32:50 -04:00
a7e23d341d Merge pull request #18756 from Luap99/tz
libpod: fix timezone handling
2023-06-01 14:16:20 -04:00
e91f6f16bf Merge pull request #15867 from boaz0/closes_15754
Fix: display online_cpus in compat REST API
2023-06-01 11:03:14 -04:00
50f934587f Merge pull request #18758 from Luap99/systemd-restart
test/system: quadlet use correct systemd restart policy
2023-06-01 07:52:02 -04:00
511d668a33 Merge pull request #18765 from containers/renovate/github.com-godbus-dbus-v5-digest
fix(deps): update github.com/godbus/dbus/v5 digest to 7623695
2023-06-01 06:46:40 -04:00
2e2e009b1d Merge pull request #18763 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.9.2
2023-06-01 05:11:09 -04:00
543b809495 systests: fixes for coping with extra systemd image
We _usually_ have only one image in store, $IMAGE, but it's
perfectly fine to also have $SYSTEMD_IMAGE also. Fix a few
tests so they can handle that condition.

And, cleanup:
 - remove a no-longer-useful test ("podman load NEWNAME",
   functionality that was removed 2+ years ago in #8877)
 - reorder some tests in the image-mount test, to make
   them safer and easier to understand
 - use no-such-image, not no-such-container, in image-mount test.
   Computer don't care, but this human felt confused for a sec.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-01 11:04:31 +02:00