moby/integration
Rob Murray 5b13a38144 Only restore a configured MAC addr on restart.
The API's EndpointConfig struct has a MacAddress field that's used for
both the configured address, and the current address (which may be generated).

A configured address must be restored when a container is restarted, but a
generated address must not.

The previous attempt to differentiate between the two, without adding a field
to the API's EndpointConfig that would show up in 'inspect' output, was a
field in the daemon's version of EndpointSettings, MACOperational. It did
not work, MACOperational was set to true when a configured address was
used. So, while it ensured addresses were regenerated, it failed to preserve
a configured address.

So, this change removes that code, and adds DesiredMacAddress to the wrapped
version of EndpointSettings, where it is persisted but does not appear in
'inspect' results. Its value is copied from MacAddress (the API field) when
a container is created.

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit dae33031e0)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2024-02-02 09:10:04 +01:00
..
build integration/build: Use setupTest 2023-12-05 12:49:30 +01:00
capabilities api/types: move ContainerLogsOptions to api/types/container 2023-10-12 11:30:12 +02:00
config Don't run tests twice 2023-09-19 11:37:55 +02:00
container daemon: rename: don't reload endpoint from datastore 2024-01-23 22:53:43 +01:00
daemon integration/TestLiveRestore: Wait for process to exit 2023-11-30 10:15:58 +01:00
distribution bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
image integration/image: Move Parallel after setupTest 2024-01-16 14:45:26 +01:00
internal libnetwork: loosen container IPAM validation 2024-01-20 11:33:04 +01:00
network integration(-cli): remove skips for old daemon versions (<20.10) 2023-12-05 01:03:50 +01:00
networking Only restore a configured MAC addr on restart. 2024-02-02 09:10:04 +01:00
plugin Update authz plugin test to not use httputil 2023-12-18 13:16:36 -08:00
secret Wire up tests to support otel tracing 2023-09-07 18:38:22 +00:00
service libnet: remove Endpoint.anonymous 2023-12-20 19:04:37 +01:00
session integration(-cli): remove skips for old daemon versions (<20.10) 2023-12-05 01:03:50 +01:00
system integration(-cli): remove skips for old daemon versions (<20.10) 2023-12-05 01:03:50 +01:00
testdata/https Update test certificates 2021-05-18 09:43:21 +02:00
volume integration: Fix Parallel before setupTest 2024-01-17 13:06:05 +01:00
doc.go Add canonical import comment 2018-02-05 16:51:57 -05:00