[
https://issues.apache.org/jira/browse/CLOUDSTACK-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877600#comment-15877600
]
ASF GitHub Bot commented on CLOUDSTACK-5806:
--------------------------------------------
GitHub user abhinandanprateek opened a pull request:
https://github.com/apache/cloudstack/pull/1958
CLOUDSTACK-5806: add presetup to storage types that support over prov…
…isioning
Ideally this should be configurable via global settings
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shapeblue/cloudstack CLOUDSTACK-5806
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1958.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1958
----
commit 6ad3429085abf2943ff3183288b7f2e7e0165963
Author: Abhinandan Prateek <[email protected]>
Date: 2017-02-22T06:48:35Z
CLOUDSTACK-5806: add presetup to storage types that support over
provisioning
Ideally this should be configurable via global settings
----
> Storage types other than NFS/VMFS can't overprovision
> -----------------------------------------------------
>
> Key: CLOUDSTACK-5806
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5806
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.2.0, 4.3.0, Future
> Reporter: Marcus Sorensen
> Assignee: edison su
> Priority: Critical
> Fix For: 4.4.0
>
>
> Edison, Mike, or myself can probably fix this. Mgmt server hardcodes storage
> types that can overprovision. Need to fix this.
> Edison suggests:
> We can move it to storage driver's capabilities method.
> Each storage driver can report its capabilities in DataStoreDriver->
> getCapabilities(), which returns a map[String, String], we can change the
> signature to map[String, Object]
> In CloudStackPrimaryDataStoreDriverImpl(the default storage driver)->
> getCapabilities, which can return something like:
> Var comparator = new storageOverProvision() {
> Public Boolean isOverProvisionSupported(DataStore store) {
> Var storagepool = (PrimaryDataStoreInfo)store;
> If (store.getPoolType() == NFS or VMFS) {
> Return true;
> }
> };
> };
> Var caps = new HashMap[String, Object]();
> Caps.put("storageOverProvision", comparator);
> Return caps;
> }
> Whenever, other places in mgt server want to check the capabilities of
> overprovision, we can do the following:
> Var primaryStore = DataStoreManager. getPrimaryDataStore(primaryStoreId);
> var caps = primaryStore. getDriver().getCapabilities();
> var overprovision = caps.get("storageOverProvision");
> var result = overprovision. isOverProvisionSupported(primaryStore);
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)