Skip to content

docker network ls issues #16909

@sdurrheimer

Description

@sdurrheimer

After working on the Zsh compeltion for docker network command, here some issues I've detected.

  • 1/ docker --help command list
    The network command is not listed in the docker --help Commands: list
  • 2/ Remove -n and -l from documentation.
    docker network ls -n and -l options are still documented in docs/reference/commandline/network_ls.md
  • 3/ Remove -n and -l from bash and zsh completion.

Done

  • docker network ls --help
    The --help option for docker network ls command is not working properly.
$ docker network ls --help
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/docker/docker/pkg/mflag.(*FlagSet).FlagCountUndeprecated(0xc20807ad80, 0xc2080f5660)
    /go/src/github.com/docker/docker/pkg/mflag/flag.go:606 +0xc6
github.com/docker/docker/cli.func·002()
    /go/src/github.com/docker/docker/cli/cli.go:163 +0x70
github.com/docker/docker/cli.func·001()
    /go/src/github.com/docker/docker/cli/cli.go:157 +0x2f
github.com/docker/docker/pkg/mflag.(*FlagSet).ParseFlags(0xc20807ad80, 0xc20800a030, 0x1, 0x1, 0xffffffffffffff01, 0x0, 0x0)
    /go/src/github.com/docker/docker/pkg/mflag/flag.go:1128 +0x1f6
github.com/docker/docker/api/client.(*DockerCli).CmdNetworkLs(0xc208160000, 0xc20800a030, 0x1, 0x1, 0x0, 0x0)
    /go/src/github.com/docker/docker/api/client/network.go:112 +0x3b4
reflect.callMethod(0xc208162180, 0xc2080f5ce8)
    /usr/local/go/src/reflect/value.go:605 +0x179
reflect.methodValueCall(0xc20800a030, 0x1, 0x1, 0x3, 0xc208162180, 0x0, 0x0, 0x0, 0xc208162180, 0x4dc74f, ...)
    /usr/local/go/src/reflect/asm_amd64.s:29 +0x36
github.com/docker/docker/cli.(*Cli).Run(0xc208162000, 0xc20800a010, 0x3, 0x3, 0x0, 0x0)
    /go/src/github.com/docker/docker/cli/cli.go:80 +0x175
main.main()
    /go/src/github.com/docker/docker/docker/docker.go:65 +0x418

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 9 [runnable]:
text/template/parse.lexText(0xc20807aa80, 0x1450448)
    /usr/local/go/src/text/template/parse/lex.go:228 +0x37b
text/template/parse.(*lexer).run(0xc20807aa80)
    /usr/local/go/src/text/template/parse/lex.go:198 +0x5d
created by text/template/parse.lex
    /usr/local/go/src/text/template/parse/lex.go:191 +0x1ac
  • docker network ls -n REMOVED

The -n option for docker network ls command is not working properly. See the following examples.

Without the -n option

$ docker network ls
NETWORK ID          NAME                DRIVER
7b58122fb574        none                null                
ce0287e7603a        host                host                
118c83d77eee        bridge              bridge

With the -n option to 1

$ docker network ls -n=1
NETWORK ID          NAME                DRIVER
7b58122fb574        none                null                
ce0287e7603a        host                host                
118c83d77eee        bridge              bridge

docker version

Client:
 Version:      1.9.0-dev
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a6bbf16
 Built:        Sat Oct 10 10:10:16 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.9.0-dev
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a6bbf16
 Built:        Sat Oct 10 10:10:16 UTC 2015
 OS/Arch:      linux/amd64

docker info

Containers: 1
Images: 50
Engine Version: 1.9.0-dev
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 52
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.19.0-26-generic
Operating System: Ubuntu 15.04
CPUs: 2
Total Memory: 3.86 GiB
Name: steve-xubuntu
ID: ZNBK:EUHZ:Q6TS:WHTT:UHUY:4AP6:2WJT:LZXC:74L7:7723:NGCH:HKZ5
WARNING: No swap limit support

uname -a

Linux steve-xubuntu 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

@mavenugo

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions