You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/01/20 04:52:38 UTC

[GitHub] mike-tutkowski opened a new pull request #2416: CLOUDSTACK-10244: KVM online storage migration fails

mike-tutkowski opened a new pull request #2416: CLOUDSTACK-10244: KVM online storage migration fails
URL: https://github.com/apache/cloudstack/pull/2416
 
 
   This is an issue that was introduced in the code-review process of #2298.
   
   What is probably the simplest solution (and what this PR does) is to store the result of MapUtils.isNotEmpty(mapMigrateStorage) before passing mapMigrateStorage to the replaceStorage method.
   
   The replaceStorage method can mutate the data in the passed-in map, thus leading to a different result for MapUtils.isNotEmpty(mapMigrateStorage) later on (and causing an issue for online storage migration).
   
   If we just store the value up front and refer to it later, we, of course, get the same (boolean) result and online storage migration works properly.
   
   A more long-term solution (and one that I plan on implementing for 4.12) would be to make a shallow copy of the map inside of replaceStorage so that replaceStorage does not actually mutate the data in the original map. While that isn't a difficult solution to implement, I feel the one I have implemented in this PR is safer as we are in the release-candidate process already.
   
   Here is a link to the JIRA ticket:
   
   https://issues.apache.org/jira/browse/CLOUDSTACK-10244
   
   I have tested the code and validated that it works.
   
   This use case only applies to online storage migration from NFS or Ceph to managed storage, which is a new feature for 4.11.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services