15284 Commits

Author SHA1 Message Date
259c79963f Improve robustness of podman system reset
Firstly, reset is now managed by the runtime itself as a part of
initialization. This ensures that it can be used even with
runtimes that would otherwise fail to be created - most notably,
when the user has changed a core path
(runroot/root/tmpdir/staticdir).

Secondly, we now attempt a best-effort removal even if the store
completely fails to be configured.

Third, we now hold the alive lock for the entire reset operation.
This ensures that no other Podman process can start while we are
running a system reset, and removes any possibility of a race
where a user tries to create containers or pull images while we
are trying to perform a reset.

[NO NEW TESTS NEEDED] we do not test reset last I checked.

Fixes #9075

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-06-03 12:54:08 -04:00
2039445763 Merge pull request #14444 from Luap99/remote-static-linux
Makefile: force podman-remote-static to linux
2022-06-01 11:35:46 -04:00
f91c852fa6 Makefile: force podman-remote-static to linux
Some of the targets overwrite $GOOS. Since podman-remote-static should
always build for linux we can force linux GOOS here.

Fixes #14201

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-01 15:38:01 +02:00
70ce77e8d0 Merge pull request #14424 from lsm5/gopkg-in-yaml-bump
Bump gopkg.in/yaml.v3 to v3.0.1
2022-06-01 09:09:20 -04:00
398e7ceb86 Merge pull request #14433 from Luap99/restore-net
fix podman container restore without CreateNetNS
2022-05-31 14:46:30 -04:00
cef044d859 Bump gopkg.in/yaml.v3 to v3.0.1
v3.0.1 resolves GHSA-hp87-p4gw-j4gq -  CVE-2022-28948.

While podman doesn't appear to be vulnerable to the CVE as the concerned
code isn't being called, this update should silence a dependabot alert.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-05-31 13:01:50 -04:00
205c8c071e fix podman container restore without CreateNetNS
When a container does not use the default podman netns, for example
--network none or --network ns:/path a restore would fail because the
specgen check validates that c.config.StaticMAC is nil but the
unmarshaller sets it to an empty slice.

While we could make the check use len() > 0 I feel like it is more
common to check with != nil for ip and mac addresses.
Adding omitempty tag makes the json marshal/unmarshal work correctly.
This should not cause any issues.

Fixes #14389

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-31 16:49:40 +02:00
dc67e6a182 Merge pull request #14419 from Luap99/volume-import
podman volume export/import: give better error
2022-05-31 09:27:29 -04:00
ccc087a30e Merge pull request #14415 from nicrowe00/14133
no-new-privileges format
2022-05-31 05:07:28 -04:00
ec576a5491 podman volume export/import: give better error
When the volume does not exist we should output an error stating so and
not some generic one.

Fixes #14411

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-30 18:10:28 +02:00
7e69e2b532 Podman no-new-privileges format
In docker, the format of no-new-privileges is
"no-new-privileges:true". However, for Podman
all that's required is "no-new-privileges", leading to issues
when attempting to use features desgined for docker in podman.
Adding support for the ":" format to be used along with the "="
format, depedning on which one is entered by the user.

fixes #14133
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
2022-05-30 15:06:42 +01:00
a550af260a Merge pull request #14383 from jwhonce/wip/info_todo
Add Authorization field to Plugins for Info
2022-05-27 10:55:35 -04:00
f48bf5808b Merge pull request #14393 from jwhonce/wip/archive_todo
Add API support for NoOverwriteDirNonDir
2022-05-27 10:43:36 -04:00
a72b2402c9 Merge pull request #14320 from flouthoc/build-honor-squash-and-layers
build: allow using `cache` explicitly with `--squash-all` using `--layers`
2022-05-27 06:37:19 -04:00
bdcf453118 Merge pull request #14387 from TomSweeneyRedHat/dev/tsweeney/quickdoc
[CI:DOCS] Quick typo for troubleshooting
2022-05-27 05:48:52 -04:00
8efdbf5c4c Add API support for NoOverwriteDirNonDir
Update method signatures and structs to pass option to buildah code

```release-note
NONE
```

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-26 16:31:15 -07:00
e13c5f3a9e Refactor populating uptime
Refactor populating uptime field to use standard library parsing and
math for populating the hour, minute, seconds fields.

Note: the go-humanize package does not cover time.Duration just
time.time.

```release-note
NONE
```

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-26 15:46:04 -07:00
3a32d60e5b [CI:DOCS] Quick typo for troubleshooting
After lgtming the latest from @flouthouc, I spotted one
more minor typo in the troubleshooting guide.  This corrects it.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-05-26 16:15:07 -04:00
1736f2fe60 Merge pull request #14382 from jwhonce/wip/init_todo
Remove TODO comment
2022-05-26 15:35:19 -04:00
e709cc88e7 Merge pull request #14377 from SoMuchForSubtlety/fix/pod-inspect-response
Fix swagger model of `InspectPodResponse`
2022-05-26 15:19:22 -04:00
49ef9eb52a Merge pull request #14374 from umohnani8/todo-3
Combine the CheckAllLatest CID and PodID functions
2022-05-26 14:27:24 -04:00
d730f2b254 Add Authorixation field to Plugins for Info
The Authorization field lists the plugins for granting access to the
Docker daemon. This field will always be nil for Podman as there is no
daemon. The field is included for compatibility.

