Model migration fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Tim Penhey |
Bug Description
# Issue
MAAS environment with 2 separate controllers. Old controller A has 4GB RAM and a model with about 40 machines. Controller B is an empty controller with 8GB RAM. Trying to migrate the model from A to B stops after a few seconds with with the message "migration: aborted, removing model from target controller" when running "juju show-model".
# Logs machine-0.log from controller A
2017-02-28 14:25:40 ERROR juju.worker.
2017-02-28 14:25:40 WARNING juju.worker.
# Versions
Juju 2.1.0
MAAS 2.1.3
Any tips for further troubleshooting?
Changed in juju: | |
milestone: | none → 2.2-rc1 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
This error means that when we query the status history to export it we're sorting by columns that don't match the available indexes in Mongo.
Looking in the code I can see that the index on the statuseshistory collection is {"model-uuid", "globalkey", "updated"}, but in the export we're sorting by {"-updated", "-_id"} (after filtering by model-uuid).
I think one way to fix it would be to add an index on {"model-uuid", "-updated", "-_id"}. (Maybe we could fix it by querying slightly differently instead.)
The statuseshistory collection should be being trimmed by the status history pruner - can you see any messages in the logs about that? Maybe some indication of how big the collection is?