server: Fix string format error (#5061)

This commit is contained in:
davidjumani 2021-06-01 17:34:19 +05:30 committed by GitHub
parent d04fa0201d
commit 704b24e68f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1169,7 +1169,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
private void checkIfVolumeIsRootAndVmIsRunning(Long newSize, VolumeVO volume, VMInstanceVO vmInstanceVO) {
if (!volume.getSize().equals(newSize) && volume.getVolumeType().equals(Volume.Type.ROOT) && !State.Stopped.equals(vmInstanceVO.getState())) {
throw new InvalidParameterValueException(String.format("Cannot resize ROOT volume [%s] when VM is not on Stopped State. VM %s is in state %.", volume.getName(), vmInstanceVO
throw new InvalidParameterValueException(String.format("Cannot resize ROOT volume [%s] when VM is not on Stopped State. VM %s is in state %s", volume.getName(), vmInstanceVO
.getInstanceName(), vmInstanceVO.getState()));
}
}