Skip to content

A stack with no broker dials the shared estate Kafka instead of failing #125

Description

@catinspace-au

A dfe-docker stack with no in-stack broker silently dials the SHARED ESTATE broker instead of failing.

Found standing up a second stack on desktop-derek. The loader was briefly on a kafka-transport config with no broker in its own compose project. It did not fail fast. It connected to 10.66.0.200 -- the devex estate broker.

The mechanism is DNS, not config:

  • The container's /etc/resolv.conf carries search devex.hyperi.io with ndots:0.
  • ndots:0 means a bare single-label name gets the search suffix applied.
  • So kafka resolves to kafka.devex.hyperi.io, which is the estate broker.

Nothing in the stack is wrong. The default kafka hostname is correct for a compose network that HAS a broker. On a devex host without one, it leaves the box.

In our case the broker closed the connection on metadata fetch, so nothing was written or consumed. That was luck, not design. A stack that reached a broker it could actually talk to would have produced into shared infrastructure, from a developer laptop, with no indication anything was unusual.

This bites any kafka-transport dfe-docker stack started on a host inside devex.hyperi.io where the broker did not come up -- a profile mistake, a crash-looping broker, a second stack that forgot the kafka service.

Worth considering:

  • Fail fast on a broker outside the compose network, rather than connecting. The loader knows what project it is in.
  • Or make the default broker name fully qualified to the compose network so the search domain cannot apply.
  • ndots:0 plus a single-label service name is the general shape here, not just kafka. Every bare service name in these configs has the same exposure on a devex host.

Done when a dev stack cannot reach estate infrastructure by accident.

Found while building a second docker stack for the Playwright acceptance suite.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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