Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B4758200AC6 for ; Fri, 6 May 2016 16:47:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B1BFA1608F8; Fri, 6 May 2016 14:47:14 +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 0F484160A0C for ; Fri, 6 May 2016 16:47:13 +0200 (CEST) Received: (qmail 21325 invoked by uid 500); 6 May 2016 14:47:13 -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 21306 invoked by uid 500); 6 May 2016 14:47:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 21303 invoked by uid 99); 6 May 2016 14:47:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2016 14:47:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E039B2C1F5D for ; Fri, 6 May 2016 14:47:12 +0000 (UTC) Date: Fri, 6 May 2016 14:47:12 +0000 (UTC) From: "Francois Scheurer (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CLOUDSTACK-9338) listAccount returns 0 for cputotal and memorytotal if VMs are using a ComputeOffering with custom=enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 06 May 2016 14:47:14 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francois Scheurer updated CLOUDSTACK-9338: ------------------------------------------ Affects Version/s: 4.8.0 > listAccount returns 0 for cputotal and memorytotal if VMs are using a ComputeOffering with custom=enabled > --------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-9338 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9338 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > 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 > > listAccount on a domain returns 0 for cputotal and memorytotal if the domain accounts own VMs using a ComputeOffering with custom=enabled. > Basically, looking into the vm_instance table you get the service_offering_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=enabled, then you need to get the specific CPU/RAM values from the user_vm_details table: > mysql> select * from user_vm_details WHERE vm_id=957; > Apparently the listAccount code is not doing that and it just returns zero, because the service_offering table has cpu=0 and ram_size=0 for ComputeOfferings with custom=enabled. > solution: the SQL query of listAccount should also look in the user_vm_details table for matching rows. (instead of just querying in the service_offering table) -- This message was sent by Atlassian JIRA (v6.3.4#6332)