Fix option conflict in Zun CNI for recent Docker

With recent Docker, trying to create a container via API by
specifying both network 'none' and a MAC address results in a
Bad Request error: 'conflicting options: mac-address and the
network mode'
Remove MAC address from initial container setup.

Change-Id: I7749ca3f002472b7588aeac7331eda5ba6cb6d1b
This commit is contained in:
Lana Kaleif 2025-01-24 07:04:34 -05:00
parent af65475776
commit 9d3e25e504

View File

@ -110,7 +110,6 @@ class ZunCNI(network.Network):
container.save(self.context)
host_config['network_mode'] = 'none'
container_kwargs['mac_address'] = port['mac_address']
# We manipulate entrypoint and command parameters in here.
token = (container.entrypoint or []) + (container.command or [])