File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,7 +214,11 @@ public void setDisconnected() {
214214 }
215215
216216 public void logDisconnect () {
217- s_logger .warn ("Unable to monitor download progress of " + template .getName () + " at host " + sserver .getName ());
217+ if (template != null ){
218+ s_logger .warn ("Unable to monitor download progress of " + template .getName () + " at host " + sserver .getName ());
219+ }else {
220+ s_logger .warn ("Unable to monitor download progress of " + volume .getName () + " at host " + sserver .getName ());
221+ }
218222 }
219223
220224 public synchronized void updateDatabase (Status state , String errorString ) {
Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ public Volume attachVolumeToVM(AttachVolumeCmd command) {
591591 }else {
592592 try {
593593 // Format of data disk should be the same as root disk
594- if (_storageMgr . getSupportedImageFormatForCluster ( rootDiskPool . getClusterId ()) != volHostVO .getFormat ().getFileExtension ()){
594+ if ( ! volHostVO .getFormat ().getFileExtension (). equals ( _storageMgr . getSupportedImageFormatForCluster ( rootDiskPool . getClusterId ())) ){
595595 throw new InvalidParameterValueException ("Failed to attach volume to VM since volumes format " +volHostVO .getFormat ().getFileExtension ()+
596596 " is not compatible with the vm hypervisor type" );
597597 }
You can’t perform that action at this time.
0 commit comments