juju-solutions / layer-hue

HUE Layer for Juju
0 stars 5 forks source link

Ready state not being cleared after relation-departed #1

Open andrewdmcleod opened 8 years ago

andrewdmcleod commented 8 years ago

configure_spark relies on @when('spark.ready'), which should be cleared when relation-departed, however:

unit-hue-2[2998]: 2016-02-18 12:00:31 INFO unit.hue/2.juju-log server.go:268 spark:25: Invoking reactive handler: hooks/relations/spark/provides.py:27:departed
unit-hue-2[2998]: 2016-02-18 12:00:31 INFO unit.hue/2.juju-log server.go:268 spark:25: Invoking reactive handler: reactive/hue.py:109:depart_spark
unit-hue-2[2998]: 2016-02-18 12:00:31 INFO unit.hue/2.juju-log server.go:268 spark:25: Invoking reactive handler: reactive/hue.py:81:configure_spark
unit-hue-2[2998]: 2016-02-18 12:00:32 INFO unit.hue/2.juju-log server.go:268 spark:25: configuring spark connection via livy
unit-hue-2[2998]: 2016-02-18 12:00:32 INFO unit.hue/2.juju-log server.go:268 spark:25: Invoking reactive handler: reactive/hue.py:68:check_relations
johnsca commented 8 years ago

The hue layer shouldn't be calling spark/provides.py but is, and it should be calling spark/requires.py but isn't. The problem appears to be the departed handler decorators on both provides and requires in interface-spark; I've created a PR to address them: juju-solutions/interface-spark#3