Merge remote-tracking branch 'apache/4.15' into main

This commit is contained in:
davidjumani 2021-07-27 10:23:00 +05:30
commit 37f3fc30c9
2 changed files with 5 additions and 13 deletions

View File

@ -1113,14 +1113,6 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
* This will be checked again at the hypervisor level where we can see
* the actual disk size.
*/
if (currentSize > newSize) {
VolumeVO vol = _volsDao.findById(cmd.getEntityId());
if (vol != null && ImageFormat.QCOW2.equals(vol.getFormat()) && !Volume.State.Allocated.equals(volume.getState())) {
String message = "Unable to shrink volumes of type QCOW2";
s_logger.warn(message);
throw new InvalidParameterValueException(message);
}
}
if (currentSize > newSize && !shrinkOk) {
throw new InvalidParameterValueException("Going from existing size of " + currentSize + " to size of " + newSize + " would shrink the volume."
+ "Need to sign off by supplying the shrinkok parameter with value of true.");
@ -1375,7 +1367,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
return volume;
} catch (Exception e) {
throw new CloudRuntimeException("Couldn't resize volume: " + volume.getName() + ", " + e.getMessage(), e);
throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e.getMessage()), e);
}
}

View File

@ -43,7 +43,7 @@
</div>
</div>
</a-list-item>
<a-list-item>
<a-list-item v-if="host.hosttags">
<div>
<strong>{{ $t('label.hosttags') }}</strong>
<div>
@ -51,7 +51,7 @@
</div>
</div>
</a-list-item>
<a-list-item>
<a-list-item v-if="host.oscategoryid">
<div>
<strong>{{ $t('label.oscategoryid') }}</strong>
<div>
@ -83,7 +83,7 @@
</div>
</div>
</a-list-item>
<a-list-item v-if="host.hostha">
<a-list-item v-if="host.hostha && host.hostha.haenable">
<div>
<strong>{{ $t('label.hastate') }}</strong>
<div>
@ -91,7 +91,7 @@
</div>
</div>
</a-list-item>
<a-list-item v-if="host.hostha">
<a-list-item v-if="host.hostha && host.hostha.haenable">
<div>
<strong>{{ $t('label.haprovider') }}</strong>
<div>