Unable to remove listed offer

Bug #1757944 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth
2.3
Fix Released
High
Ian Booth

Bug Description

I have an offer I'm unable to remove:

$ juju list-offers
Offer User Relation id Status Endpoint Interface Role Ingress subnets
client-db admin 1 joined db pgsql requirer

$ juju remove-offer client-db
ERROR application offer URL is missing application

$ juju status --format=json | jq .offers
{
  "client-db": {
    "application": "psql",
    "charm": "local:xenial/postgresql-client-0",
    "total-connected-count": 1,
    "active-connected-count": 1,
    "endpoints": {
      "db": {
        "interface": "pgsql",
        "role": "requirer"
      }
    }
  }
}

Revision history for this message
Stuart Bishop (stub) wrote :

$ juju remove-application psql
removing application psql failed: cannot destroy application "psql": application is used by 1 offer

Destroying the model worked.

Revision history for this message
Stuart Bishop (stub) wrote :

I think the issue here is that either 'juju offers' needs to list the URL, or 'remove-offer' needs to accept the offer name (ie. assume the offer is in the current model).

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

Offers can exist in any controller and model the user has access to, so the remove-offer command is a so called "controller command" which does not have the concept of a current model. The minimal syntax would be:
$ juju remove-offer modelname.offername
(assuming the current user owns modelname)

or

$ juju remove-offer user/modelname.offername

Other commands like grant/revoke etc also work this way.

That's not to say we shouldn't look to improve the user experience here.

Revision history for this message
John A Meinel (jameinel) wrote :

This is either In Progress or Incomplete, as we're adding a remove-offer --force, but also unable to reproduce the original issue that Stub was encountering.

Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
importance: Undecided → High
status: New → In Progress
Revision history for this message
John A Meinel (jameinel) wrote :
Revision history for this message
Ian Booth (wallyworld) wrote :

Comment #4 refers to bug 1757926 not this one.
The above PR does make it possible though to just type a bare offer name for remove and show

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: none → 2.4-beta2
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.