Closed PietroPasotti closed 3 months ago
Interesting idea! A couple of thoughts/questions:
jhack charm disable-events
/ jhack charm enable-events
?storm
in some cases you know that you're about to get an event storm you don't want. For example, you want to remove a charm that has 100 relations, and you don't care about all those broken/departed events, you just want the charm to go.
A user came to me with a juju 2.9->3 migration scenario, where they needed to suspend event processing because model migration apparently involves breaking all cross-model relations and re-creating them on the new juju3 model. And they didn't want that to happen as you 'know' that the new model and the old one will be topologically identical and the events will effectively be for nothing and cause unnecessary workload restarts and downtime.
lobotomy command. Helpful when you have to endure an event storm.
Idea: (temporary) disable event processing for a charm. Juju will know nothing, but the charm will ignore all events and be effectively dead.
Usage:![image](https://github.com/canonical/jhack/assets/6230162/3ae9151c-3ec8-4a71-bd4f-d2ea19d5cc11)
Lobotomy replaces the dispatch script with one that does nothing except put a juju-log that says that the event has been skipped. Lobotomy can be applied and lifted in batches to whole applications o entire models.