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 32C9411A1A for ; Thu, 28 Aug 2014 11:27:58 +0000 (UTC) Received: (qmail 22847 invoked by uid 500); 28 Aug 2014 11:27:57 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 22817 invoked by uid 500); 28 Aug 2014 11:27:57 -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 22808 invoked by uid 500); 28 Aug 2014 11:27:57 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 22800 invoked by uid 99); 28 Aug 2014 11:27:57 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2014 11:27:57 +0000 Date: Thu, 28 Aug 2014 11:27:57 +0000 (UTC) From: "Damodar Reddy T (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-7153) addNicToVirtualMachine not BaseAsyncCreate but creates an entity 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-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113673#comment-14113673 ] Damodar Reddy T commented on CLOUDSTACK-7153: --------------------------------------------- Problem: ----------------------------------- When event bus is enabled and while adding a nic to a VM, This creates an entity into nic but will not put the created entity's uuid into the event bus message. Root Cause Analysis: ----------------------------------- In UserVmManager.addNicToVirtualMachine which is called by addNicToVmCmd was not putting the created entity's uuid into the CallContext so the Event NIC Complete was not able to get the id during event complete call so was not putting the same into event bus message. Solution proposed: ------------------------------------ Put the created entity's uuid into CallContext before returning from UserVmManager.addNicToVirtualMachine call QA Notes: ----------------------------------- Make sure the entity's uuid is coming in event bus message during event complete call. > addNicToVirtualMachine not BaseAsyncCreate but creates an entity > ---------------------------------------------------------------- > > Key: CLOUDSTACK-7153 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7153 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Management Server > Affects Versions: 4.4.0 > Reporter: Damodar Reddy T > Assignee: Damodar Reddy T > Fix For: 4.5.0 > > > addNicToVirtualMachine not BaseAsyncCreate but creates an entity. > We need them to be BaseAsyncCreate so that Eventbus while publishing the completed events can put in the entity id. Right now there is a generic logic where after create function when the id is created its pushed into the context so that Eventbus can use it to publish the created UUID. If its not baseAsyncCreate you will have to go into each api and put the id in the context. > Currently following is the generic code had put in ApiServer.java. We will have to do specifically into your api. Do this only if there is a hard reason not to make it baseasyncCreate > Class entityClass = EventTypes.getEntityClassForEvent(createCmd.getEventType()); > if (entityClass != null) > ctx.putContextParameter(entityClass.getName(), objectId); -- This message was sent by Atlassian JIRA (v6.2#6252)