gitpod-io / gitpod-io/gitpod

docker bridge gateway is not available during prebuilds

Open
#9,565 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta: never-stale team: workspace
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

In order to run xdebug in ddev, ddev needs the ip of docker's bridge gateway.

During prebuilds, ddev displays an error that the value cannot be determined.
(same is true to opening a workspace after "Skip prebuild" button was pressed, or in case prebuild are failing, and Gitpod workspace open in "prebuild mode" (didn't have a better way to describe it).

Steps to reproduce
  1. Open any repo that runs a prebuild, and click "Skip prebuild" button
  2. In Gitpod terminal, run docker network inspect bridge
  3. Confirm that IPAM.Config.Gateway is missing.

Compare that with a regular workspace, without skipping prebuild, run that same command and you'll see IPAM.Config.Gateway is there.

[
    {
        "Name": "bridge",
        "Id": "73e2ac1b72a1b74a809f0c91c993adc1320ea8de248c189bcbd51c1a49a2edd7",
        "Created": "2022-04-26T15:08:15.608436783Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {},
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1440"
        },
        "Labels": {}
    }
]
Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

cc: @jankeromnes, @rfay, @aledbf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by skipping a prebuild, opening a workspace in prebuild mode, or using a failing prebuild, then run docker network inspect bridge and compare it with a regular workspace. Trace the prebuild workspace setup that creates the Docker bridge network. Done means IPAM.Config.Gateway is available in the affected modes and ddev can obtain the gateway IP for xdebug.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.