Seg fault generated due to malformed bundle.yaml file

Bug #1855777 reported by Steven Parker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Harry Pidcock

Bug Description

The following bundle generates a seg fault.

 more vaultBundle.yaml
relations:
  - [ "barbican:amqp", "rabbitmq-server:amqp" ]
  - [ "barbican:shared-db", "mysql:shared-db" ]
  - [ "barbican:identity-service", "keystone:identity-service" ]
  - [ "barbican:secrets", "barbican-vault:secrets" ]
  - [ "barbican-vault:secrets-storage", "vault:secrets" ]
  - [ barbican, hacluster-barbican ]

  - [ vault, hacluster-vault ]
  - [ vault, mysql ]
  - [ "vault:etcd", "etcd:db"]
  - [ "etcd", "easyrsa"]
  - [ keystone, "mysql:shared-db" ]

applications:
  rabbitmq-server:
    charm: cs:rabbitmq-server
    num_units: 1
    to:
    - lxd:0
  mysql:
    charm: cs:percona-cluster
    num_units: 1
    to:
    - lxd:1
  keystone:
    charm: cs:keystone
    num_units: 1
    to:
    - lxd:2
  barbican:
    charm: cs:barbican
    num_units: 3
    options:
      openstack-origin: cloud:bionic-stein
      use-internal-endpoints: true
      vip: 192.168.2.190
      worker-multiplier: 0.25
    to:
    - lxd:0
    - lxd:1
    - lxd:2
  hacluster-barbican:
    charm: cs:hacluster
  barbican-vault:
    charm: cs:barbican-vault
  vault:
     charm: vault
     num_units: 3
     options:
       vip: 192.168.2.191
     to:
     - lxd:1
     - lxd:2
     - lxd:3
  hacluster-vault:
    charm: cs:hacluster
  etcd:
    charm: etcd
    num_units: 3
    to:
    - lxd:0
    - lxd:1
    - lxd:2
  easyrsa:
    charm: cs:~containers/easyrsa
    num_units: 1
    to:
    - lxd:3
  machines:
  "0":
    constraints: tags=neutron-gw
  "1":
    constraints: tags=2950
  "2":
    constraints: tags=2950
  "3":
    constraints: tags=2950

Removing the spaced prior to machines: avoids the error.

juju deploy ./vaultBundle.yaml --debug
15:23:26 INFO juju.cmd supercommand.go:57 running juju [2.6.10 gc go1.10.4]
15:23:26 DEBUG juju.cmd supercommand.go:58 args: []string{"juju", "deploy", "./vaultBundle.yaml", "--debug"}
15:23:26 INFO juju.juju api.go:67 connecting to API addresses: [192.168.2.11:17070]
15:23:26 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://192.168.2.11:17070/model/1b5739a8-fb3c-4c20-82c2-5eb0621014aa/api"
15:23:26 INFO juju.api apiclient.go:624 connection established to "wss://192.168.2.11:17070/model/1b5739a8-fb3c-4c20-82c2-5eb0621014aa/api"
15:23:26 INFO juju.juju api.go:67 connecting to API addresses: [192.168.2.11:17070]
15:23:26 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://192.168.2.11:17070/api"
15:23:26 INFO juju.api apiclient.go:624 connection established to "wss://192.168.2.11:17070/api"
15:23:26 DEBUG juju.api monitor.go:35 RPC connection died
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x1868b20]

goroutine 1 [running]:
github.com/juju/juju/cmd/juju/application.applicationRequiresTrust(...)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/application/bundle.go:1677
github.com/juju/juju/cmd/juju/application.appsRequiringTrust(0xc420bda6f0, 0xc4207aeed0, 0x24, 0x1)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/application/deploy.go:1707 +0xe0
github.com/juju/juju/cmd/juju/application.(*DeployCommand).deployBundle(0xc42041b180, 0xc42047af50, 0x0, 0xc4205b5a80, 0xc4207af860, 0x17, 0x0, 0x0, 0x0, 0x0, ...)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/application/deploy.go:848 +0x7dd
github.com/juju/juju/cmd/juju/application.(*DeployCommand).maybeReadLocalBundle.func1(0xc42047af50, 0x37153a0, 0xc4207d1cc0, 0xc420bda990, 0x0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/application/deploy.go:1337 +0x1a7
github.com/juju/juju/cmd/juju/application.(*DeployCommand).Run(0xc42041b180, 0xc42047af50, 0x0, 0x0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/application/deploy.go:1154 +0x49a
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc4204da060, 0xc42047af50, 0xc4204da060, 0xc4205c24a0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:606 +0x11c
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc42030d860, 0xc42047af50, 0x0, 0x0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/modelcmd/base.go:471 +0xab
github.com/juju/juju/vendor/github.com/juju/cmd.(*SuperCommand).Run(0xc420414640, 0xc42047af50, 0xc42047af50, 0x0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/vendor/github.com/juju/cmd/supercommand.go:493 +0x2c0
github.com/juju/juju/vendor/github.com/juju/cmd.Main(0x36b78e0, 0xc420414640, 0xc42047af50, 0xc42004c110, 0x3, 0x3, 0x2df56e0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/vendor/github.com/juju/cmd/cmd.go:379 +0x2d9
github.com/juju/juju/cmd/juju/commands.main.Run(0x337a2a8, 0xc42004c100, 0x4, 0x4, 0x0)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/commands/main.go:143 +0x1af
github.com/juju/juju/cmd/juju/commands.Main(0xc42004c100, 0x4, 0x4, 0xc42000c140)
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/commands/main.go:89 +0x4b
main.main()
 /build/juju-core-ehL9Qs/juju-core-2.6.10/obj-x86_64-linux-gnu/src/github.com/juju/juju/cmd/juju/main.go:37 +0x8c

Tags: bundles ux
Revision history for this message
Tim Penhey (thumper) wrote :

We really shouldn't panic anywhere.

Changed in juju:
status: New → Triaged
importance: Undecided → High
tags: added: bundles ux
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.7.1
assignee: nobody → Harry Pidcock (hpidcock)
Changed in juju:
milestone: 2.7.1 → 2.7.2
Revision history for this message
Harry Pidcock (hpidcock) wrote :
Changed in juju:
status: Triaged → Fix Released
status: Fix Released → Fix Committed
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.