Hi,
When trying to upgrade a charm on a juju environment (deploying only on MAAS nodes), I get the following error :
$ juju upgrade-charm ubuntu-mirror
Added charm "local:precise/ubuntu-mirror-150" to the environment.
ERROR state changing too quickly; try again soon
Logs for the request :
http://pastebin.ubuntu.com/12061378/
I dug a bit and found the following : approximately every 17 min, juju detects a new address for each MAAS node and I see the following in machine-0.log :
juju.worker.instanceupdater updater.go:264 machine "0" has new addresses: [public:foo.example.com]
And in all-machines.log, for each unit of the environment, I get :
unit-foo-XY 2015-08-12 12:11:32 INFO juju.worker.upgrader upgrader.go:121 desired tool version: 1.18.4
We started an 1.16 -> 1.18 upgrade at the end of July, I guess it's not completed yet ?
How can I upgrade the charm ? I tried restarting the jujud-machine-0, to no avail. juju status is clean.
Thanks
I think I found the cause of this bug : stale data in the DB.
> db.services. findOne( {_id : "ubuntu-mirror"} ).relationcount
8
> db.relations.find({ _id: { $regex: "ubuntu-mirror:" } }).count()
7
When trying to upgrade the charm, one of the transaction (txnOp) asserts that "relationcount" in the service is 7, while in the DB it 8. So the set of transaction fails, juju retries 4 times and ends up throwing an ExcessiveContention error.
Is my analysis correct ? How can I progress with this ?
Thanks !