Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 448D8117BA for ; Wed, 30 Apr 2014 16:36:21 +0000 (UTC) Received: (qmail 5308 invoked by uid 500); 30 Apr 2014 16:36:20 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 5093 invoked by uid 500); 30 Apr 2014 16:36:20 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 4953 invoked by uid 500); 30 Apr 2014 16:36:18 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 4848 invoked by uid 99); 30 Apr 2014 16:36:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2014 16:36:16 +0000 Date: Wed, 30 Apr 2014 16:36:16 +0000 (UTC) From: "Marcus Sorensen (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-5806) Storage types other than NFS/VMFS can't overprovision MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985706#comment-13985706 ] Marcus Sorensen commented on CLOUDSTACK-5806: --------------------------------------------- No idea. Edison sent that out and I pasted it into jira to save it. > 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, Future, 4.3.0 > Reporter: Marcus Sorensen > 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.2#6252)