```release-note
NONE
```

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-26 11:15:48 -07:00
5f097c371f Merge pull request #14355 from flouthoc/server-client-compat-for-bug-fix
[CI:Docs]: note regarding version compatablity between server and client for bug fixes.
2022-05-26 14:15:22 -04:00
2ce31caa1c Merge pull request #14381 from cevich/fix_cirrus_todo
[CI:DOCS] Cirrus: Fix several TODOs
2022-05-26 14:13:20 -04:00
bf403c8d3f Merge pull request #14373 from umohnani8/todo-2
Fix TODO in pod/ps.go and parse/net.go
2022-05-26 13:59:09 -04:00
ab0728421b docs: note regarding version compatablity between server and client for bug fixes
Add a small note to troubleshooting docs regaring version parity between
podman-client and podman-server when looking for bug fixes.

[NO TESTS NEEDED]
[NO NEW TESTS NEEDED]

Closes: https://github.com/containers/podman/issues/12660

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-26 23:24:18 +05:30
87ad460603 Remove TODO comment
Allowing custom flags to provider has the potential to break all the
hand-crafted commands currently in use. This could become a support
nightmare.

```release-note
NONE
```

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-26 10:26:38 -07:00
66a56ce05a vendor: bump buildah to v1.26.1-0.20220524184833-5500333c2e06
Bump buildah to v1.26.1-0.20220524184833-5500333c2e06

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-26 21:01:31 +05:30
6124b51993 build: allow using cache explicitly with --squash-all using --layers
Buildah already supports using `--layers` with `--squash` after https://github.com/containers/buildah/pull/3674
if user wants to do so hence podman must honor similar configuration
in `--squash-all` behaviour if user wants to using cache.

PS: We cannot alter behaviour of `podman build --squash` for
docker-compat reasons hence this feature can be easily supported by
`--squash-all`.

Closes: https://github.com/containers/buildah/issues/4011

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-26 21:01:18 +05:30
8c1128db4b Cirrus: Fix several TODOs
Most were simply deleted, the main one addressed is in the
"pre-testing" `ext_svc_check.sh` script.  It will now verify
accessibility of several key test images we maintain in `quay.io`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-26 11:23:53 -04:00
426a07e700 Combine the CheckAllLatest CID and PodID functions
These two functions were doing the exact same thing just
with cidfile and pod-id-file separately. Combine the functionality
to one function to remove repetative code.
Fix the TODO in cmd/podman/validate/args.go

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-05-26 11:12:40 -04:00
c9f6639ecc Fix TODO in parse/net.go
Fix up the parseEnv function to differentiate
between a label and env when parsing.
Don't do a system lookup when parsing labels.

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-05-26 11:04:01 -04:00
32aa12a285 Remove TODO from pods/ps.go
The TODO has already been fixed. Filters is now a []string

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-05-26 11:03:45 -04:00
8c781416b8 Fix swagger model of InspectPodResponse
`net.IP` gets marshalled as `string` and not `[]uint8`

[NO TESTS NEEDED]
[NO NEW TESTS NEEDED]

Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
2022-05-26 16:34:05 +02:00
e3663fbd7a Merge pull request #14378 from SoMuchForSubtlety/fix-contributing-docs
[CI:DOCS] Fix test block bypass instructions
2022-05-26 08:47:15 -04:00
de54d33d23 Fix test block bypass instructions
A new string was added in 521c0cb and the old one removed with 2ed31f9

[NO NEW TESTS NEEDED]

Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
2022-05-26 14:27:47 +02:00
ff7e2465d0 Merge pull request #14318 from umohnani8/play-kube
[CI:DOCS] Add play kube support docs
2022-05-26 06:43:15 -04:00
271f58f142 Merge pull request #14369 from mheon/fixmes_2
Remove more FIXMEs
2022-05-26 06:07:40 -04:00
b730e7328e cmd, build: remove redundant squash processing logic
Same block contains similar lines above this is not needed as this looks
redundant.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-26 10:50:21 +05:30
acdfb4d14f Merge pull request #14366 from jwhonce/wip/rm_todo
Support remote deadlock errors in rm
2022-05-25 18:23:30 -04:00
3944d8c142 Merge pull request #14329 from mheon/fixmes_1
First batch of resolutions to FIXMEs
2022-05-25 16:19:34 -04:00
e11feb2309 Merge pull request #14364 from jwhonce/wip/diff_todo
Remove unused archive flag from diff commands
2022-05-25 15:07:45 -04:00
66c846616c Support remote deadlock errors in rm
Refactor test for deadlock by comparing error text vs. actual
ErrWillDeadlock constant. When running with --remote the error
constant will always be not equal to the error returned by the API.

```release-note
NONE
```

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-25 11:14:20 -07:00
badf76e172 Remove more FIXMEs
Mostly, just removing the comments. These either have been done,
or are no longer a good idea.

No code changes. [NO NEW TESTS NEEDED] as such.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-05-25 14:10:02 -04:00
9fcfea7643 First batch of resolutions to FIXMEs
Most of these are no longer relevant, just drop the comments.

Most notable change: allow `podman kill` on paused containers.
Works just fine when I test it.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-05-25 13:28:04 -04:00
02c4374057 [CI:DOCS] Add play kube support docs
Add a doc to outline which kube yaml fields the play
kube command currently supports.
This will be updated as more fields are supported in
the future.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-05-25 13:11:45 -04:00
819e5bcb94 Merge pull request #14342 from containers/dependabot/go_modules/github.com/vbauerster/mpb/v7-7.4.2
build(deps): bump github.com/vbauerster/mpb/v7 from 7.4.1 to 7.4.2
2022-05-25 13:06:21 -04:00
338f012370 Remove unused archive flag from diff commands
* Option left in images/diff.go CLI as comment implies it is needed for
  backwards compatibility.

```release-note
NONE
```

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-25 08:50:12 -07:00
e26ad50669 Merge pull request #14361 from Luap99/netflake
fix f35 integration test network flake
2022-05-25 11:38:57 -04:00
dbd4ee04b8 Merge pull request #14358 from vrothberg/todo-part-2
Todo part 2
2022-05-25 10:42:23 -04:00