Skip to content

Commit 4ad9e00

Browse files
Merge pull request #13133 from mheon/bump_400_rc4
Bump to v4.0.0-RC4
2 parents 337f706 + cad3eb7 commit 4ad9e00

File tree

113 files changed

+1710
-365
lines changed

Some content is hidden

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

113 files changed

+1710
-365
lines changed

RELEASE_NOTES.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
- The Podman APIs for Manifest List and Network operations have been completely rewritten to address issues and inconsistencies in the previous APIs.
7474
- The `make install` makefile target no longer implicitly builds Podman, and will fail if `make` was not run prior to it.
7575
- The `podman rm --depends`, `podman rmi --force`, and `podman network rm --force` commands can now remove pods if a they need to remove an infra container (e.g. `podman rmi --force` on the infra image will remove all pods and infra containers). Previously, any command that tried to remove an infra container would error.
76+
- The `podman system reset` command now removes all networks on the system, in addition to all volumes, pods, containers, and images.
7677
- If the `CONTAINER_HOST` environment variable is set, Podman will default to connecting to the remote Podman service specified by the environment variable, instead of running containers locally ([#11196](https://github.com/containers/podman/issues/11196)).
7778
- Healthcheck information from `podman inspect` on a container has had its JSON tag renamed from `Healthcheck` to `Health` for improved Docker compatibility. An alias has been added so that using the old name with the `--format` option will still work ([#11645](https://github.com/containers/podman/issues/11645)).
7879
- Secondary IP and IPv6 addresses from `podman inspect` on a container (`SecondaryIPAddresses` and `SecondaryIPv6Addresses`) have been changed from arrays of strings to arrays of structs for improved Docker compatibility (the struct now includes IP address and prefix length).
@@ -85,6 +86,8 @@
8586
### Changes
8687
- Podman containers will now automatically add the container's short ID as a network alias when connected to a supporting network ([#11748](https://github.com/containers/podman/issues/11748)).
8788
- The `podman machine stop` command will now log when machines are successfully stopped ([#11542](https://github.com/containers/podman/issues/11542)).
89+
- The `podman machine stop` command now waits until the VM has stopped to return; previously, it returned immediately after the shutdown command was sent, without waiting for the VM to shut down.
90+
- VMs created by `podman machine` now delegate more cgroup controllers to the rootless user used to run containers, allowing for additional resource limits to be used ([#13054](https://github.com/containers/podman/issues/13054)).
8891
- The `podman stop` command will now log a warning to the console if the stop timeout expires and `SIGKILL` must be used to stop the container ([#11854](https://github.com/containers/podman/issues/11854)).
8992
- Several performance optimizations have been implemented that should speed up container and pod creation, and running containers and pods that forward large ranges of ports.
9093
- The `--no-trunc` argument to the `podman search` command now defaults to true.
@@ -96,7 +99,6 @@
9699
- The `--cni-config-dir` option to all Podman commands has been renamed to `--network-config-dir` as it will not be used with Netavark as well as CNI. The old name has been aliased to the new one and will still function, but may be removed in a future release.
97100
- The `--format` option to all Podman commands has been changed to improved functionality and Docker compatibility ([#10974](https://github.com/containers/podman/issues/10974)).
98101
- The `podman ps --external` flag previously required `--all` to also be specified; this is no longer true
99-
- The `podman machine stop` command now waits until the VM has stopped to return; previously, it returned immediately after the shutdown command was sent, without waiting for the VM to shut down.
100102
- The port-forwarding logic previously contined in the `podman-machine-cni` CNI plugin has been integrated directly into Podman. The `podman-machine-cni` plugin is no longer necessary and should be removed.
101103
- The `--device` flag to `podman create`, `podman run`, and `podman pod create` would previously refuse to mount devices when Podman was run as a non-root user and no permission to access the device was available; it will now mount these devices without checking permissions ([#12704](https://github.com/containers/podman/issues/12704)).
102104

@@ -130,6 +132,7 @@
130132
- Fixed a bug where VMs created by `podman machine` did not match their timezone to the host system ([#11895](https://github.com/containers/podman/issues/11895)).
131133
- Fixed a bug where container healthchecks were not properly cleaning up generated systemd services, leading to healthcheck failures after containers were restarted.
132134
- Fixed a bug where the `podman build` command did not properly propagate non-0 exit codes from Buildah when builds failed.
135+
- Fixed a bug where the remote Podman client's `podman build` command could fail to build images when the remote client was run on Windows and the Containerfile contained `COPY` instructions ([#13119](https://github.com/containers/podman/issues/13119)).
133136
- Fixed a bug where the remote Podman client's `--secret` option to the `podman build` command was nonfunctional.
134137
- Fixed a bug where the remote Podman client's `podman build` command would error if given a relative path to a Containerfile ([#12841](https://github.com/containers/podman/issues/12841)).
135138
- Fixed a bug where the `podman generate kube` command would sometimes omit environment variables set in containers from generated YAML.
@@ -150,6 +153,9 @@
150153
- Fixed a bug where, when Podman's storage directories were on an NFS filesystem, Podman would leave some unneeded file descriptors open, causing errors when containers were removed.
151154
- Fixed a bug where, when Podman's storage directories were on an NFS filesystem, cleaning up a container's exec sessions could fail.
152155
- Fixed a bug where Podman commands that operate on a container could give an incorrect error message if given a partial ID that could refer to 2 or more containers ([#12963](https://github.com/containers/podman/issues/12963)).
156+
- Fixed a bug where the `podman stats` command would not show network usage statistics on containers using `slirp4netns` for networking ([#11695](https://github.com/containers/podman/issues/11695)).
157+
- Fixed a bug where the `/dev/shm` mount in the container was not mounted with `nosuid`, `noexec`, and `nodev` mount options.
158+
- Fixed a bug where the `--shm-size` option to `podman create` and `podman run` interpeted human-readable sizes as KB instead of KiB, and GB instead of GiB (such that a kilobyte was interpreted as 1000 bytes, instead of 1024 bytes) ([#13096](https://github.com/containers/podman/issues/13096)).
153159

154160
### API
155161
- The Podman remote API version has been bumped to v4.0.0.

cmd/podman/common/netflags.go

Lines changed: 56 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -103,69 +103,79 @@ func NetFlagsToNetOptions(opts *entities.NetOptions, flags pflag.FlagSet) (*enti
103103
opts = &entities.NetOptions{}
104104
}
105105

106-
opts.AddHosts, err = flags.GetStringSlice("add-host")
107-
if err != nil {
108-
return nil, err
109-
}
110-
// Verify the additional hosts are in correct format
111-
for _, host := range opts.AddHosts {
112-
if _, err := parse.ValidateExtraHost(host); err != nil {
106+
if flags.Changed("add-host") {
107+
opts.AddHosts, err = flags.GetStringSlice("add-host")
108+
if err != nil {
113109
return nil, err
114110
}
111+
// Verify the additional hosts are in correct format
112+
for _, host := range opts.AddHosts {
113+
if _, err := parse.ValidateExtraHost(host); err != nil {
114+
return nil, err
115+
}
116+
}
115117
}
116118

117-
servers, err := flags.GetStringSlice("dns")
118-
if err != nil {
119-
return nil, err
120-
}
121-
for _, d := range servers {
122-
if d == "none" {
123-
opts.UseImageResolvConf = true
124-
if len(servers) > 1 {
125-
return nil, errors.Errorf("%s is not allowed to be specified with other DNS ip addresses", d)
126-
}
127-
break
119+
if flags.Changed("dns") {
120+
servers, err := flags.GetStringSlice("dns")
121+
if err != nil {
122+
return nil, err
128123
}
129-
dns := net.ParseIP(d)
130-
if dns == nil {
131-
return nil, errors.Errorf("%s is not an ip address", d)
124+
for _, d := range servers {
125+
if d == "none" {
126+
opts.UseImageResolvConf = true
127+
if len(servers) > 1 {
128+
return nil, errors.Errorf("%s is not allowed to be specified with other DNS ip addresses", d)
129+
}
130+
break
131+
}
132+
dns := net.ParseIP(d)
133+
if dns == nil {
134+
return nil, errors.Errorf("%s is not an ip address", d)
135+
}
136+
opts.DNSServers = append(opts.DNSServers, dns)
132137
}
133-
opts.DNSServers = append(opts.DNSServers, dns)
134138
}
135139

136-
options, err := flags.GetStringSlice("dns-opt")
137-
if err != nil {
138-
return nil, err
140+
if flags.Changed("dns-opt") {
141+
options, err := flags.GetStringSlice("dns-opt")
142+
if err != nil {
143+
return nil, err
144+
}
145+
opts.DNSOptions = options
139146
}
140-
opts.DNSOptions = options
141147

142-
dnsSearches, err := flags.GetStringSlice("dns-search")
143-
if err != nil {
144-
return nil, err
145-
}
146-
// Validate domains are good
147-
for _, dom := range dnsSearches {
148-
if dom == "." {
149-
if len(dnsSearches) > 1 {
150-
return nil, errors.Errorf("cannot pass additional search domains when also specifying '.'")
151-
}
152-
continue
153-
}
154-
if _, err := parse.ValidateDomain(dom); err != nil {
148+
if flags.Changed("dns-search") {
149+
dnsSearches, err := flags.GetStringSlice("dns-search")
150+
if err != nil {
155151
return nil, err
156152
}
153+
// Validate domains are good
154+
for _, dom := range dnsSearches {
155+
if dom == "." {
156+
if len(dnsSearches) > 1 {
157+
return nil, errors.Errorf("cannot pass additional search domains when also specifying '.'")
158+
}
159+
continue
160+
}
161+
if _, err := parse.ValidateDomain(dom); err != nil {
162+
return nil, err
163+
}
164+
}
165+
opts.DNSSearch = dnsSearches
157166
}
158-
opts.DNSSearch = dnsSearches
159167

160-
inputPorts, err := flags.GetStringSlice("publish")
161-
if err != nil {
162-
return nil, err
163-
}
164-
if len(inputPorts) > 0 {
165-
opts.PublishPorts, err = specgenutil.CreatePortBindings(inputPorts)
168+
if flags.Changed("publish") {
169+
inputPorts, err := flags.GetStringSlice("publish")
166170
if err != nil {
167171
return nil, err
168172
}
173+
if len(inputPorts) > 0 {
174+
opts.PublishPorts, err = specgenutil.CreatePortBindings(inputPorts)
175+
if err != nil {
176+
return nil, err
177+
}
178+
}
169179
}
170180

171181
opts.NoHosts, err = flags.GetBool("no-hosts")

cmd/podman/images/scp.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,17 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) {
146146
return err
147147
}
148148

149+
allLocal := true // if we are all localhost, do not validate connections but if we are using one localhost and one non we need to use sshd
150+
for _, val := range cliConnections {
151+
if !strings.Contains(val, "@localhost::") {
152+
allLocal = false
153+
break
154+
}
155+
}
156+
if allLocal {
157+
cliConnections = []string{}
158+
}
159+
149160
var serv map[string]config.Destination
150161
serv, err = GetServiceInformation(cliConnections, cfg)
151162
if err != nil {

cmd/podman/images/scp_utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ func parseImageSCPArg(arg string) (*entities.ImageScpOptions, []string, error) {
1717
cliConnections := []string{}
1818

1919
switch {
20-
case strings.Contains(arg, "@localhost"): // image transfer between users
20+
case strings.Contains(arg, "@localhost::"): // image transfer between users
2121
location.User = strings.Split(arg, "@")[0]
2222
location, err = validateImagePortion(location, arg)
2323
if err != nil {
2424
return nil, nil, err
2525
}
26+
cliConnections = append(cliConnections, arg)
2627
case strings.Contains(arg, "::"):
2728
location, err = validateImagePortion(location, arg)
2829
if err != nil {

cmd/podman/pods/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func init() {
7575
if !registry.IsRemote() {
7676
defInfraImage = containerConfig.Engine.InfraImage
7777
}
78-
flags.StringVar(&infraImage, infraImageFlagName, defInfraImage, "The image of the infra container to associate with the pod")
78+
flags.StringVar(&infraImage, infraImageFlagName, defInfraImage, "Image to use to override builtin infra container")
7979
_ = createCommand.RegisterFlagCompletionFunc(infraImageFlagName, common.AutocompleteImages)
8080

8181
podIDFileFlagName := "pod-id-file"

cmd/podman/system/reset.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
var (
2222
systemResetDescription = `Reset podman storage back to default state"
2323
24-
All containers will be stopped and removed, and all images, volumes and container content will be removed.
24+
All containers will be stopped and removed, and all images, volumes, networks and container content will be removed.
2525
`
2626
systemResetCommand = &cobra.Command{
2727
Annotations: map[string]string{registry.EngineMode: registry.ABIMode},
@@ -55,11 +55,11 @@ func reset(cmd *cobra.Command, args []string) {
5555
// Prompt for confirmation if --force is not set
5656
if !forceFlag {
5757
reader := bufio.NewReader(os.Stdin)
58-
fmt.Println(`
59-
WARNING! This will remove:
58+
fmt.Println(`WARNING! This will remove:
6059
- all containers
6160
- all pods
6261
- all images
62+
- all networks
6363
- all build cache`)
6464
if len(listCtn) > 0 {
6565
fmt.Println(`WARNING! The following external containers will be purged:`)

docs/source/markdown/podman-attach.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The default is `ctrl-p,ctrl-q`.
2222

2323
Instead of providing the *container ID* or *name*, use the last created *container*. If other methods than Podman are used to run *containers* such as `CRI-O`, the last started *container* could be from either of those methods.\
2424
The default is **false**.\
25-
*IMPORTANT: This OPTION is not available with the remote Podman client. This OPTION does not need a container name or ID as input argument.*
25+
*IMPORTANT: This OPTION is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. This OPTION does not need a container name or ID as input argument.*
2626

2727
#### **--no-stdin**
2828

docs/source/markdown/podman-build.1.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ resulting image's configuration.
9494
#### **--cache-from**
9595

9696
Images to utilize as potential cache sources. Podman does not currently support
97-
caching so this is a NOOP. (This option is not available with the remote Podman client)
97+
caching so this is a NOOP. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
9898

9999
#### **--cap-add**=*CAP\_xxx*
100100

@@ -119,7 +119,7 @@ given.
119119
#### **--cert-dir**=*path*
120120

121121
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry. (Default: /etc/containers/certs.d)
122-
Please refer to containers-certs.d(5) for details. (This option is not available with the remote Podman client)
122+
Please refer to containers-certs.d(5) for details. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
123123

124124
#### **--cgroup-parent**=*path*
125125

@@ -138,7 +138,7 @@ that the cgroup namespace in which `buildah` itself is being run should be reuse
138138

139139
This option is added to be aligned with other containers CLIs.
140140
Podman doesn't communicate with a daemon or a remote server.
141-
Thus, compressing the data before sending it is irrelevant to Podman. (This option is not available with the remote Podman client)
141+
Thus, compressing the data before sending it is irrelevant to Podman. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
142142

143143
#### **--cpu-period**=*limit*
144144

@@ -257,7 +257,7 @@ specifying **--disable-compression=false**.
257257

258258
This is a Docker specific option to disable image verification to a container
259259
registry and is not supported by Podman. This option is a NOOP and provided
260-
solely for scripting compatibility. (This option is not available with the remote Podman client)
260+
solely for scripting compatibility. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
261261

262262
#### **--dns**=*dns*
263263

@@ -546,7 +546,7 @@ size entirely, the system uses `64m`.
546546

547547
#### **--sign-by**=*fingerprint*
548548

549-
Sign the image using a GPG key with the specified FINGERPRINT. (This option is not available with the remote Podman client)
549+
Sign the image using a GPG key with the specified FINGERPRINT. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines,)
550550

551551
#### **--squash**
552552

@@ -600,7 +600,7 @@ timestamp.
600600
#### **--tls-verify**
601601

602602
Require HTTPS and verify certificates when talking to container registries
603-
(defaults to true). (This option is not available with the remote Podman client)
603+
(defaults to true). (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
604604

605605
#### **--ulimit**=*type*=*soft-limit*[:*hard-limit*]
606606

@@ -727,7 +727,7 @@ using the architecture variant of the build host.
727727

728728
Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, Podman
729729
bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the Podman
730-
container. (This option is not available with the remote Podman client)
730+
container. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
731731

732732
The `OPTIONS` are a comma-separated list and can be: <sup>[[1]](#Footnote1)</sup>
733733

docs/source/markdown/podman-container-checkpoint.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The default is **false**.
5757

5858
Instead of providing the *container ID* or *name*, use the last created *container*. If other methods than Podman are used to run *containers* such as `CRI-O`, the last started *container* could be from either of those methods.\
5959
The default is **false**.\
60-
*IMPORTANT: This OPTION is not available with the remote Podman client. This OPTION does not need a container name or ID as input argument.*
60+
*IMPORTANT: This OPTION is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. This OPTION does not need a container name or ID as input argument.*
6161

6262
#### **--leave-running**, **-R**
6363

docs/source/markdown/podman-container-cleanup.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Can only be specified if a single *container* is being cleaned up (conflicts wit
2727

2828
Instead of providing the *container ID* or *name*, use the last created *container*. If other methods than Podman are used to run *containers* such as `CRI-O`, the last started *container* could be from either of those methods.\
2929
The default is **false**.\
30-
*IMPORTANT: This OPTION is not available with the remote Podman client. This OPTION does not need a container name or ID as input argument.*
30+
*IMPORTANT: This OPTION is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. This OPTION does not need a container name or ID as input argument.*
3131

3232
#### **--rm**
3333

0 commit comments

Comments
 (0)