Skip to content

ExtraAttributes checking the wrong length for labels-regex #42039

Description

@nathanlcarlson

Description

This line is checking the length of the wrong variable https://github.com/moby/moby/blob/master/daemon/logger/loginfo.go#L45 . This is likely a copy paste error, I assume len(labels) should be len(labelsRegex).

Steps to reproduce the issue:

  1. Try to specify labelsRegex but not labels for a log driver and the regex you specified will be ignored.

Describe the results you received:
My labelsRegex is being ignored.

Describe the results you expected:
I'd expect to see the matching labels.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

$ docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.7
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:12:42 2020
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:28 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info:

not relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/loggingkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.version/20.10

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions