Deploying an application bundle without a charm: statement will result in a SIGSEGV.
Simplest test case:
peter@pirx ~/tmp » cat tst.yaml
applications:
ubuntu:
peter@pirx ~/tmp » juju deploy ./tst.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x18689b0]
goroutine 1 [running]:
github.com/juju/juju/cmd/juju/application.applicationRequiresTrust(...)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/application/bundle.go:1677
github.com/juju/juju/cmd/juju/application.appsRequiringTrust(0xc420bed410, 0xc42050bda0, 0x24, 0x1)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/application/deploy.go:1707 +0xe0
github.com/juju/juju/cmd/juju/application.(*DeployCommand).deployBundle(0xc42041ec80, 0xc42027db80, 0x0, 0xc420c5c580, 0xc420beb860, 0xf, 0x0, 0x0, 0x0, 0x0, ...)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/application/deploy.go:848 +0x7dd
github.com/juju/juju/cmd/juju/application.(*DeployCommand).maybeReadLocalBundle.func1(0xc42027db80, 0x36c3640, 0xc4208279a0, 0xc420bed440, 0x0)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/application/deploy.go:1337 +0x1a7
github.com/juju/juju/cmd/juju/application.(*DeployCommand).Run(0xc42041ec80, 0xc42027db80, 0x0, 0x0)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/application/deploy.go:1154 +0x49a
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc420984930, 0xc42027db80, 0xc420984930, 0xc420608290)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:606 +0x11c
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc4203117c0, 0xc42027db80, 0x0, 0x0)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/modelcmd/base.go:471 +0xab
github.com/juju/juju/vendor/github.com/juju/cmd.(*SuperCommand).Run(0xc420418500, 0xc42027db80, 0xc42027db80, 0x0)
/build/juju/parts/juju/go/src/github.com/juju/juju/vendor/github.com/juju/cmd/supercommand.go:493 +0x2c0
github.com/juju/juju/vendor/github.com/juju/cmd.Main(0x3665c00, 0xc420418500, 0xc42027db80, 0xc42004c0d0, 0x2, 0x2, 0x2db4780)
/build/juju/parts/juju/go/src/github.com/juju/juju/vendor/github.com/juju/cmd/cmd.go:379 +0x2d9
github.com/juju/juju/cmd/juju/commands.main.Run(0x332c328, 0xc42004c0c0, 0x3, 0x3, 0x0)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/main.go:143 +0x1af
github.com/juju/juju/cmd/juju/commands.Main(0xc42004c0c0, 0x3, 0x3, 0xc42000c160)
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/main.go:89 +0x4b
main.main()
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/main.go:37 +0x8c
The bundle ref at https://jaas.ai/docs/bundle-reference doesn't really say which bundle elements are required. IMHO it would make sense to allow defining an application without a charm reference, for instance to be able to refer existing applications in relations. In any case this should not result in a SEGV.
Version information:
snap list | grep juju
juju 2.6.9 9102 stable canonical* classic
uname -a
Linux pirx 5.0.0-32-generic #34-Ubuntu SMP Wed Oct 2 02:06:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
We will update the docs to outline the minimum bundle definition. Yes charm is necessary.
You are also correct that it shouldn't SEGV.