canonical / jhack

Chock-full of Juju hackery.
Apache License 2.0
50 stars 24 forks source link

`hack fire config-server-one/0 <rel-interface>-config-changed` doesn't fire an event #109

Closed MiaAltieri closed 8 months ago

MiaAltieri commented 11 months ago

Environment

Deployment

MongoDB Charm Sharded Cluster

juju deploy ./*charm --config role="config-server" config-server-one -n2
juju deploy ./*charm --config role="shard" shard-one -n2
juju deploy ./*charm --config role="shard" shard-two -n2
juju integrate config-server-one:config-server shard-one:sharding
juju integrate config-server-one:config-server shard-two:sharding

Testing

  1. open debug hooks sessions in two separate tabs to monitor events
    juju debug-hooks  shard-two/0
    juju debug-hooks  shard-two/1
  2. attempt to trigger events:
    jhack fire config-server-one/0 sharding-config-changed
    jhack fire shard-two/0 sharding-config-changed
    jhack fire shard-two/1 sharding-config-changed

Excepted action

sharding-config-changed to be triggered and seen on debug hooks

Observed action

no events triggered

PietroPasotti commented 10 months ago

Hi Mia, Jhack always had some issues with LXD models due to juju ssh complexities and snap confinement, apologies for that. checking if I can reproduce it locally

does anything interesting show up if you set the envvar LOGLEVEL=DEBUG before running jhack fire?

PietroPasotti commented 9 months ago

aha also something I just noticed: sharding-config-changed is not a juju event. Is it a custom event?

Jhack fire only supports firing juju events. So if you want a custom event to be triggered, you'll have to jhack fire the juju event that causes it to be emitted.

PietroPasotti commented 8 months ago

@MiaAltieri can you also check whether this may be an instance of #113?

PietroPasotti commented 8 months ago

allright, it was caused by #118 Should be solved with #123