Skip to content

Commit ec7f775

Browse files
Merge pull request #19218 from ashley-cui/rc2
[v4.6] Backports and updated release notes
2 parents af2d788 + be21bc0 commit ec7f775

File tree

82 files changed

+1298
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1298
-728
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: end-of-file-fixer
1313
exclude: test/buildah-bud/buildah-tests.diff
1414
- id: trailing-whitespace
15-
exclude: test/buildah-bud/buildah-tests.diff
15+
exclude: test/buildah-bud/buildah-tests.diff|test/e2e/quadlet/remap-keep-id2.container
1616
- id: mixed-line-ending
1717
- id: check-byte-order-marker
1818
- id: check-executables-have-shebangs

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ help: ## (Default) Print listing of key targets with their descriptions
253253
.PHONY: .gitvalidation
254254
.gitvalidation:
255255
@echo "Validating vs commit '$(call err_if_empty,EPOCH_TEST_COMMIT)'"
256-
GIT_CHECK_EXCLUDE="./vendor:./test/tools/vendor:docs/make.bat:test/buildah-bud/buildah-tests.diff" ./test/tools/build/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
256+
GIT_CHECK_EXCLUDE="./vendor:./test/tools/vendor:docs/make.bat:test/buildah-bud/buildah-tests.diff:test/e2e/quadlet/remap-keep-id2.container" ./test/tools/build/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
257257

258258
.PHONY: lint
259259
lint: golangci-lint

