From issues-return-89568-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Thu Feb 1 15:55:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 83B86180652 for ; Thu, 1 Feb 2018 15:55:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 73D44160C56; Thu, 1 Feb 2018 14:55:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C4FFC160C26 for ; Thu, 1 Feb 2018 15:55:03 +0100 (CET) Received: (qmail 77634 invoked by uid 500); 1 Feb 2018 14:55:02 -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 77625 invoked by uid 500); 1 Feb 2018 14:55:02 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 77622 invoked by uid 99); 1 Feb 2018 14:55:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Feb 2018 14:55:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 42D00C0558 for ; Thu, 1 Feb 2018 14:55:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dpsOjspTwpqP for ; Thu, 1 Feb 2018 14:55:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0A75D5F473 for ; Thu, 1 Feb 2018 14:55:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 86B4CE0254 for ; Thu, 1 Feb 2018 14:55:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4115521E85 for ; Thu, 1 Feb 2018 14:55:00 +0000 (UTC) Date: Thu, 1 Feb 2018 14:55:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9338) updateResourceCount not accounting resources of VMs with custom service offering 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-9338?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16348683#comment-16348683 ]=20 ASF GitHub Bot commented on CLOUDSTACK-9338: -------------------------------------------- DaanHoogland commented on issue #2443: [CLOUDSTACK-9338] ACS is not accoun= ting resources of VMs with custom service offering properly URL: https://github.com/apache/cloudstack/pull/2443#issuecomment-362289819 =20 =20 @rafaelweingartner your code looks good at first sight. Are you writing = automation tests for this? I think the PR merrits it ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > updateResourceCount not accounting resources of VMs with custom service o= ffering > -------------------------------------------------------------------------= ------- > > Key: CLOUDSTACK-9338 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-933= 8 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: API, Cloudmonkey, UI > Affects Versions: 4.5.2, 4.8.0 > Environment: CloudStack 4.5.1 > MariaDB 10.0 and 10.1 > Reporter: Francois Scheurer > Assignee: Rafael Weing=C3=A4rtner > Priority: Major > > listAccount on a domain returns 0 for cputotal and memorytotal if the dom= ain accounts own VMs using a ComputeOffering with custom=3Denabled. > Basically, looking into the vm_instance table you get the service_offerin= g_id and in the service_offering table you find normally the amount of CPU/= RAM allocated for the VM. > But if your VM's ComputeOffering has custom=3Denabled, then you need to g= et the specific CPU/RAM values from the user_vm_details table: > mysql> select * from user_vm_details WHERE vm_id=3D957; > Apparently the listAccount code is not doing that and it just returns zer= o, because the service_offering table has cpu=3D0 and ram_size=3D0 for Comp= uteOfferings with custom=3Denabled. > solution: the SQL query of listAccount should also look in the user_vm_de= tails table for matching rows. (instead of just querying in the service_off= ering table) -- This message was sent by Atlassian JIRA (v7.6.3#76005)