Permalink
Browse files

Fix bug 1728738, don't over write failure status if aborting model

migration.
  • Loading branch information...
1 parent 4cd9d2e commit 06db34cb637594cbe6e80db4ecb1f22778b2988f @hmlanigan committed Nov 16, 2017
Showing with 3 additions and 3 deletions.
  1. +1 −1 worker/migrationmaster/worker.go
  2. +2 −2 worker/migrationmaster/worker_test.go
@@ -612,7 +612,7 @@ func (w *Worker) doREAP() (coremigration.Phase, error) {
}
func (w *Worker) doABORT(targetInfo coremigration.TargetInfo, modelUUID string) (coremigration.Phase, error) {
- w.setInfoStatus("aborted, removing model from target controller")
+ w.logger.Infof("aborted, removing model from target controller")
if err := w.removeImportedModel(targetInfo, modelUUID); err != nil {
// This isn't fatal. Removing the imported model is a best
// efforts attempt so just report the error and proceed.
@@ -570,8 +570,8 @@ func (s *Suite) TestVALIDATIONCheckMachinesOneError(c *gc.C) {
))
lastMessages := s.facade.statuses[len(s.facade.statuses)-2:]
c.Assert(lastMessages, gc.DeepEquals, []string{
+ "checking machines in migrated model",
"machine sanity check failed, 1 error found",
- "aborted, removing model from target controller",
})
}
@@ -593,8 +593,8 @@ func (s *Suite) TestVALIDATIONCheckMachinesSeveralErrors(c *gc.C) {
))
lastMessages := s.facade.statuses[len(s.facade.statuses)-2:]
c.Assert(lastMessages, gc.DeepEquals, []string{
+ "checking machines in migrated model",
"machine sanity check failed, 2 errors found",
- "aborted, removing model from target controller",
})
}

0 comments on commit 06db34c

Please sign in to comment.