Hi,
I’m trying to bootstrap Juju controller using Ubuntu 22.04, and it looks like it has a problem with image metadata record:
juju --debug bootstrap PhysicalOpenStack JujuController \
--config network=5757cb1a-125f-462d-8e7f-97d958db00cf \
--config ssl-hostname-verification=false \
--config default-base=ubuntu@22.04 \
--config default-series=jammy \
--bootstrap-image=9ac1acac-a2bc-4e78-bf4d-925671ecf170 \
--bootstrap-base=ubuntu@22.04 \
--bootstrap-constraints="allocate-public-ip=false arch=amd64" \
--metadata-source /Users/mk/simplestreams
The problem is that it fails:
2023-09-26 13:43:07 DEBUG juju.cmd.jujud bootstrap.go:539 Adding agent binary: 3.2.2-ubuntu-amd64
2023-09-26 13:43:07 DEBUG juju.storage managedstorage.go:239 resource catalog entry created with id "287f022d91b1059cc67b04055d6a9d50b545e511d3c21d1de1b4d9e4b0676c23f4ed1ff0dc22978b1c8903aa60e7101d"
2023-09-26 13:43:07 DEBUG juju.state.pool.txnwatcher txnwatcher.go:487 txn watcher: storedResources 287f022d91b1059cc67b04055d6a9d50b545e511d3c21d1de1b4d9e4b0676c23f4ed1ff0dc22978b1c8903aa60e7101d #2
2023-09-26 13:43:07 DEBUG juju.state.pool.txnwatcher txnwatcher.go:487 txn watcher: storedResources 287f022d91b1059cc67b04055d6a9d50b545e511d3c21d1de1b4d9e4b0676c23f4ed1ff0dc22978b1c8903aa60e7101d #3
2023-09-26 13:43:07 DEBUG juju.storage managedstorage.go:293 managed resource entry created with path "buckets/f7deb1fd-1961-4ea0-80d6-f3281d402f41/tools/3.2.2-ubuntu-amd64-4d64fe6738b6a408b00cdf0b72e642252559b60c988de7af5cac71c397744895" -> "287f022d91b1059cc67b04055d6a9d50b545e511d3c21d1de1b4d9e4b0676c23f4ed1ff0dc22978b1c8903aa60e7101d"
2023-09-26 13:43:07 DEBUG juju.state.pool.txnwatcher txnwatcher.go:487 txn watcher: managedStoredResources buckets/f7deb1fd-1961-4ea0-80d6-f3281d402f41/tools/3.2.2-ubuntu-amd64-4d64fe6738b6a408b00cdf0b72e642252559b60c988de7af5cac71c397744895 #2
2023-09-26 13:43:07 DEBUG juju.state.pool.txnwatcher txnwatcher.go:487 txn watcher: toolsmetadata f7deb1fd-1961-4ea0-80d6-f3281d402f41:3.2.2-ubuntu-amd64 #2
2023-09-26 13:43:07 DEBUG juju.cmd.jujud bootstrap.go:548 saving custom image metadata
2023-09-26 13:43:07 DEBUG juju.state.cloudimagemetadata image.go:87 inserting cloud image metadata for released:RegionOne:22.04:amd64:::custom
2023-09-26 13:43:07 DEBUG juju.state.watcher runner.go:278 killing runner 0xc00013f440
2023-09-26 13:43:07 INFO juju.state.watcher runner.go:386 runner is dying
2023-09-26 13:43:07 DEBUG juju.state.watcher runner.go:535 killing "txnlog"
2023-09-26 13:43:07 INFO juju.state.watcher runner.go:587 stopped "txnlog", err: <nil>
2023-09-26 13:43:07 DEBUG juju.state.watcher runner.go:406 "txnlog" done: <nil>
2023-09-26 13:43:07 DEBUG juju.state.watcher runner.go:473 no restart, removing "txnlog" from known workers
2023-09-26 13:43:07 DEBUG juju.state.pool.txnwatcher runner.go:278 killing runner 0xc00097c120
2023-09-26 13:43:07 INFO juju.state.pool.txnwatcher runner.go:386 runner is dying
2023-09-26 13:43:07 DEBUG juju.state.pool.txnwatcher runner.go:535 killing "txnlog"
2023-09-26 13:43:08 WARNING juju.state.pool.txnwatcher txnwatcher.go:338 txn watcher sync error: tomb: dying
2023-09-26 13:43:08 WARNING juju.state.pool.txnwatcher txnwatcher.go:346 txn watcher resume queued
2023-09-26 13:43:08 INFO juju.state.pool.txnwatcher runner.go:587 stopped "txnlog", err: <nil>
2023-09-26 13:43:08 DEBUG juju.state.pool.txnwatcher runner.go:406 "txnlog" done: <nil>
2023-09-26 13:43:08 DEBUG juju.state.pool.txnwatcher runner.go:473 no restart, removing "txnlog" from known workers
2023-09-26 13:43:08 DEBUG juju.state.watcher runner.go:278 killing runner 0xc00013f440
2023-09-26 13:43:08 DEBUG juju.state open.go:207 closed state without error
ERROR cannot cache image metadata: cannot save cloud image metadata: duplicate metadata record for image id 9ac1acac-a2bc-4e78-bf4d-925671ecf170 (key="released:RegionOne:22.04:amd64:::custom")
2023-09-26 13:43:08 DEBUG cmd supercommand.go:548 error stack:
github.com/juju/juju/state/cloudimagemetadata.(*storage).SaveMetadata.func1:72: duplicate metadata record for image id 9ac1acac-a2bc-4e78-bf4d-925671ecf170 (key="released:RegionOne:22.04:amd64:::custom")
github.com/juju/juju/state/cloudimagemetadata.(*storage).SaveMetadata:107: cannot save cloud image metadata
github.com/juju/juju/cmd/jujud/agent.storeImageMetadataInState:582: cannot cache image metadata
2023-09-26 13:43:08 DEBUG juju.cmd.jujud main.go:289 jujud complete, code 0, err <nil>
15:43:09 ERROR juju.cmd.juju.commands bootstrap.go:984 failed to bootstrap model: subprocess encountered error code 1
15:43:09 DEBUG juju.cmd.juju.commands bootstrap.go:985 (error details: [{github.com/juju/juju/cmd/juju/commands.(*bootstrapCommand).Run:1083: failed to bootstrap model} {github.com/juju/juju/environs/bootstrap.Bootstrap:732: } {github.com/juju/juju/environs/bootstrap.bootstrapIAAS:663: } {subprocess encountered error code 1}])
15:43:09 DEBUG juju.cmd.juju.commands bootstrap.go:1794 cleaning up after failed bootstrap
15:43:09 INFO juju.provider.common destroy.go:21 destroying model "controller"
15:43:09 INFO juju.provider.common destroy.go:32 destroying instances
Got any ideas what could be the problem?