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 E16DE17405 for ; Fri, 18 Sep 2015 09:40:04 +0000 (UTC) Received: (qmail 44341 invoked by uid 500); 18 Sep 2015 09:40:04 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 44306 invoked by uid 500); 18 Sep 2015 09:40:04 -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 44291 invoked by uid 500); 18 Sep 2015 09:40:04 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 44288 invoked by uid 99); 18 Sep 2015 09:40:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2015 09:40:04 +0000 Date: Fri, 18 Sep 2015 09:40:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-8816) rabbitMQ: generated events have wrong or missing uuids 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-8816?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D14805302#comment-14805302 ]=20 ASF GitHub Bot commented on CLOUDSTACK-8816: -------------------------------------------- GitHub user karuturi opened a pull request: https://github.com/apache/cloudstack/pull/849 Cloudstack-8816 some of the events do not have resource uuids The key objects in the context map are sometimes String and sometimes o= bject. This causes missing uuids when an entity put in the context map with= key entity.toString is queried with key entity =20 Testing: manually tested by deploying a vm and checked that the created events i= n rabbitmq now has uuids. events before and after the change are update at https://issues.apache.= org/jira/browse/CLOUDSTACK-8816?focusedCommentId=3D14805239 =20 unittests ``` $ mvn -pl :cloud-api test -Dtest=3DCallContextTest ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.apache.cloudstack.context.CallContextTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.152 s= ec - in org.apache.cloudstack.context.CallContextTest =20 Results : =20 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 =20 [INFO] ----------------------------------------------------------------= -------- [INFO] BUILD SUCCESS [INFO] ----------------------------------------------------------------= -------- [INFO] Total time: 11.445 s [INFO] Finished at: 2015-09-18T14:58:53+05:30 [INFO] Final Memory: 55M/448M [INFO] ----------------------------------------------------------------= -------- ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8816-take2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/849.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 #849 =20 ---- commit fbdcd04a1950b2374a25993aef324fe52527909c Author: Rajani Karuturi Date: 2015-09-18T09:23:11Z CLOUDSTACK-8816: some of the events do not have resource uuids =20 the key for an entity is sometimes an object a String with value object.toString() due to serialization and deserialization of them. Addressed this in the getter of CallContext to check for key.toString if an object is not found with key. commit 2b6a0b363c0518f9571dd1ff092784f3fde92a95 Author: Rajani Karuturi Date: 2015-09-18T09:26:02Z CLOUDSTACK-8816: some of the events do not have resource uuids =20 uuid is missing in the first event of VM create as the entity is just created and never put in the Context. Added the entity uuid to context on successful creation. ---- > rabbitMQ: generated events have wrong or missing uuids > ------------------------------------------------------ > > Key: CLOUDSTACK-8816 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-881= 6 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Affects Versions: 4.3.2, 4.4.4, 4.5.2 > Reporter: Rajani Karuturi > Assignee: Rajani Karuturi > Priority: Critical > > For many events, entity uuids are missing. One such example is below. (up= dated in the comments with events before and after the changes) > 1. create an account ppp > 2,create few users under ppp account > 3.delete the "ppp" account > 4.check the rabbit mq for generated events > actual result: > Therecieved event has admin user uuid instead of deleted account uuid > The server reported 0 messages remaining. > Exchange =09cloudstack-events > Routing Key =09management-server.AsyncJobEvent.complete.Account.* > Redelivered =09=E2=97=8F > Properties =09 > priority:=090 > delivery_mode:=092 > content_type:=09text/plain > Payload 885 bytes Encoding: string =09 > {"cmdInfo":"{\"id\":\"d08d73a5-b577-4082-a959-114b433979f1\",\"response\"= :\"json\",\"sessionkey\":\"bYp8fdaTPgTYLtuVlSPxnHj9Iuk\\u003d\",\"ctxDetail= s\":\"{\\\"com.cloud.user.Account\\\":\\\"d08d73a5-b577-4082-a959-114b43397= 9f1\\\"}\",\"cmdEventType\":\"ACCOUNT.DELETE\",\"ctxUserId\":\"2\",\"httpme= thod\":\"GET\",\"_\":\"1416046428981\",\"uuid\":\"d08d73a5-b577-4082-a959-1= 14b433979f1\",\"ctxAccountId\":\"2\",\"ctxStartEventId\":\"271\"}","instanc= eType":"Account","instanceUuid":"","jobId":"0749f13f-517b-4cba-81f2-c9a9d23= 445cd","status":"SUCCEEDED","processStatus":"0","commandEventType":"ACCOUNT= .DELETE","resultCode":"0","command":"org.apache.cloudstack.api.command.admi= n.account.DeleteAccountCmd","jobResult":"org.apache.cloudstack.api.response= .SuccessResponse/null/{\"success\":true}","account":"fcf6dd7e-6983-11e4-bb1= 2-0662940000db","user":"fcf71ae6-6983-11e4-bb12-0662940000db" -- This message was sent by Atlassian JIRA (v6.3.4#6332)