Comment 15 for bug 1960934

Revision history for this message
Carl Csaposs (carlcsaposs) wrote :

I was able to reproduce this on k8s with the following steps on juju 3.4.2:
juju add-model foo1
juju deploy mysql-router-k8s
juju deploy mysql-test-app
juju integrate mysql-router-k8s mysql-test-app
Wait for idle
juju debug-hooks mysql-router-k8s/0
juju remove-relation mysql-router-k8s mysql-test-app
In debug-hooks session, dispatch event (relation departed) & exit. At the exact same time (in another terminal), run kubectl -n foo1 delete pod mysql-router-k8s-0 --force
Exit debug-hooks session and run juju debug-hooks mysql-router-k8s/0 again (to debug new pod)
In debug-hooks session, dispatch & exit until you get to relation-broken event
Then `echo $JUJU_REMOTE_APP` is empty
However, `../../../tools/unit-mysql-router-k8s-0/relation-get -r database:4 - --app mysql-test-app` still shows the remote app's relation data

I believe this bug happens when the remote app (mysql-test-app) finishes executing relation-broken before the local app (mysql-router-k8s) starts to execute relation-broken. I imagine there's a better way to reproduce this (that doesn't involve deleting the pod), but couldn't think of one off the top of my head