juju.rpc panic running request

Bug #2060561 reported by Mark Beierl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Heather Lanigan
3.3
Fix Released
Critical
Heather Lanigan
3.5
Fix Released
Critical
Heather Lanigan

Bug Description

Attempting to deploy this plan: https://github.com/canonical/charmed-5g/tree/main/examples/terraform/mastering

Failed on the sdcore-nms-k8s operator, and the following is observed in the controller debug-log:

```
controller-0: 15:50:32 CRITICAL juju.rpc panic running request {MethodCaller:0xc007680c90 transformErrors:0x3c616c0 hdr:{RequestId:2 Request:{Type:Application Version:19 Id: Action:DeployFromRepository} Error: ErrorCode: ErrorInfo:map[] Version:1}} with arg {Args:[{CharmName:sdcore-nms-k8s ApplicationName:nms AttachStorage:[] Base:0xc007d401a0 Channel:0xc005070a80 ConfigYAML:nms: {}
 Cons: Devices:map[] DryRun:false EndpointBindings:map[] Force:false NumUnits:0xc0060b4880 Placement:[] Revision:0xc0060b4888 Resources:map[] Storage:map[] Trust:true}]}: runtime error: invalid memory address or nil pointer dereference
goroutine 21330785 [running]:
runtime/debug.Stack()
 /snap/go/current/src/runtime/debug/stack.go:24 +0x65
github.com/juju/juju/rpc.(*Conn).runRequest.func1()
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/rpc/server.go:558 +0x7d
panic({0x6b1d140, 0xc0f1440})
 /snap/go/current/src/runtime/panic.go:884 +0x213
github.com/juju/charm/v12.MetaFormatReasons({0x0, 0x0})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/vendor/github.com/juju/charm/v12/charm.go:75 +0x39
github.com/juju/charm/v12.MetaFormat(...)
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/vendor/github.com/juju/charm/v12/charm.go:103
github.com/juju/juju/core/charm.IsKubernetes({0x0, 0x0})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/core/charm/kubernetes.go:17 +0x3f
github.com/juju/juju/apiserver/facades/client/application.caasDeployFromRepositoryValidator.ValidateArg({_, {_, _}, {_, _}, {_, _}, _}, {{0xc0060b4860, 0xe}, ...})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/apiserver/facades/client/application/deployrepository.go:509 +0x1a7
github.com/juju/juju/apiserver/facades/client/application.(*DeployFromRepositoryAPI).DeployFromRepository(_, {{0xc0060b4860, 0xe}, {0xc0060b4848, 0x3}, {0x0, 0x0, 0x0}, 0xc007d401a0, 0xc005070a80, ...})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/apiserver/facades/client/application/deployrepository.go:91 +0x175
github.com/juju/juju/apiserver/facades/client/application.(*APIBase).DeployFromRepository(0xc00640a700, {{0xc00050a500?, 0x4?, 0x0?}})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/apiserver/facades/client/application/application.go:3060 +0x195
reflect.Value.call({0x76e6a40?, 0xc0085899d0?, 0x40f447?}, {0x78a7820, 0x4}, {0xc006420b88, 0x1, 0xafae25?})
 /snap/go/current/src/reflect/value.go:586 +0xb07
reflect.Value.Call({0x76e6a40?, 0xc0085899d0?, 0x6d1c840?}, {0xc006420b88?, 0x0?, 0x40f06a?})
 /snap/go/current/src/reflect/value.go:370 +0xbc
github.com/juju/rpcreflect.newMethod.func8({0x8413db8, 0xc009514cd0}, {0x76e6a40?, 0xc0085899d0?, 0x6debb20?}, {0x6d1c840?, 0xc00607ed80?, 0x5cc256?})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/vendor/github.com/juju/rpcreflect/type.go:365 +0xce
github.com/juju/juju/apiserver.(*srvCaller).Call(0xc007680c90, {0x8413db8, 0xc009514cd0}, {0x0?, 0x1?}, {0x6d1c840?, 0xc00607ed80?, 0x0?})
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/apiserver/root.go:205 +0xa6
github.com/juju/juju/rpc.(*Conn).runRequest(0xc0033897c0, {{0x83fa5a0, 0xc007680c90}, 0x7b813a0, {0x2, {{0xc0060b4830, 0xb}, 0x13, {0x0, 0x0}, ...}, ...}}, ...)
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/rpc/server.go:571 +0x1b6
created by github.com/juju/juju/rpc.(*Conn).handleRequest
 /build/snapcraft-juju-5c4e26ef528b8affefabcd9eccf0889b/parts/jujud/build/rpc/server.go:475 +0x685
```

Revision history for this message
Mark Beierl (mbeierl) wrote :

juju --version
3.4.2-genericlinux-amd64

Revision history for this message
Mark Beierl (mbeierl) wrote :

Bart on our team discovered this happens when the Terraform plan references a track that does not yet have a release.

ref: https://matrix.to/#/!DYZQXnMeycataPvFYj:ubuntu.com/$zA-RQdsv0-B6gHwnEQ3KYL-NwBRFun-XzMR8ChjIFOM?via=ubuntu.com&via=matrix.org&via=mozilla.org

Revision history for this message
Harry Pidcock (hpidcock) wrote :

Thank-you for the bug report.

Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
importance: Undecided → Critical
milestone: none → 3.4.3
status: New → Triaged
Changed in juju:
status: Triaged → Confirmed
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

From Mark:

At the time, the TF plan referenced sdcore-nms-k8s in 1.4/edge, but that track doesn’t exist. So really any plan that references an invalid track

Changed in juju:
status: Confirmed → In Progress
Revision history for this message
Heather Lanigan (hmlanigan) wrote :
Changed in juju:
status: In Progress → 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.