cassandra_username became juju_None

Bug #1555261 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cassandra (Juju Charms Collection)
Fix Released
Critical
Stuart Bishop

Bug Description

I've been working on a mojo specification for the Ubuntu Error Tracker, you can find my work at:

https://code.launchpad.net/~brian-murray/canonical-mojo-specs/initial-error-tracker

The devel stage of the spec uses apache cassandra, not dse. When I have been using that stage I encountered a situation where e-t-daisy-app has a "good" cassandra username and e-t-errors-app does not. Log from e-t-errors-app:

2016-03-08 16:20:28 INFO db-relation-changed + REL_ID=db:17
2016-03-08 16:20:28 INFO db-relation-changed ++ relation-get -r db:17 username e-t-cassandra/0
2016-03-08 16:20:28 INFO db-relation-changed + cassandra_username=juju_None
2016-03-08 16:20:28 INFO db-relation-changed + save_setting cassandra_username juju_None
2016-03-08 16:20:28 INFO db-relation-changed + key=cassandra_username
2016-03-08 16:20:28 INFO db-relation-changed + value=juju_None

And the log from e-t-daisy-app:

2016-03-08 16:20:28 INFO db-relation-changed ++ relation-ids db
2016-03-08 16:20:28 INFO db-relation-changed + REL_ID=db:16
2016-03-08 16:20:28 INFO db-relation-changed ++ relation-get -r db:16 username e-t-cassandra/0
2016-03-08 16:20:28 INFO db-relation-changed + cassandra_username=juju_e-t-daisy-app
2016-03-08 16:20:28 INFO db-relation-changed + save_setting cassandra_username juju_e-t-daisy-app
2016-03-08 16:20:28 INFO db-relation-changed + key=cassandra_username
2016-03-08 16:20:28 INFO db-relation-changed + value=juju_e-t-daisy-app

This also happened with e-t-retracer-app:

2016-03-08 16:20:29 INFO db-relation-changed ++ relation-ids db
2016-03-08 16:20:29 INFO db-relation-changed + REL_ID=db:18
2016-03-08 16:20:29 INFO db-relation-changed ++ relation-get -r db:18 username e-t-cassandra/0
2016-03-08 16:20:29 INFO db-relation-changed + cassandra_username=juju_None
2016-03-08 16:20:29 INFO db-relation-changed + save_setting cassandra_username juju_None
2016-03-08 16:20:29 INFO db-relation-changed + key=cassandra_username
2016-03-08 16:20:29 INFO db-relation-changed + value=juju_None

I've not had this issue using the DSE version and staging version of the spec.

Related branches

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

I think this is a race, and is just less likely to occur with DSE due to different timings.

Changed in cassandra (Juju Charms Collection):
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Stuart Bishop (stub) wrote :

It appears that if the relation-joined hook is run early enough on the Cassandra unit, there are no related units yet joined and the remote service name is unknown. We need to check for this case and when it occurs do nothing until a later hook.

Changed in cassandra (Juju Charms Collection):
assignee: nobody → Stuart Bishop (stub)
status: Triaged → In Progress
Stuart Bishop (stub)
Changed in cassandra (Juju Charms Collection):
status: In Progress → 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.