No Connectivity to Docker Containers Within Instance

Problem

A virtual machine instance, running the Docker daemon, has containers which cannot communicate externally nor be reached (on their exposed ports – if any) despite such traffic being allowed within the associated security group or firewall of the network.

Example

Copy

Environment

  • Platform9 Managed OpenStack - All Versions
  • Neutron
  • OVS
  • Docker

Cause

The Docker daemon is not aware of and does not account for the VXLAN packet encapsulation overhead which is present on an OpenStack network with OVS. As such, the bridge interface, used for Docker containers within the VM, is created with a default MTU of 1500 – resulting in any incoming and outgoing packets to be dropped once outside of the VM since they are over the MTU size of the external interface (with the added overhead).

Resolution

  1. Modify (or create – if it does not exist) the Docker daemon configuration file at /etc/docker/daemon.json and explicitly set the correct MTU size (accounting for the packet overhead).
Copy

Note: The MTU will vary depending on whether jumbo frames are configured for your environment. If jumbo frames are enabled, you will need to set an MTU of 8950.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard