Validate the names with our name regex that we also use for
containers/pods. While we technically do not need to be that strict, I
think it makes sense to match containers. The most important bit of this
validation is that we exclude the use of / and \ which breaks all our
file paths as we just use this in the name an when machine write the
file it ends up being in a subdir which breaks the reading side. Also
other special characters could cause trouble for the URL parsing in the
machine connection URL.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This function has to read/write the connections file as such it should
only ever be called once otherwise we read/write the same file twice
which makes no sense. Also cleanup the fucntion a bit and make it
private as there are no external callers.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Remove unnecessary type redirection and just make it a normal function.
Also unexport it and move the test as it does not need to be public and
remove the default value assignments from the struct.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Given the switch to pulling oci artifacts for podman, we no longer need
a fair bit of fedora coreos code for automatically downloading images.
[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
Works around a problem where recent Windows updates do not always redirect the
system wsl to the app store wsl version correctly.
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
Followup to:
- #21060, where I added new struct checks (but did not make them fatal)
- #21534, which added per-interface stats and a .Network field,
but its documentation was slightly off
Signed-off-by: Ed Santiago <santiago@redhat.com>
Right now the code used the same socket for gvproxy and the qemu qmp
socket, this was racy and no correct as the later overwrote the former.
The correct thing is to use to separate socket paths, just use the
GVProxySocket() helper like applehv does.
[NO NEW TESTS NEEDED]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This removes a lot of boilerplate, but also ensures that every
stop test that is not directly testing podman stop or podman pod
stop uses `-t0` for quick, error-free stopping.
Signed-off-by: Matt Heon <mheon@redhat.com>
If users cancel the image download with CTRL-C for example then the
blob dir will stay around. The next time we run the download we should
just start the download again and not complain about the existing
directory.
[NO NEW TESTS NEEDED]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Continuing to see CI failures of the form "StopSignal SIGTERM
failed to stop container in 10 seconds". Work around those,
either by adding "-t0" to podman stop, or by using Expect(Exit(0))
instead of ExitCleanly().
Addresses, but does not close, #20196
Signed-off-by: Ed Santiago <santiago@redhat.com>
Replaces GetHyperVisorVMs() with Exists() to better abstract the underlying
use-case and slightly imrpove efficiency.
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This PR fixes a small bug in pulling disk artifacts where the machine os
was accidently being set to GOOS instead of "linux". Also removed the
manifest type verification because it served no purpose.
[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
The reserved annotation io.podman.annotations.volumes-from is made public to let user define volumes-from to have one container mount volumes of other containers.
The annotation format is: io.podman.annotations.volumes-from/tgtCtr: "srcCtr1:mntOpts1;srcCtr2:mntOpts;..."
Fixes: containers#16819
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
According to https://go.dev/ref/mod#module-cache golang will leave
behind read-only bits. It was observed that these cause the find/rm
cleanup operations to fail fail with `permission denied` on thousands
of files. This is preventing cleanup of cruft from unrelated Cirrus-tasks
leading to unnecessary occupation of critical, local-ssd storage space.
Fix this by ensuring the user has at least write access to the entire
contents of `$TMPDIR` and `$HOME`, `ci` subdirs.
Signed-off-by: Chris Evich <cevich@redhat.com>
Re-enable USBs check in wsl `SetProviderAttrs` function to prevent the
user trying to set USB settings which isn't supported.
Additionally removes a TODO in wsl's `CreateVM` function to check if the
`opts.USBs` length is greater than 0. This check is done in a more
generic way higher up the stack.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Instead of panic'ing for provider.MountType(), we return the "Unknown"
voluem type
[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>