Comment 1 for bug 2011576

Revision history for this message
Przemyslaw Lal (przemeklal) wrote :

Workaround steps (executed on the primary mongodb instance) while the controllers were down:

db.actions.find({"model-uuid" : "2c0996b0-4650-4a26-8713-64a8bdf7d8a7", "enqueued" : {$lte: ISODate("2023-03-01T00:00:00Z")}}).count()
db.actions.deleteMany({"model-uuid" : "2c0996b0-4650-4a26-8713-64a8bdf7d8a7", "enqueued" : {$lte: ISODate("2023-03-01T00:00:00Z")}})
db.operations.find({"model-uuid" : "2c0996b0-4650-4a26-8713-64a8bdf7d8a7", "enqueued" : {$lte: ISODate("2023-03-01T00:00:00Z")}}).count()
db.operations.deleteMany({"model-uuid" : "2c0996b0-4650-4a26-8713-64a8bdf7d8a7", "enqueued" : {$lte: ISODate("2023-03-01T00:00:00Z")}})

agent=$(cd /var/lib/juju/agents; echo machine-*)
pw=$(sudo grep statepassword /var/lib/juju/agents/${agent}/agent.conf | cut '-d ' -sf2)
mgopurge --username $agent --password $pw

# start all 3 controllers, action-pruner started successfully for 2c0996b0-4650-4a26-8713-64a8bdf7d8a7 on one of the controllers according to juju_engine_report