docker / docker/cli

Not setting link local IP options

Open
#3,017 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/networking kind/bug
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

When running Docker's integration-cli tests against a modern CLI, the following test fails (added logging to show inspect output from the generated container). This test works against what is run in moby CI (17.06) but fails starting with the 19.03 CLI.

=== FAIL: amd64.integration-cli TestDockerNetworkSuite/TestDockerNetworkConnectLinkLocalIP (1.82s)
    --- FAIL: TestDockerNetworkSuite/TestDockerNetworkConnectLinkLocalIP (1.82s)
        docker_cli_network_unix_test.go:1382: assertion failed: expected an error, got nil: [
                {
                    "Id": "09f47c5ed528cb6489f8ec235aa5b84559c4f4ee25f0e40597beac29082984ef",
                    "Created": "2021-03-18T00:07:58.728281211Z",
                    "Path": "true",
                    "Args": [],
                    "State": {
                        "Status": "exited",
                        "Running": false,
                        "Paused": false,
                        "Restarting": false,
                        "OOMKilled": false,
                        "Dead": false,
                        "Pid": 0,
                        "ExitCode": 0,
                        "Error": "",
                        "StartedAt": "2021-03-18T00:07:59.329687334Z",
                        "FinishedAt": "2021-03-18T00:07:59.356010839Z"
                    },
                    "Image": "sha256:1c35c441208254cb7c3844ba95a96485388cef9ccc0646d562c7fc026e04c807",
                    "ResolvConfPath": "/var/lib/docker/containers/09f47c5ed528cb6489f8ec235aa5b84559c4f4ee25f0e40597beac29082984ef/resolv.conf",
                    "HostnamePath": "/var/lib/docker/containers/09f47c5ed528cb6489f8ec235aa5b84559c4f4ee25f0e40597beac29082984ef/hostname",
                    "HostsPath": "/var/lib/docker/containers/09f47c5ed528cb6489f8ec235aa5b84559c4f4ee25f0e40597beac29082984ef/hosts",
                    "LogPath": "/var/lib/docker/containers/09f47c5ed528cb6489f8ec235aa5b84559c4f4ee25f0e40597beac29082984ef/09f47c5ed528cb6489f8ec235aa5b84559c4f4ee25f0e40597beac29082984ef-json.log",
                    "Name": "/testllip",
                    "RestartCount": 0,
                    "Driver": "vfs",
                    "Platform": "linux",
                    "MountLabel": "",
                    "ProcessLabel": "",
                    "AppArmorProfile": "docker-default",
                    "ExecIDs": null,
                    "HostConfig": {
                        "Binds": null,
                        "ContainerIDFile": "",
                        "LogConfig": {
                            "Type": "json-file",
                            "Config": {}
                        },
                        "NetworkMode": "default",
                        "PortBindings": {},
                        "RestartPolicy": {
                            "Name": "no",
                            "MaximumRetryCount": 0
                        },
                        "AutoRemove": false,
                        "VolumeDriver": "",
                        "VolumesFrom": null,
                        "CapAdd": null,
                        "CapDrop": null,
                        "CgroupnsMode": "host",
                        "Dns": [],
                        "DnsOptions": [],
                        "DnsSearch": [],
                        "ExtraHosts": null,
                        "GroupAdd": null,
                        "IpcMode": "private",
                        "Cgroup": "",
                        "Links": null,
                        "OomScoreAdj": 0,
                        "PidMode": "",
                        "Privileged": false,
                        "PublishAllPorts": false,
                        "ReadonlyRootfs": false,
                        "SecurityOpt": null,
                        "UTSMode": "",
                        "UsernsMode": "",
                        "ShmSize": 67108864,
                        "Runtime": "runc",
                        "ConsoleSize": [
                            0,
                            0
                        ],
                        "Isolation": "",
                        "CpuShares": 0,
                        "Memory": 0,
                        "NanoCpus": 0,
                        "CgroupParent": "",
                        "BlkioWeight": 0,
                        "BlkioWeightDevice": [],
                        "BlkioDeviceReadBps": null,
                        "BlkioDeviceWriteBps": null,
                        "BlkioDeviceReadIOps": null,
                        "BlkioDeviceWriteIOps": null,
                        "CpuPeriod": 0,
                        "CpuQuota": 0,
                        "CpuRealtimePeriod": 0,
                        "CpuRealtimeRuntime": 0,
                        "CpusetCpus": "",
                        "CpusetMems": "",
                        "Devices": [],
                        "DeviceCgroupRules": null,
                        "DeviceRequests": null,
                        "KernelMemory": 0,
                        "KernelMemoryTCP": 0,
                        "MemoryReservation": 0,
                        "MemorySwap": 0,
                        "MemorySwappiness": null,
                        "OomKillDisable": false,
                        "PidsLimit": null,
                        "Ulimits": null,
                        "CpuCount": 0,
                        "CpuPercent": 0,
                        "IOMaximumIOps": 0,
                        "IOMaximumBandwidth": 0,
                        "MaskedPaths": [
                            "/proc/asound",
                            "/proc/acpi",
                            "/proc/kcore",
                            "/proc/keys",
                            "/proc/latency_stats",
                            "/proc/timer_list",
                            "/proc/timer_stats",
                            "/proc/sched_debug",
                            "/proc/scsi",
                            "/sys/firmware"
                        ],
                        "ReadonlyPaths": [
                            "/proc/bus",
                            "/proc/fs",
                            "/proc/irq",
                            "/proc/sys",
                            "/proc/sysrq-trigger"
                        ]
                    },
                    "GraphDriver": {
                        "Data": null,
                        "Name": "vfs"
                    },
                    "Mounts": [],
                    "Config": {
                        "Hostname": "09f47c5ed528",
                        "Domainname": "",
                        "User": "",
                        "AttachStdin": false,
                        "AttachStdout": true,
                        "AttachStderr": true,
                        "Tty": false,
                        "OpenStdin": false,
                        "StdinOnce": false,
                        "Env": [
                            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
                        ],
                        "Cmd": [
                            "true"
                        ],
                        "Image": "busybox",
                        "Volumes": null,
                        "WorkingDir": "",
                        "Entrypoint": null,
                        "OnBuild": null,
                        "Labels": {}
                    },
                    "NetworkSettings": {
                        "Bridge": "",
                        "SandboxID": "9519a4535580315fe480df6c36ca6db6392d5d074ba9811e55d696907802ccd7",
                        "HairpinMode": false,
                        "LinkLocalIPv6Address": "",
                        "LinkLocalIPv6PrefixLen": 0,
                        "Ports": {},
                        "SandboxKey": "/var/run/docker/netns/9519a4535580",
                        "SecondaryIPAddresses": null,
                        "SecondaryIPv6Addresses": null,
                        "EndpointID": "",
                        "Gateway": "",
                        "GlobalIPv6Address": "",
                        "GlobalIPv6PrefixLen": 0,
                        "IPAddress": "",
                        "IPPrefixLen": 0,
                        "IPv6Gateway": "",
                        "MacAddress": "",
                        "Networks": {
                            "bridge": {
                                "IPAMConfig": null,
                                "Links": null,
                                "Aliases": null,
                                "NetworkID": "e9498fc5045f39f8faba845e9350a9af48e0f2bc2c60f7f1a924520ce8dcfe80",
                                "EndpointID": "",
                                "Gateway": "",
                                "IPAddress": "",
                                "IPPrefixLen": 0,
                                "IPv6Gateway": "",
                                "GlobalIPv6Address": "",
                                "GlobalIPv6PrefixLen": 0,
                                "MacAddress": "",
                                "DriverOpts": null
                            }
                        }
                    }
                }
            ]

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

Start with TestDockerNetworkSuite/TestDockerNetworkConnectLinkLocalIP in docker_cli_network_unix_test.go around line 1382 and reproduce it against the modern CLI. Compare the failing inspect output with the test's expected error and trace the link-local IP option handling. Done means the test passes against the modern CLI with the expected error restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.