This is something Docker does, and we did not do until now. Most
difficult/annoying part was the REST API, where I did not really
want to modify the struct being sent, so I made the new restart
policy parameters query parameters instead.
Testing was also a bit annoying, because testing restart policy
always is.
Signed-off-by: Matt Heon <mheon@redhat.com>
The Docker endpoint here is kind of a nightmare - accepts a full
Resources block, including a large number of scary things like
devices. But it only documents (and seems to use) a small subset
of those. This implements support for that subset. We can always
extend things to implement more later if we have a need.
Signed-off-by: Matt Heon <mheon@redhat.com>
The logic here is more complex than I would like, largely due to
the behavior of `podman inspect` for running containers. When a
container is running, `podman inspect` will source as much as
possible from the OCI spec used to run that container, to grab
up-to-date information on things like devices. We don't want to
change this, it's definitely the right behavior, but it does make
updating a running container inconvenient: we have to rewrite the
OCI spec as part of the update to make sure that `podman inspect`
will read the correct resource limits.
Also, make update emit events. Docker does it, we should as well.
Signed-off-by: Matt Heon <mheon@redhat.com>
nixery registry has been down all day. Disable test.
Someone will need to fix this on the buildah end.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Markdown needs lists to be separate paragraphs, otherwise all the items
end up in a single line.
I also made arguments to be replaced italic to clarify that they
shouldn't be typed exactly as shown.
Signed-off-by: Baltazár Radics <baltazar.radics@gmail.com>
Commit 668d517af9 moved a lot of type definitions and by that also
copied a bucnh of swagger:model comments, this caused swagger to create
a incorrect yaml that can no longer be parsed by redoc due
"Self-referencing circular pointer".
The yaml basically defined the type with a name and the pointed to the
same name definition again so it caused a infinitive recursion where
redoc just throws an error but the swagger style ignored the case so it
seemed like it worked but obviously the type information was not
working.
Fixes#22351
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
First of all this removes the need for a network connection, second
renovate can update the version as it is tracked in go.mod.
However the real important part is that the binary downloads are
broken[1]. For some reason the swagger created with them does not
include all the type information for the examples. However when building
from source the same thing works fine.
[1] https://github.com/go-swagger/go-swagger/issues/2842
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This reverts commit 1b6e8d73aa666ee3438e97f9d0d8258a71b88e08.
This does not say what error this is supposed to fix. But assuming this
was about "Self-referencing circular pointer" by redoc then see the
following commit "swagger fix infinitive recursion on some types" for a
proper fix.
Our public docs.podman.io page uses redoc so this doesn't fix anything
other than a local run which is not very helpful.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Two system tests were relying on $SYSTEMD_IMAGE but were not
running _prefetch. This led to baffling flakes that wasted
my time. (Quay flakes, of course. New manifestation.)
Signed-off-by: Ed Santiago <santiago@redhat.com>
when listing images through the restful service, consumers want to know
if the image they are listing is a manifest or not because the libpod
endpoint returns both images and manifest lists.
in addition, we now add `arch` and `os` as fields in the libpod endpoint
for image listing as well.
Fixes: #22184Fixes: #22185
Signed-off-by: Brent Baude <bbaude@redhat.com>
This PR is only a first step towards being able to validate developer
code locally prior to pushing a PR and using CI. Right now, we have a
prepared image in a temporary spot (will change when done). That image
can be used to exercise various podman builds, make validate, and DCO
check.
The idea here is we have a make target that spins a podman container (or
machine) and then execute a small script to perform the actual builds.
Note, these builds are to verify code, not make production binaries so
corners are cut. As of now, we choose to not build cross-arch binaries
because most of our problems thus far have been operating system builds
and not arch.
Of course this can be expanded in the future. This is just step one to
start getting some of it in place. The rest of the work is tracked in
JIRA under two cards.
Signed-off-by: Brent Baude <bbaude@redhat.com>
...to match the version in root dir, to get rid of the mismatch
warning on every ginkgo run.
The last bump was done by renovatebot; I don't know why bot didn't
do it this time.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Not sure why this only triggers now but this code was broken for a
while. It is racy as reported on the issue but because it changes the
actual map part of the network backend it means it can also alter the
behavior of the network which is very bad.
Fixes#22330
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
...and an optional error-message string, to be checked
against stderr.
This is a starting point and baby-steps progress toward #18188.
There are 249 ExitWithError() checks in test/e2e. It will take
weeks to fix them all. This commit enables new functionality:
Expect(ExitWithError(125, "expected substring"))
...while also allowing the current empty-args form. Once
all 249 empty-args uses are modernized, the matcher code
will be cleaned up.
I expect it will take several months of light effort to get
all e2e tests transitioned to the new form. I am choosing to
do so in pieces, for (relative) ease of review. This PR:
1) makes the initial changes described above; and
2) updates a small subset of e2e _test.go files such that:
a) ExitWithError() is given an exit code and error string; and
b) Exit(Nonzero) is changed to ExitWithError(Nonzero, "string")
(when possible)
Signed-off-by: Ed Santiago <santiago@redhat.com>
Docker shows exposed ports as just PORT/PROTO so match that behavior. It
is not clear to me why someone needs that information in ps as "expose"
doesn't effect anything networking related.
Fixes https://issues.redhat.com/browse/RHEL-32154
Signed-off-by: Paul Holzinger <pholzing@redhat.com>