Migrating a kubeflow-1.7 model from a Juju-2.9.46 to a Juju-3.4.0 controller fails with the following message in the controller container logs:
2024-03-11T18:45:24.853Z [jujud] 2024-03-11 18:45:24 CRITICAL juju.rpc server.go:557 panic running request {MethodCaller:0xc0006f16e0 transformErrors:0x3c5bde0 hdr:{RequestId:2 Request:{Type
:MigrationTarget Version:2 Id: Action:Import} Error: ErrorCode: ErrorInfo:map[] Version:1}} with arg {Bytes:[ ... ] Charms:[] Tools:[] Resources:[]}: interface conversion: interface {} is nil, not string
2024-03-11T18:45:24.864Z [jujud] goroutine 64861 [running]:
2024-03-11T18:45:24.864Z [jujud] runtime/debug.Stack()
2024-03-11T18:45:24.864Z [jujud] /snap/go/current/src/runtime/debug/stack.go:24 +0x65
2024-03-11T18:45:24.864Z [jujud] github.com/juju/juju/rpc.(*Conn).runRequest.func1()
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/rpc/server.go:558 +0x7d
2024-03-11T18:45:24.864Z [jujud] panic({0x6bfdc60, 0xc000e91530})
2024-03-11T18:45:24.864Z [jujud] /snap/go/current/src/runtime/panic.go:884 +0x213
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importCloudServiceV1(0x6a486a0?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/cloudservice.go:107 +0x49f
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importCloudService(0x6a695e0?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/cloudservice.go:78 +0x5a
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importApplication(0xc0007fad38?, 0x4528f2?, 0xb, 0x76f1f00?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/application.go:957 +0x12b0
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importApplicationV11(0x0?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/application.go:814 +0x2d
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importApplicationList({0xc00123ac80, 0x26, 0x78bf990?}, 0x7b79d40)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/application.go:618 +0x102
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importApplications(0x6a695e0?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/application.go:608 +0x29e
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.newModelFromValid(0x0?, 0x9)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/model.go:1686 +0x9ae
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.newModelImporter.func1(0x6a48ac0?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/model.go:1918 +0x66
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.importModel(0xc00308e000?)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/model.go:1494 +0x5a
2024-03-11T18:45:24.864Z [jujud] github.com/juju/description/v5.Deserialize({0xc00308e000, 0x12e2a3, 0x12e2a4})
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/description/v5/model.go:217 +0x6c
2024-03-11T18:45:24.864Z [jujud] github.com/juju/juju/migration.ImportModel({0x83998c0, 0xc000806750}, 0xc000bd8af8, {0xc00308e000?, 0xc0009e5350?, 0xc0009e5380?})
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/migration/migration.go:53 +0x57
2024-03-11T18:45:24.864Z [jujud] github.com/juju/juju/apiserver/facades/controller/migrationtarget.(*API).Import(0xc002453920, {{0xc00308e000, 0x12e2a3, 0x12e2a4}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...})
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/apiserver/facades/controller/migrationtarget/migrationtarget.go:154 +0x9c
2024-03-11T18:45:24.864Z [jujud] reflect.Value.call({0x72cf660?, 0xc0017742f0?, 0x40f447?}, {0x78a0d00, 0x4}, {0xc000bd8b10, 0x1, 0xaf8fdd?})
2024-03-11T18:45:24.864Z [jujud] /snap/go/current/src/reflect/value.go:586 +0xb07
2024-03-11T18:45:24.864Z [jujud] reflect.Value.Call({0x72cf660?, 0xc0017742f0?, 0x7182520?}, {0xc000bd8b10?, 0x0?, 0x40f06a?})
2024-03-11T18:45:24.864Z [jujud] /snap/go/current/src/reflect/value.go:370 +0xbc
2024-03-11T18:45:24.864Z [jujud] github.com/juju/rpcreflect.newMethod.func6({0x840c638, 0xc0012ccc80}, {0x72cf660?, 0xc0017742f0?, 0x6de5920?}, {0x7182520?, 0xc0024536e0?, 0x5cc256?})
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/vendor/github.com/juju/rpcreflect/type.go:348 +0xce
2024-03-11T18:45:24.864Z [jujud] github.com/juju/juju/apiserver.(*srvCaller).Call(0xc0006f16e0, {0x840c638, 0xc0012ccc80}, {0x0?, 0xc30d268?}, {0x7182520?, 0xc0024536e0?, 0x78a1594?})
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/apiserver/root.go:205 +0xa6
2024-03-11T18:45:24.864Z [jujud] github.com/juju/juju/rpc.(*Conn).runRequest(0xc000bf5540, {{0x83f2e50, 0xc0006f16e0}, 0x7b7a330, {0x2, {{0xc001e75490, 0xf}, 0x2, {0x0, 0x0}, ...}, ...}}, ...)
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/rpc/server.go:571 +0x1b6
2024-03-11T18:45:24.864Z [jujud] created by github.com/juju/juju/rpc.(*Conn).handleRequest
2024-03-11T18:45:24.864Z [jujud] /build/snapcraft-juju-ae85ecae535f24c9cc2ee479a84370a5/parts/jujud/build/rpc/server.go:475 +0x685
2024-03-11T18:45:24.864Z [jujud]
This is weird - the cloud service provider id attribute value is arriving at the target controller empty. This is unexpected since the value is set from the UID of k8s cloud service. I have not found a way to reproduce and reading the code seems to indicate it is always going to be set. The only thing I can think of is that maybe the 2.9 model was upgraded from an earlier 2.9 and the value was missing.
I deployed the kubeflow bundle to a new 2.9.46 controller and migrated the model to a 3.4.0 controller.
Regardless, we should be more defensive on import. This PR addresses the upstream issue
https:/ /github. com/juju/ description/ pull/136