amulet openstack tests have race - some tests start before relations/hooks have settled

Bug #1474036 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Released
Medium
Ryan Beisner
cinder-ceph (Juju Charms Collection)
Fix Released
Medium
Ryan Beisner

Bug Description

Although most observable in the cinder-ceph amulet tests (by way of relation data sometimes existing, sometimes not existing at the point of checking), this potentially impacts all openstack charm amulet tests.

Currently, those tests use an arbitrary sleep after amulet / deployer has returned "complete." Sometimes that arbitrary wait time is not enough, depending on timing and load of other activities in the test rig.

So I implemented the same logic used in mojo-openstack specs (juju run against all units, twice before proceeding). That reduced the occurrence of race, but did not eliminate it. The juju run approach appears to no longer be effective.

Amulet helpers need a reliable method to know when hooks have settled, relations are made, and relation data is in a consistent state.

Ryan Beisner (1chb1n)
description: updated
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Example of impact: http://paste.ubuntu.com/11812413/

Where the broker_rsp relation data is not always present at the time the tests fire.

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

For Juju 1.23 and earlier you need to install the juju-wait plugin from ppa:stub/juju, or implement its algorithm yourself (lp:juju-wait). Every other approach has been tried before and fails.

For Juju 1.24, you should be able to use the newer agent statuses.

James Page (james-page)
Changed in cinder-ceph (Juju Charms Collection):
importance: Undecided → Medium
Changed in charm-helpers:
importance: Undecided → Medium
Changed in cinder-ceph (Juju Charms Collection):
status: New → Triaged
Changed in charm-helpers:
status: New → Triaged
Ryan Beisner (1chb1n)
Changed in cinder-ceph (Juju Charms Collection):
assignee: nobody → Ryan Beisner (1chb1n)
Changed in charm-helpers:
assignee: nobody → Ryan Beisner (1chb1n)
Ryan Beisner (1chb1n)
Changed in charm-helpers:
status: Triaged → Fix Released
Changed in cinder-ceph (Juju Charms Collection):
status: Triaged → 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.