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 4A7F31011E for ; Sat, 29 Nov 2014 15:40:13 +0000 (UTC) Received: (qmail 88599 invoked by uid 500); 29 Nov 2014 15:40:13 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 88570 invoked by uid 500); 29 Nov 2014 15:40: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 88560 invoked by uid 500); 29 Nov 2014 15:40:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 88557 invoked by uid 99); 29 Nov 2014 15:40:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Nov 2014 15:40:13 +0000 Date: Sat, 29 Nov 2014 15:40:13 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-7908) Addition of userid field to vm_instance table to identify user that created the VM 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-7908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14228794#comment-14228794 ] ASF subversion and git services commented on CLOUDSTACK-7908: ------------------------------------------------------------- Commit ef185bcf44948134ed0ed994dd744f655934b17a in cloudstack's branch refs/heads/useraccount-refactoring from [~rohit.yadav@shapeblue.com] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=ef185bc ] CLOUDSTACK-7908: Add user_id column to vm_instance table - Adds column to VMInstance DAO - Adds column in vm_instance table - Adds column in the UserVMJoinVO - Adds default admin user which has UID = 2 - Adds migration path that sets user_id to first user of the accountId that owns the vm in vm_instance table - Add arg on list VMs API to query by userId, add support in query layer - Refactor VMInstanceVO and child classes to accept userId - Add code to let service layer pass userId if loggedIn user belongs to same account as the owner executing an API call or use first user from owner account - In case of CPVM and SSVM use system user ID - Fix unit tests and spring injections Signed-off-by: Rohit Yadav > Addition of userid field to vm_instance table to identify user that created the VM > ---------------------------------------------------------------------------------- > > Key: CLOUDSTACK-7908 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7908 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the default.) > Affects Versions: 4.3.0 > Environment: 4.3.0 > Reporter: David Williams > Assignee: Rohit Yadav > Priority: Minor > Fix For: 4.5.0, 4.6.0 > > > It would be handy/helpful if the userid of the user that created a VM was recorded in the database in the vm_instance table. Currently, the only way I know of to find the user that deployed a VM is by checking the logs. There's an owner field in the vm_instance table but this seems to be the account ID of the account the user belongs to. > By being able to find the user that deployed a VM, it makes VM cleanups much easier since you know who to contact for each VM to check if it can be deleted. A similar thing in the other tables for the other resources would be useful too when trying to cleanup networks and volumes, etc. Also, if this change went ahead, then the API and GUI could be changed also to show the user details for the VM when listing the VM's details. -- This message was sent by Atlassian JIRA (v6.3.4#6332)