Skip to content

odoo_net_setup fails with external attachable Swarm overlay networks (DNS_INTERNAL_FROM_DOCKER=1) #633

Description

@pleirb

Hi!

I found an issue when combining:

Docker Compose (standalone)
External attachable Swarm overlay networks
docker-whitelist-gateway-service

The stack is started with:

docker compose -f test.yaml up

The odoo service was connected to multiple networks:


networks:
  default:
  inverseproxy_shared:
  globalwhitelist_shared:
  whitelist:

Where inverseproxy_shared and globalwhitelist_shared are external attachable Swarm overlay networks.

With:

DNS_INTERNAL_FROM_DOCKER: "1"

odoo_net_setup crashes with:

RuntimeError: Could not determine the primary default network from the main container
ERROR: failed to generate internal DNS hosts from Docker

Odoo starts correctly, but the whitelist gateway setup is incomplete.

The workaround that solved the issue was:

DNS_INTERNAL_FROM_DOCKER: "0"

Additionally:

removing globalwhitelist_shared from odoo
adding globalwhitelist_shared to proxy_general

Resulting topology:

odoo

proxy_general

globalwhitelist_shared

Question:

Is this mixed Compose + Swarm overlay setup unsupported/expected, or could the autodetection logic eventually support multiple external overlay networks more gracefully?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions