Heat has status blocked missing database relation

Bug #1571830 reported by David Ames
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
heat (Juju Charms Collection)
Fix Released
High
Unassigned

Bug Description

Heat related to perconca cluster upgraded to next:

The shared-db context is not fulfilled and sets the status to blocked.

Missing required data: database_password

On the relation is the following:
db_host: VIP
heat_password: PASS
private-address: ADDR

David Ames (thedac)
affects: charms → heat (Juju Charms Collection)
Changed in heat (Juju Charms Collection):
status: New → Triaged
milestone: none → 16.04
importance: Undecided → High
Revision history for this message
David Ames (thedac) wrote :
Revision history for this message
David Ames (thedac) wrote :

This is an issue when upgrading from stable to next only

commit 1bdc87f495898be3a9877f0a14528ce48c27f3f0
Author: Liang Chen <email address hidden>
Date: Fri Feb 19 19:22:51 2016 +0800

    Provide heat charm HA support

    [cbjchen,r=]

Changed the way the relation data was set. Will discuss on the correct solution.

 @hooks.hook('amqp-relation-joined')
 def amqp_joined(relation_id=None):
@@ -131,9 +167,17 @@ def db_joined():
                                           config('database-user'),
                                           relation_prefix='heat')
     else:
- relation_set(heat_database=config('database'),
- heat_username=config('database-user'),
- heat_hostname=unit_get('private-address'))
+ host = None
+ try:
+ # NOTE: try to use network spaces
+ host = network_get_primary_address('shared-db')
+ except NotImplementedError:
+ # NOTE: fallback to private-address
+ host = unit_get('private-address')
+
+ relation_set(database=config('database'),
+ username=config('database-user'),
+ hostname=host)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-heat (master)

Reviewed: https://review.openstack.org/307492
Committed: https://git.openstack.org/cgit/openstack/charm-heat/commit/?id=cc6811b7f7151c6bef7031859ef24d7efb6eb1d1
Submitter: Jenkins
Branch: master

commit cc6811b7f7151c6bef7031859ef24d7efb6eb1d1
Author: David Ames <email address hidden>
Date: Mon Apr 18 14:26:52 2016 -0700

    Use restore heat_ prefix for shared-db relation

    Heat is staying in status blocked Missing relation database when
    doing an upgrade from stable to next. Missing required data:
    database_password. The relation is actually passing heat_password.

    Commit 1bdc87f495898be3a9877f0a14528ce48c27f3f0 removed the heat_
    prefix. This changes restores the heat_ prefix to allow stable to
    next upgrades to work.

    Change-Id: Id87afd5eda14eceac6c734867f9f96328c116c79
    Closes-Bug: #1571830

Changed in heat (Juju Charms Collection):
status: Triaged → Fix Committed
James Page (james-page)
Changed in heat (Juju Charms Collection):
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.