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 9BA12113BE for ; Thu, 15 May 2014 02:22:42 +0000 (UTC) Received: (qmail 6892 invoked by uid 500); 10 May 2014 22:05:26 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 6198 invoked by uid 500); 10 May 2014 22:05:23 -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 5435 invoked by uid 500); 10 May 2014 22:05:20 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 4190 invoked by uid 99); 10 May 2014 22:05:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 May 2014 22:05:15 +0000 Date: Sat, 10 May 2014 22:05:15 +0000 (UTC) From: "Koushik Das (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CLOUDSTACK-6579) used_bytes column of storage_pool table is no longer used and should be removed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-6579?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Koushik Das resolved CLOUDSTACK-6579. ------------------------------------- Resolution: Fixed > used_bytes column of storage_pool table is no longer used and should be r= emoved > -------------------------------------------------------------------------= ------ > > Key: CLOUDSTACK-6579 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-657= 9 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Management Server > Affects Versions: 4.4.0 > Reporter: Mike Tutkowski > Assignee: Koushik Das > Fix For: 4.5.0 > > > From an e-mail discussion on the mailing list: > Ideally, we should deprecate the column since its not used and causes > confusion. > Setting to this value wouldn't help because this column is never updated > regularly. > On 05/05/14 10:28 AM, "Mike Tutkowski" > wrote: > >How's about I just check this code into master? > > > >poolVO.setUsedBytes(mspAnswer.getPoolInfo().getCapacityBytes() - > >mspAnswer.getPoolInfo().getAvailableBytes()); > > > >It is patterned off of the PrimaryDataStoreHelper.attachHost logic, whic= h > >looks like this: > > > >pool.setUsedBytes(existingInfo.getCapacityBytes() - > >existingInfo.getAvailableBytes()); > > > > > >On Mon, May 5, 2014 at 10:21 AM, Nitin Mehta > >wrote: > > > >> This column is not used for calculating capacity for pool. > >> We have always used op host capacity table. Nevertheless please do fil= e > >>a > >> bug > >> > >> Thanks, > >> -Nitin > >> ________________________________________ > >> From: Mike Tutkowski [mike.tutkowski@solidfire.com] > >> Sent: Monday, May 05, 2014 9:12 PM > >> To: dev@cloudstack.apache.org > >> Subject: Re: How is this working? > >> > >> My storage plug-in actually uses a custom host listener, so I have not > >> encountered this issue. > >> > >> I don't remember off hand if it was in 4.2 or 4.3, but at some point > >> someone changed the storage_pool table's available_bytes column to be > >> used_bytes. > >> > >> It looks like this code you reference was missed. > >> > >> > >> On Mon, May 5, 2014 at 4:35 AM, Koushik Das > >> wrote: > >> > >> > I came across this code snippet in hostConnect() method in > >> > DefaultHostListener.java. Look at the line where the used bytes is > >>set on > >> > the poolVO. This looks like a serious bug. Looking at the history th= is > >> code > >> > has been there since a year. Has anyone encountered any issues with > >> primary > >> > storage capacity? > >> > > >> > ModifyStoragePoolAnswer mspAnswer =3D (ModifyStoragePoolAnswer)answe= r; > >> > =C5=A0.. > >> > StoragePoolVO poolVO =3D this.primaryStoreDao.findById(poolId); > >> > poolVO.setUsedBytes(mspAnswer.getPoolInfo().getAvailableBytes()); > >> > poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes()); > >> > primaryStoreDao.update(pool.getId(), poolVO); > >> > > >> > > >> > -Koushik -- This message was sent by Atlassian JIRA (v6.2#6252)