Comment 13 for bug 1765722

Revision history for this message
Doug Parrish (dparrish) wrote :

@jameinel - the recovery procedure in comment #11 was exercised and found to be successful with the addition of resetting the machine-0 symlink to the correct tools in /var/lib/juju/tools. Also, updated settings collection directly to update settings.agent-version.

juju:PRIMARY> db.models.find({"name": "controller"},{"_id": 1})
{ "_id" : "2699eb14-5f87-4821-8815-fe026c24b56b" }

juju:PRIMARY> db.settings.find({"_id": "2699eb14-5f87-4821-8815-fe026c24b56b:e"},{"settings.agent-version": 1}).pretty()
{
 "_id" : "2699eb14-5f87-4821-8815-fe026c24b56b:e",
 "settings" : {
  "agent-version" : "2.3.6"
 }
}

juju:PRIMARY> db.settings.update({"_id": "2699eb14-5f87-4821-8815-fe026c24b56b:e"},{$set: {"settings.agent-version": "2.3.5"}})
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })

juju:PRIMARY> db.settings.find({"_id": "<controller_model_uuid>:e"},{"settings.agent-version": 1}).pretty()
{
 "_id" : "2699eb14-5f87-4821-8815-fe026c24b56b:e",
 "settings" : {
  "agent-version" : "2.3.5"
 }
}

KB article[0] documenting this procedure is currently under review.

Thank you for quick resolution.

[0] https://support.canonical.com/ua/s/article/Recover-Juju-controller-from-failed-2-3-6-upgrade-juju