Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[25.0 backport] Don't create endpoint config for MAC addr config migration #47510

Merged

Commits on Mar 6, 2024

  1. Don't create endpoint config for MAC addr config migration

    In a container-create API request, HostConfig.NetworkMode (the identity
    of the "main" network) may be a name, id or short-id.
    
    The configuration for that network, including preferred IP address etc,
    may be keyed on network name or id - it need not match the NetworkMode.
    
    So, when migrating the old container-wide MAC address to the new
    per-endpoint field - it is not safe to create a new EndpointSettings
    entry unless there is no possibility that it will duplicate settings
    intended for the same network (because one of the duplicates will be
    discarded later, dropping the settings it contains).
    
    This change introduces a new API restriction, if the deprecated container
    wide field is used in the new API, and EndpointsConfig is provided for
    any network, the NetworkMode and key under which the EndpointsConfig is
    store must be the same - no mixing of ids and names.
    
    Signed-off-by: Rob Murray <rob.murray@docker.com>
    (cherry picked from commit a580544)
    Signed-off-by: Albin Kerouanton <albinker@gmail.com>
    robmry authored and akerouanton committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    0451b28 View commit details
    Browse the repository at this point in the history