Skip to content

Inconsistencies in network configuration state apply #2251

Open
@cywang117

Description

@cywang117

Problem

On a release update where the only thing that changes is the network configuration, a network won't be removed if it has a custom configuration and the target config of that network is the default config

Reproduction

With the following two releases:

version: '2.4'

services:
  one:
    image: alpine
    command: sh -c "echo one-new && sleep infinity"
    stop_signal: SIGKILL
    networks:
      - test
  two:
    image: alpine
    command: sh -c "echo two-new && sleep infinity"
    stop_signal: SIGKILL
    networks:
      - test

networks:
  test:
    ipam:
      driver: default
      config:
        - subnet: 172.28.0.0/16
          gateway: 172.28.5.254
version: '2.4'

services:
  one:
    image: alpine
    command: sh -c "echo one-new && sleep infinity"
    stop_signal: SIGKILL
    networks:
      - test
  two:
    image: alpine
    command: sh -c "echo two-new && sleep infinity"
    stop_signal: SIGKILL
    networks:
      - test

networks:
  test:

Pin back and forth between them, and observe that once a network has been configured with the custom ipam configs, it won't ever be recreated with the default configs even if pinning to the latter release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions