offers in bundles are not idempotent

Bug #1894004 reported by Jason Hobbs
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Achilleas Anagnostopoulos

Bug Description

This is with 2.8.1-bionic-amd64

I'm deploying offers as an overlay in addition to my base bundle. After correcting a config value in my initial bundle deploy, I deployed the bundle and overlays again.

This time, I got an error:
ERROR cannot deploy bundle: cannot create offer prometheus-target: cannot add application offer "prometheus-target": application offer already exists
21:13:19 DEBUG cmd supercommand.go:537 error stack:
cannot add application offer "prometheus-target": application offer already exists
/build/snapcraft-juju-03af7d/parts/juju/src/cmd/juju/application/bundle.go:1121: cannot create offer prometheus-target
/build/snapcraft-juju-03af7d/parts/juju/src/cmd/juju/application/bundle.go:489:
/build/snapcraft-juju-03af7d/parts/juju/src/cmd/juju/application/bundle.go:167:
/build/snapcraft-juju-03af7d/parts/juju/src/cmd/juju/application/deploy.go:953: cannot deploy bundle
/build/snapcraft-juju-03af7d/parts/juju/src/cmd/juju/application/deploy.go:1355:

Deploying offer overlays should be idempotent, like deploying bundles is. Otherwise, it's difficult to automate their deployment.

Revision history for this message
Pen Gale (pengale) wrote :

@jason-hobbs can you comment here with a snippet of the bundle and the overlay that you're deploying? This is on my list of things to triage, but I haven't had the time to loop back and come up with a reproducer model and overlay independently.

Changed in juju:
status: New → Incomplete
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

@petevg here is a concise example, you can deploy it on a lxd controller. you don't have to wait for the unit to get setup or anything, just deploy this bundle twice in a row and you'll hit the issue. http://paste.ubuntu.com/p/zJqHqkGXJ3/

ERROR cannot deploy bundle: cannot create offer graylog-beats: cannot add application offer "graylog-beats": application offer already exists

Changed in juju:
status: Incomplete → New
Revision history for this message
Pen Gale (pengale) wrote :

Confirmed. Thank you for the straightforward repro case, @jason-hobbs!

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 2.9-beta1
David Coronel (davecore)
tags: added: field-medium
Revision history for this message
David Coronel (davecore) wrote :

subscribed ~field-medium

tags: removed: field-medium
Changed in juju:
milestone: 2.9-beta1 → 2.9-rc1
Pen Gale (pengale)
Changed in juju:
milestone: 2.9-rc1 → 2.9.1
importance: Medium → High
Changed in juju:
assignee: nobody → Achilleas Anagnostopoulos (achilleasa)
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

PR https://github.com/juju/juju/pull/12608 includes a fix for 2.8. In addition to the above fix, the changes in the PR will also allow you to use a bundle to mutate (i.e add new endpoints or delete existing ones) the offered endpoints for existing offers.

Note that as a safety feature, juju will prevent you from removing offer endpoints that have active consumers attached as that would potentially cause things to break.

Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

The fix will also be forward ported to the 2.9 branch and I will mark this as fixed committed when it lands.

Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

PR https://github.com/juju/juju/pull/12615 includes a fix for 2.9

Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Ian Booth (wallyworld) wrote :

Released in 2.9.0 but was on wrong milestone

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.