forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(rootful) docker-compose now updates network MTU
Previously, the following network block did not update using docker-compose: ``` networks: default: driver: bridge driver_opts: mtu: 9000 ``` In the API, the network options were previously not being handled when the network was being created. I translated the docker options into podman options, and added the options to the network. When doing `podman network inspect <network>`, the results now contain `"mtu": "9000"` Fixes: containers#14482 Signed-off-by: Jake Correnti <[email protected]>
- Loading branch information
Jake Correnti
committed
Jul 5, 2022
1 parent
1ada01a
commit 488eb3b
Showing
3 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: '3.7' | ||
|
||
services: | ||
nginx: | ||
image: alpine | ||
ports: | ||
- 8000:5000 | ||
networks: | ||
- default | ||
- macvlan_net | ||
|
||
networks: | ||
default: | ||
driver: bridge | ||
driver_opts: | ||
com.docker.network.bridge.name: docker0 | ||
com.docker.network.driver.mtu: 9000 | ||
macvlan_net: | ||
driver: macvlan | ||
driver_opts: | ||
mode: bridge | ||
ipam: | ||
config: | ||
- | ||
subnet: 192.168.20.0/24 | ||
gateway: 192.168.20.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- bash -*- | ||
|
||
podman network inspect --format='{{ range . }} {{ .Options.mtu }} {{ end }}' update_network_mtu_default | ||
like "$output" "9000" "$testname : network mtu is set" | ||
|
||
podman network inspect --format='{{ range . }} {{ .NetworkInterface }} {{ end }}' update_network_mtu_default | ||
like "$output" "docker0" "$testname: network interface is set" | ||
|
||
podman network inspect --format='{{ range . }} {{ .Options.mode }} {{ end }}' update_network_mtu_macvlan_net | ||
like "$output" "bridge" "$testname : network mode is set" |