mirror of https://github.com/apache/cloudstack.git
Merging #653 (Mike Tutkowski) (Reduce lowest hypervisor snapshot reserve value)
* pr/653: The lowest the hypervisor snapshot reserve value can be is 10 (down from 50). Signed-off-by: Mike Tutkowski (mike.tutkowski@solidfire.com) Signed-off-by: Mike Tutkowski <mike.tutkowski@solidfire.com>
This commit is contained in:
commit
abfe33a244
|
|
@ -77,6 +77,7 @@ import com.cloud.utils.exception.CloudRuntimeException;
|
|||
public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
|
||||
private static final Logger s_logger = Logger.getLogger(SolidFirePrimaryDataStoreDriver.class);
|
||||
private static final int s_lockTimeInSeconds = 300;
|
||||
private static final int s_lowestHypervisorSnapshotReserve = 10;
|
||||
|
||||
@Inject private AccountDao _accountDao;
|
||||
@Inject private AccountDetailsDao _accountDetailsDao;
|
||||
|
|
@ -352,9 +353,7 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
|
|||
Integer hypervisorSnapshotReserve = volume.getHypervisorSnapshotReserve();
|
||||
|
||||
if (hypervisorSnapshotReserve != null) {
|
||||
if (hypervisorSnapshotReserve < 50) {
|
||||
hypervisorSnapshotReserve = 50;
|
||||
}
|
||||
hypervisorSnapshotReserve = Math.max(hypervisorSnapshotReserve, s_lowestHypervisorSnapshotReserve);
|
||||
|
||||
volumeSize += volumeSize * (hypervisorSnapshotReserve / 100f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue