Commit a5189d8b authored by Yang Meng's avatar Yang Meng

update mountpath of volume after migration

parent fea6b0d5
...@@ -199,9 +199,15 @@ func (b flockerBuilder) SetUpAt(dir string, fsGroup *int64) error { ...@@ -199,9 +199,15 @@ func (b flockerBuilder) SetUpAt(dir string, fsGroup *int64) error {
if err := b.updateDatasetPrimary(datasetID, primaryUUID); err != nil { if err := b.updateDatasetPrimary(datasetID, primaryUUID); err != nil {
return err return err
} }
newState, err := b.client.GetDatasetState(datasetID)
if err != nil {
return fmt.Errorf("The volume '%s' migrated unsuccessfully.", datasetID)
}
b.flocker.path = newState.Path
} else {
b.flocker.path = s.Path
} }
b.flocker.path = s.Path
volumeutil.SetReady(b.getMetaDir()) volumeutil.SetReady(b.getMetaDir())
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment