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 9F9A0C8C0 for ; Fri, 28 Nov 2014 18:08:13 +0000 (UTC) Received: (qmail 96059 invoked by uid 500); 28 Nov 2014 18:08:13 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 96022 invoked by uid 500); 28 Nov 2014 18:08: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 96012 invoked by uid 500); 28 Nov 2014 18:08:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 96009 invoked by uid 99); 28 Nov 2014 18:08:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 18:08:13 +0000 Date: Fri, 28 Nov 2014 18:08:13 +0000 (UTC) From: "ASF GitHub Bot (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=14228448#comment-14228448 ] ASF GitHub Bot commented on CLOUDSTACK-7908: -------------------------------------------- GitHub user bhaisaab opened a pull request: https://github.com/apache/cloudstack/pull/48 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 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/cloudstack useraccount-refactoring Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/48.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #48 ---- commit 1e25886bd229a3b7b7aecafe2dc7eaeede47982e Author: Rohit Yadav Date: 2014-11-28T11:37:02Z 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)