Error bootstrapping on openstack when specifying bootstrap-image

Bug #2039648 reported by Nicolas Vinuesa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Nicolas Vinuesa

Bug Description

This bug was identified after this discourse post https://discourse.charmhub.io/t/juju-bootstrap-duplicate-metadata-record-for-image-id/11972

When trying to bootstrap on an openstack cloud (on this case it is on canonical's internal serverstack), and passing the --bootstrap-image flag (along with the --metadata-source flag), this error is returned:

ERROR cannot cache image metadata: cannot save cloud image metadata: duplicate metadata record for image id 60b52fed-dbf9-4ac1-8a89-163ebf8a8c4a (key="released:serverstack:22.04:amd64:::custom")

and on the debug logs:

2023-10-18 08:00:21 DEBUG cmd supercommand.go:528 error stack:
github.com/juju/juju/state/cloudimagemetadata.(*storage).SaveMetadata.func1:72: duplicate metadata record for image id 60b52fed-dbf9-4ac1-8a89-163ebf8a8c4a (key="released:serverstack: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:575: cannot cache image metadata
2023-10-18 08:00:21 DEBUG juju.cmd.jujud main.go:286 jujud complete, code 0, err <nil>

This is a reproducer (on serverstack):
juju --debug bootstrap serverstack c2 \
--config network={user}_admin_net \
--config default-base=ubuntu@22.04 \
--config default-series=jammy \
--bootstrap-image={imageID} \
--bootstrap-base=ubuntu@22.04 \
--bootstrap-constraints="allocate-public-ip=true arch=amd64" \
--metadata-source ~/simplestreams

Revision history for this message
Joseph Phillips (manadart) wrote :

Something pertinent in the log output on Discourse, is that we appear to get 2 events from the txn watcher:

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

At a glace it looks like we act on them distinctly, causing the duplication error.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Changed in juju:
milestone: none → 3.2.4
assignee: nobody → Nicolas Vinuesa (nvinuesa)
Changed in juju:
milestone: 3.2.4 → 3.2.5
Ian Booth (wallyworld)
tags: added: openstack-provider
Changed in juju:
milestone: 3.2.5 → none
Revision history for this message
Michael C Jaeger (mcjaeger) wrote :

Hello, it would be nice to share more details, well, some information, what will happen with this issue or what were considerations for pulling it out of the 3.2.5 milestone. Was it maybe implicitly solved by another update? what will happen here?

Revision history for this message
Nicolas Vinuesa (nvinuesa) wrote :
Revision history for this message
Ian Booth (wallyworld) wrote :

This bug was moved off the 3.2 milestone because 3.2 is now EOL. Moving forward, at the time of writing we will be doing 3.3.x releases for a while, until 3.4 comes out.

We can consider this bug for 3.3.x. There is a work around though and we have a lot of bugs to consider, so we'll need to make a prioritisation call as to if this bug can be accommodated.

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.