offer info is missing from juju offers and juju offers <app_name> if no relation exists.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Ian Booth |
Bug Description
Juju version: 2.3-beta2-
After an existing relation is removed by juju remove-relation <relation_id>, the information of the offer is missing from juju offers and juju offers <app_name>. However the offer exists and its details can be obtained by run juju offers --format yaml or juju offers <app_name> --format yaml
Procedures:
juju bootstrap aws ctrl-1
Wait until bootstrap process is completed.
juju deploy mysql
Wait until mysql app is up and ready - checking via juju status.
juju offer mysql:db
juju bootstrap aws ctrl-2
Wait until bootstrap process is completed.
juju deploy mediawiki
Wait until mysql app is up. Note: because at this stage the app hasn't been related to mysql, its status will show as blocked - checking via juju status.
juju relate mediawiki:db ctrl-1:
Wait until mediawiki app is ready, "blocked" status should change to "active" - checking via juju status.
juju switch ctrl-1
juju offers (get relation id)
juju remove-relation <relation_id>
juju offers or juju offers mysql
The output is empty:
Offer User Relation id Status Endpoint Interface Role Ingress subnets
However the offer still exists and its info can be obtained by run:
juju offers --format summary
Offer Application Charm Connected Store URL Endpoint Interface Role
mysql mysql cs:mysql-58 0/0 ctrl-1 admin/default.mysql db mysql provider
juju offers --format yaml
mysql:
application: mysql
store: ctrl-1
charm: cs:mysql-58
offer-url: admin/default.mysql
endpoints:
db:
interface: mysql
role: provider
users:
admin:
display-name: admin
access: admin
everyone@
access: read
The confusion here is while the offer exists, juju offers doesn't give any info about it if no relation exists, unless using --format flag. In other word, juju offers gives same output in following 2 situations:
1. No offer exists.
2. Offer exists but no relation exists.
This issue can also be reproduced just after the offer is created:
juju bootstrap aws ctrl-1
Wait until bootstrap process is completed.
juju deploy mysql
Wait until mysql app is up and ready - checking via juju status.
juju offer mysql:db
juju offers or juju offers mysql
The output is empty:
Offer User Relation id Status Endpoint Interface Role Ingress subnets
Changed in juju: | |
status: | Fix Committed → Fix Released |
The output will be changed to include offers with no connections in tabular format. Plies there will be an option to only show active.