Github user rafaelweingartner commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1365#discussion_r58743070
  
    --- Diff: server/src/com/cloud/storage/VolumeApiServiceImpl.java ---
    @@ -1924,6 +1935,23 @@ public Volume migrateVolume(MigrateVolumeCmd cmd) {
                                     throw new 
InvalidParameterValueException("Cannot migrate ROOT volume of a stopped VM to a 
storage pool in a different VMware datacenter");
                                 }
                             }
    +
    +                        String rootVolChainInfo = vol.getChainInfo();
    +                        if 
((vm.getType().equals(VirtualMachine.Type.User)) && (rootVolChainInfo != null) 
&& (!rootVolChainInfo.isEmpty())) {
    +                            String rootDiskController = null;
    +                            try {
    +                                VirtualMachineDiskInfo infoInChain = 
_gson.fromJson(rootVolChainInfo, VirtualMachineDiskInfo.class);
    +                                if (infoInChain != null) {
    +                                    rootDiskController = 
infoInChain.getControllerFromDeviceBusName();
    +                                }
    +                                UserVmVO userVmVo = 
_userVmDao.findById(vm.getId());
    +                                if ((rootDiskController != null) && 
(!rootDiskController.isEmpty())) {
    +                                    _userVmDao.loadDetails(userVmVo);
    +                                    
_userVmMgr.persistDeviceBusInfo(userVmVo, rootDiskController);
    +                                }
    +                            } catch (JsonParseException ignored) {
    --- End diff --
    
    At least a warning/debug message should be printed. This approach of 
silencing exception is never a good idea.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to