RELEASE_NOTES.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 4.6.0
44
### Features
5+
- The `podman manifest inspect` command now supports the `--authfile` option, for authentication purposes.
56
- The `podman wait` command now supports `--condition={healthy,unhealthy}`, allowing waits on successful health checks.
67
- The `podman push` command now supports a new option, ` --compression-level`, which specifies the compression level to use ([#18939](https://github.com/containers/podman/issues/18939)).
78
- The `podman machine start` command, when run with `--log-level=debug`, now creates a console window to display the virtual machine while booting.
@@ -51,7 +52,18 @@
5152
- Quadlet now supports the `HostName` field, which sets the container's host name, in `.container` files ([#18486](https://github.com/containers/podman/issues/18486)).
5253

5354
### Bugfixes
54-
- The `podman machine start` command now waits for systemd-user sessions to be up, addressing flaky machine starts ([##17403](https://github.com/containers/podman/issues/#17403)).
55+
- Fixed a bug where the `podman machine start` command would fail with a 255 exit code. It now waits for systemd-user sessions to be up, and for SSH to be ready, addressing the flaky machine starts ([#17403](https://github.com/containers/podman/issues/#17403)).
56+
- Fixed a bug where the `podman auto update` command did not correctly use authentication files when contacting container registries.
57+
- Fixed a bug where the `--dns` option to the `podman run` command was ignored for macvlan networks ([#19169](https://github.com/containers/podman/issues/19169)).
58+
- Fixed a bug in the `podman system service` command where setting LISTEN_FDS when listening on TCP would misbehave.
59+
- Fixed a bug where hostnames were not recognized as a network alias. Containers can now resolve other hostnames, in addition to their names ([#17370](https://github.com/containers/podman/issues/17370)).
60+
- Fixed a bug where the `podman pod run` command would error after a reboot on a non-systemd system ([#19175](https://github.com/containers/podman/issues/19175)).
61+
- Fixed a bug where the `--syslog` option returned a fatal error when no syslog server was found ([#19075](https://github.com/containers/podman/issues/19075)).
62+
- Fixed a bug where the `--mount` option would parse the `readonly` option incorrectly ([#18995](https://github.com/containers/podman/issues/18995)).
63+
- Fixed a bug where hook executables invoked by the `podman run` command set an incorrect working directory. It now sets the correct working directory pointing to the container bundle directory ([#18907](https://github.com/containers/podman/issues/18907)).
64+
- Fixed a bug where the `-device-cgroup-rule` option was silently ignored in rootless mode ([#18698](https://github.com/containers/podman/issues/18698)).
65+
- Listing images is now more resilient towards concurrently running image removals.
66+
- Fixed a bug where the `--force` option to the `podman kube down` command would not remove volumes ([#18797](https://github.com/containers/podman/issues/18797)).
5567
- Fixed a bug where setting the `--list-tags` option in the `podman search` command would cause the command to ignore the `--format` option ([#18939](https://github.com/containers/podman/issues/18939)).
5668
- Fixed a bug where the `podman machine start` command did not properly translate the proxy IP.
5769
- Fixed a bug where the `podman auto-update` command would not restart dependent units (specified via `Requires=`) on auto update ([#18926](https://github.com/containers/podman/issues/18926)).
@@ -101,7 +113,7 @@
101113
- Updated Buildah to v1.31.0
102114
- Updated the containers/storage library to v1.48.0
103115
- Updated the containers/image library to v5.26.1
104-
- Updated the containers/common library to v0.55.1
116+
- Updated the containers/common library to v0.55.2
105117

106118
## 4.5.1
107119
### Security

cmd/podman/auto-update.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/containers/common/pkg/auth"
99
"github.com/containers/common/pkg/completion"
1010
"github.com/containers/common/pkg/report"
11+
"github.com/containers/image/v5/types"
1112
"github.com/containers/podman/v4/cmd/podman/common"
1213
"github.com/containers/podman/v4/cmd/podman/registry"
1314
"github.com/containers/podman/v4/pkg/domain/entities"
@@ -17,7 +18,8 @@ import (
1718

1819
type cliAutoUpdateOptions struct {
1920
entities.AutoUpdateOptions
20-
format string
21+
format string
22+
tlsVerify bool
2123
}
2224

2325
var (
@@ -56,6 +58,8 @@ func init() {
5658

5759
flags.StringVar(&autoUpdateOptions.format, "format", "", "Change the output format to JSON or a Go template")
5860
_ = autoUpdateCommand.RegisterFlagCompletionFunc("format", common.AutocompleteFormat(&autoUpdateOutput{}))
61+
62+
flags.BoolVarP(&autoUpdateOptions.tlsVerify, "tls-verify", "", true, "Require HTTPS and verify certificates when contacting registries")
5963
}
6064

6165
func autoUpdate(cmd *cobra.Command, args []string) error {
@@ -64,6 +68,10 @@ func autoUpdate(cmd *cobra.Command, args []string) error {
6468
return fmt.Errorf("`%s` takes no arguments", cmd.CommandPath())
6569
}
6670

71+
if cmd.Flags().Changed("tls-verify") {
72+
autoUpdateOptions.InsecureSkipTLSVerify = types.NewOptionalBool(!autoUpdateOptions.tlsVerify)
73+
}
74+
6775
allReports, failures := registry.ContainerEngine().AutoUpdate(registry.GetContext(), autoUpdateOptions.AutoUpdateOptions)
6876
if allReports == nil {
6977
return errorhandling.JoinErrors(failures)

cmd/podman/inspect/inspect.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,16 @@ func (i *inspector) inspect(namesOrIDs []string) error {
185185
err = rpt.Execute(data)
186186
}
187187
if err != nil {
188-
errs = append(errs, fmt.Errorf("printing inspect output: %w", err))
188+
errs = append(errs, err)
189189
}
190190

191191
if len(errs) > 0 {
192192
if len(errs) > 1 {
193193
for _, err := range errs[1:] {
194-
fmt.Fprintf(os.Stderr, "error inspecting object: %v\n", err)
194+
fmt.Fprintf(os.Stderr, "%v\n", err)
195195
}
196196
}
197-
return fmt.Errorf("inspecting object: %w", errs[0])
197+
return errs[0]
198198
}
199199
return nil
200200
}

cmd/podman/machine/init.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func init() {
6161
flags.Uint64Var(
6262
&initOpts.DiskSize,
6363
diskSizeFlagName, cfg.ContainersConfDefaultsRO.Machine.DiskSize,
64-
"Disk size in GB",
64+
"Disk size in GiB",
6565
)
6666

6767
_ = initCmd.RegisterFlagCompletionFunc(diskSizeFlagName, completion.AutocompleteNone)
@@ -70,7 +70,7 @@ func init() {
7070
flags.Uint64VarP(
7171
&initOpts.Memory,
7272
memoryFlagName, "m", cfg.ContainersConfDefaultsRO.Machine.Memory,
73-
"Memory in MB",
73+
"Memory in MiB",
7474
)
7575
_ = initCmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone)
7676

cmd/podman/machine/list.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ func toHumanFormat(vms []*machine.ListResponse) ([]*entities.ListReporter, error
216216
response.Created = units.HumanDuration(time.Since(vm.CreatedAt)) + " ago"
217217
response.VMType = vm.VMType
218218
response.CPUs = vm.CPUs
219-
response.Memory = units.HumanSize(float64(vm.Memory))
220-
response.DiskSize = units.HumanSize(float64(vm.DiskSize))
219+
response.Memory = units.BytesSize(float64(vm.Memory))
220+
response.DiskSize = units.BytesSize(float64(vm.DiskSize))
221221

222222
humanResponses = append(humanResponses, response)
223223
}

cmd/podman/machine/set.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func init() {
6161
flags.Uint64Var(
6262
&setFlags.DiskSize,
6363
diskSizeFlagName, 0,
64-
"Disk size in GB",
64+
"Disk size in GiB",
6565
)
6666

6767
_ = setCmd.RegisterFlagCompletionFunc(diskSizeFlagName, completion.AutocompleteNone)
@@ -70,7 +70,7 @@ func init() {
7070
flags.Uint64VarP(
7171
&setFlags.Memory,
7272
memoryFlagName, "m", 0,
73-
"Memory in MB",
73+
"Memory in MiB",
7474
)
7575
_ = setCmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone)
7676

cmd/podman/manifest/inspect.go

+11-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package manifest
33
import (
44
"fmt"
55

6+
"github.com/containers/common/pkg/auth"
7+
"github.com/containers/common/pkg/completion"
68
"github.com/containers/image/v5/types"
79
"github.com/containers/podman/v4/cmd/podman/common"
810
"github.com/containers/podman/v4/cmd/podman/registry"
@@ -11,8 +13,9 @@ import (
1113
)
1214

1315
var (
14-
tlsVerifyCLI bool
15-
inspectCmd = &cobra.Command{
16+
inspectOptions entities.ManifestInspectOptions
17+
tlsVerifyCLI bool
18+
inspectCmd = &cobra.Command{
1619
Use: "inspect [options] IMAGE",
1720
Short: "Display the contents of a manifest list or image index",
1821
Long: "Display the contents of a manifest list or image index.",
@@ -30,6 +33,9 @@ func init() {
3033
})
3134
flags := inspectCmd.Flags()
3235

36+
authfileFlagName := "authfile"
37+
flags.StringVar(&inspectOptions.Authfile, authfileFlagName, auth.GetDefaultAuthFile(), "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
38+
_ = inspectCmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
3339
flags.BoolP("verbose", "v", false, "Added for Docker compatibility")
3440
_ = flags.MarkHidden("verbose")
3541
flags.BoolVar(&tlsVerifyCLI, "tls-verify", true, "require HTTPS and verify certificates when accessing the registry")
@@ -38,14 +44,13 @@ func init() {
3844
}
3945

4046
func inspect(cmd *cobra.Command, args []string) error {
41-
opts := entities.ManifestInspectOptions{}
4247
if cmd.Flags().Changed("tls-verify") {
43-
opts.SkipTLSVerify = types.NewOptionalBool(!tlsVerifyCLI)
48+
inspectOptions.SkipTLSVerify = types.NewOptionalBool(!tlsVerifyCLI)
4449
} else if cmd.Flags().Changed("insecure") {
4550
insecure, _ := cmd.Flags().GetBool("insecure")
46-
opts.SkipTLSVerify = types.NewOptionalBool(insecure)
51+
inspectOptions.SkipTLSVerify = types.NewOptionalBool(insecure)
4752
}
48-
buf, err := registry.ImageEngine().ManifestInspect(registry.Context(), args[0], opts)
53+
buf, err := registry.ImageEngine().ManifestInspect(registry.Context(), args[0], inspectOptions)
4954
if err != nil {
5055
return err
5156
}

cmd/podman/syslog_common.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
package main
55

66
import (
7-
"fmt"
87
"log/syslog"
9-
"os"
108

119
"github.com/sirupsen/logrus"
1210
logrusSyslog "github.com/sirupsen/logrus/hooks/syslog"
@@ -19,10 +17,8 @@ func syslogHook() {
1917

2018
hook, err := logrusSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "")
2119
if err != nil {
22-
fmt.Fprint(os.Stderr, "Failed to initialize syslog hook: "+err.Error())
23-
os.Exit(1)
24-
}
25-
if err == nil {
20+
logrus.Debug("Failed to initialize syslog hook: " + err.Error())
21+
} else {
2622
logrus.AddHook(hook)
2723
}
2824
}

docs/kubernetes_support.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ Note: **N/A** means that the option cannot be supported in a single-node Podman
5252
| shareProcessNamespace ||
5353
| serviceAccountName | no |
5454
| automountServiceAccountToken | no |
55-
| securityContext\.runAsUser | no |
55+
| securityContext\.runAsUser | |
5656
| securityContext\.runAsNonRoot | no |
57-
| securityContext\.runAsGroup | no |
58-
| securityContext\.supplementalGroups | no |
57+
| securityContext\.runAsGroup | |
58+
| securityContext\.supplementalGroups | |
5959
| securityContext\.fsGroup | no |
6060
| securityContext\.fsGroupChangePolicy | no |
6161
| securityContext\.seccompProfile\.type | no |
6262
| securityContext\.seccompProfile\.localhostProfile | no |
63-
| securityContext\.seLinuxOptions\.level | no |
64-
| securityContext\.seLinuxOptions\.role | no |
65-
| securityContext\.seLinuxOptions\.type | no |
66-
| securityContext\.seLinuxOptions\.user | no |
63+
| securityContext\.seLinuxOptions\.level | |
64+
| securityContext\.seLinuxOptions\.role | |
65+
| securityContext\.seLinuxOptions\.type | |
66+
| securityContext\.seLinuxOptions\.user | |
6767
| securityContext\.sysctls\.name | no |
6868
| securityContext\.sysctls\.value | no |
6969
| securityContext\.windowsOptions\.gmsaCredentialSpec | no |

docs/source/markdown/options/authfile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
####> This option file is used in:
2-
####> podman auto update, build, container runlabel, create, image sign, kube play, login, logout, manifest add, manifest push, pull, push, run, search
2+
####> podman auto update, build, container runlabel, create, image sign, kube play, login, logout, manifest add, manifest inspect, manifest push, pull, push, run, search
33
####> If file is edited, make sure the changes
44
####> are applicable to all of those.
55
#### **--authfile**=*path*

docs/source/markdown/options/tls-verify.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
####> This option file is used in:
2-
####> podman build, container runlabel, create, kube play, login, manifest add, manifest create, manifest inspect, manifest push, pull, push, run, search
2+
####> podman auto update, build, container runlabel, create, kube play, login, manifest add, manifest create, manifest inspect, manifest push, pull, push, run, search
33
####> If file is edited, make sure the changes
44
####> are applicable to all of those.
55
#### **--tls-verify**

docs/source/markdown/options/uidmap.container.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ option conflicts with the **--userns** and **--subuidname** options. This
99
option provides a way to map host UIDs to container UIDs. It can be passed
1010
several times to map different ranges.
1111

12-
The _from_uid_ value is based upon the user running the command, either rootful or rootless users.
12+
The *from_uid* value is based upon the user running the command, either rootful or rootless users.
1313
* rootful user: *container_uid*:*host_uid*:*amount*
1414
* rootless user: *container_uid*:*intermediate_uid*:*amount*
1515

@@ -23,13 +23,13 @@ If for example _amount_ is **4** the mapping looks like:
2323

2424
| host UID | container UID |
2525
| ---------- | ---------------- |
26-
| _from_uid_ | _container_uid_ |
27-
| _from_uid_ + 1 | _container_uid_ + 1 |
28-
| _from_uid_ + 2 | _container_uid_ + 2 |
29-
| _from_uid_ + 3 | _container_uid_ + 3 |
26+
| *from_uid* | *container_uid* |
27+
| *from_uid* + 1 | *container_uid* + 1 |
28+
| *from_uid* + 2 | *container_uid* + 2 |
29+
| *from_uid* + 3 | *container_uid* + 3 |
3030

3131
When **podman <<subcommand>>** is called by an unprivileged user (i.e. running rootless),
32-
the value _from_uid_ is interpreted as an "intermediate UID". In the rootless
32+
the value *from_uid* is interpreted as an "intermediate UID". In the rootless
3333
case, host UIDs are not mapped directly to container UIDs. Instead the mapping
3434
happens over two mapping steps:
3535

@@ -59,11 +59,11 @@ If for example _amount_ is **5** the second mapping step looks like:
5959

6060
| intermediate UID | container UID |
6161
| ------------------ | ---------------- |
62-
| _from_uid_ | _container_uid_ |
63-
| _from_uid_ + 1 | _container_uid_ + 1 |
64-
| _from_uid_ + 2 | _container_uid_ + 2 |
65-
| _from_uid_ + 3 | _container_uid_ + 3 |
66-
| _from_uid_ + 4 | _container_uid_ + 4 |
62+
| *from_uid* | *container_uid* |
63+
| *from_uid* + 1 | *container_uid* + 1 |
64+
| *from_uid* + 2 | *container_uid* + 2 |
65+
| *from_uid* + 3 | *container_uid* + 3 |
66+
| *from_uid* + 4 | *container_uid* + 4 |
6767

6868
When running as rootless, Podman uses all the ranges configured in the _/etc/subuid_ file.
6969

docs/source/markdown/podman-auto-update.1.md.in

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Please note that detecting if a systemd unit has failed is best done by the cont
7979

8080
For a container to send the READY message via SDNOTIFY it must be created with the `--sdnotify=container` option (see podman-run(1)). The application running inside the container can then execute `systemd-notify --ready` when ready or use the sdnotify bindings of the specific programming language (e.g., sd_notify(3)).
8181

82+
@@option tls-verify
8283

8384
## EXAMPLES
8485
Autoupdate with registry policy

docs/source/markdown/podman-machine-init.1.md.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Number of CPUs.
3636

3737
#### **--disk-size**=*number*
3838

39-
Size of the disk for the guest VM in GB.
39+
Size of the disk for the guest VM in GiB.
4040

4141
#### **--help**
4242

@@ -57,7 +57,7 @@ Defaults to `testing`.
5757

5858
#### **--memory**, **-m**=*number*
5959

60-
Memory (in MB).
60+
Memory (in MiB). Note: 1024MiB = 1GiB.
6161

6262
#### **--now**
6363

docs/source/markdown/podman-manifest-inspect.1.md.in

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ A formatted JSON representation of the manifest list or image index.
1515

1616
## OPTIONS
1717

18+
@@option authfile
19+
1820
@@option tls-verify
1921

2022
## EXAMPLES

0 commit comments

Comments
 (0)