juju ssh panic (k8s container)

Bug #1928165 reported by Ian Booth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Thomas Miller

Bug Description

juju 2.9

ssh into a k8s unit container and then Ctrl^D to exit... boom

$ juju ssh mariadb-k8s/0
#
panic: close of closed channel

goroutine 1 [running]:
github.com/juju/juju/caas/kubernetes.(*Tunnel).Close(...)
        /home/ian/juju/go/src/juju/juju/caas/kubernetes/tunnel.go:55
github.com/juju/juju/caas/kubernetes/provider/proxy.(*Proxier).Stop(0xc00042b400)
        /home/ian/juju/go/src/juju/juju/caas/kubernetes/provider/proxy/proxier.go:89 +0x45
github.com/juju/juju/api.(*state).Close(0xc000c94000, 0x0, 0x0)
        /home/ian/juju/go/src/juju/juju/api/apiclient.go:1270 +0xcf
github.com/juju/juju/cmd/juju/commands.(*sshContainer).cleanupRun(0xc000a9fce8)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/ssh_container.go:168 +0x188
github.com/juju/juju/cmd/juju/commands.(*sshCommand).Run(0xc000a9fb80, 0xc0000b6af0, 0x0, 0x0)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/ssh.go:209 +0x171
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc00044aae0, 0xc0000b6af0, 0x5e2c880, 0x33f1280)
        /home/ian/juju/go/src/juju/juju/cmd/modelcmd/modelcommand.go:651 +0xfc
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc000634900, 0xc0000b6af0, 0x0, 0x0)
        /home/ian/juju/go/src/juju/juju/cmd/modelcmd/base.go:546 +0xa8
github.com/juju/cmd.(*SuperCommand).Run(0xc000a9cdc0, 0xc0000b6af0, 0xc0000b6af0, 0x0)
        /<email address hidden>/supercommand.go:523 +0x2cd
github.com/juju/cmd.Main(0x43c9100, 0xc000a9cdc0, 0xc0000b6af0, 0xc000426a40, 0x2, 0x2, 0x18)
        /<email address hidden>/cmd.go:387 +0x2c2
github.com/juju/juju/cmd/juju/commands.jujuMain.Run(0x3f190b8, 0xc00018c000, 0x3, 0x3, 0xc00019e498)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/main.go:200 +0x466
github.com/juju/juju/cmd/juju/commands.Main(...)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/main.go:123
main.main()
        /home/ian/juju/go/src/juju/juju/cmd/juju/main.go:37 +0xbc

Tags: k8s
Revision history for this message
Ian Booth (wallyworld) wrote :

Also happens if a bad CLI option is passed in

$ juju ssh mariadb-k8s/0 --foo
sh: 0: Illegal option --
panic: close of closed channel

goroutine 1 [running]:
github.com/juju/juju/caas/kubernetes.(*Tunnel).Close(...)
        /home/ian/juju/go/src/juju/juju/caas/kubernetes/tunnel.go:55
github.com/juju/juju/caas/kubernetes/provider/proxy.(*Proxier).Stop(0xc000292a00)
        /home/ian/juju/go/src/juju/juju/caas/kubernetes/provider/proxy/proxier.go:89 +0x45
github.com/juju/juju/api.(*state).Close(0xc000443dc0, 0x0, 0x0)
        /home/ian/juju/go/src/juju/juju/api/apiclient.go:1270 +0xcf
github.com/juju/juju/cmd/juju/commands.(*sshContainer).cleanupRun(0xc000609ce8)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/ssh_container.go:168 +0x188
github.com/juju/juju/cmd/juju/commands.(*sshCommand).Run(0xc000609b80, 0xc0001469b0, 0x433e0a0, 0xc000c19310)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/ssh.go:209 +0x171
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc00096a210, 0xc0001469b0, 0x5e2c880, 0x33f1280)
        /home/ian/juju/go/src/juju/juju/cmd/modelcmd/modelcommand.go:651 +0xfc
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc0003737e0, 0xc0001469b0, 0x0, 0x0)
        /home/ian/juju/go/src/juju/juju/cmd/modelcmd/base.go:546 +0xa8
github.com/juju/cmd.(*SuperCommand).Run(0xc000260dc0, 0xc0001469b0, 0xc0001469b0, 0x0)
        /<email address hidden>/supercommand.go:523 +0x2cd
github.com/juju/cmd.Main(0x43c9100, 0xc000260dc0, 0xc0001469b0, 0xc00068f890, 0x3, 0x3, 0x18)
        /<email address hidden>/cmd.go:387 +0x2c2
github.com/juju/juju/cmd/juju/commands.jujuMain.Run(0x3f190b8, 0xc00004c080, 0x4, 0x4, 0xc000482ee8)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/main.go:200 +0x466
github.com/juju/juju/cmd/juju/commands.Main(...)
        /home/ian/juju/go/src/juju/juju/cmd/juju/commands/main.go:123
main.main()
        /home/ian/juju/go/src/juju/juju/cmd/juju/main.go:37 +0xbc

summary: - panic juju ssh
+ juju ssh panic (k8s container)
Revision history for this message
Thomas Miller (tlmiller) wrote :
Changed in juju:
status: Triaged → Fix Committed
assignee: nobody → Thomas Miller (tlmiller)
Changed in juju:
milestone: 2.9.1 → 2.9.2
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.