You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Chandan Purushothama (JIRA)" <ji...@apache.org> on 2013/07/30 20:27:50 UTC

[jira] [Reopened] (CLOUDSTACK-1673) AWS Regions - Events - User disable / Domain Delete event does not include the UUID of the user/domain that was disabled.

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chandan Purushothama reopened CLOUDSTACK-1673:
----------------------------------------------


Reopening to the bug to check with Murali whether the observation made is expected

I observe that the 'entity' and 'entityuuid' are provided only during the "Completed" Status of the Event. Other Status of the event currently do not contain the entity and entityuuid in the payloads as shown below.

Payload Information seen on RabbitMQServer:

I logged in as the default admin User on ROOT domain and disabled a regular user "atoms" of "atoms" account in the same domain.

{"status":"Scheduled","event":"USER.DISABLE","account":"0a480c2c-b202-4ed3-8a1a-fd17b07cb60d","user":"bbe68804-f49d-11e2-b57a-06cba2000705"}
{"status":"Started","event":"USER.DISABLE","account":"0a480c2c-b202-4ed3-8a1a-fd17b07cb60d","user":"bbe68804-f49d-11e2-b57a-06cba2000705"}
{"status":"Completed","event":"USER.DISABLE","entityuuid":"1538b9c3-fba2-41ca-9fe5-02bb2c70118a","entity":"com.cloud.user.User","account":"0a480c2c-b202-4ed3-8a1a-fd17b07cb60d","user":"bbe68804-f49d-11e2-b57a-06cba2000705"}

mysql> select id,uuid,account_name from account;
+----+--------------------------------------+--------------+
| id | uuid                                 | account_name |
+----+--------------------------------------+--------------+
|  1 | bbe3cc40-f49d-11e2-b57a-06cba2000705 | system       |
|  2 | bbe61f54-f49d-11e2-b57a-06cba2000705 | admin        |
|  3 | 0a480c2c-b202-4ed3-8a1a-fd17b07cb60d | atoms        |
|  4 | f1c3fbab-e05b-40ca-ba5a-ce2dbec5108d | protons      |
|  5 | 5e123110-7e27-4981-b3bb-65c3e868157c | protons      |
+----+--------------------------------------+--------------+
5 rows in set (0.00 sec)

mysql> select id,uuid,username,account_id,state from user;
+----+--------------------------------------+----------+------------+----------+
| id | uuid                                 | username | account_id | state    |
+----+--------------------------------------+----------+------------+----------+
|  1 | bbe5b2e4-f49d-11e2-b57a-06cba2000705 | system   |          1 | enabled  |
|  2 | bbe68804-f49d-11e2-b57a-06cba2000705 | admin    |          2 | enabled  |
|  3 | 1538b9c3-fba2-41ca-9fe5-02bb2c70118a | atoms    |          3 | disabled |
|  4 | 80f03ff1-ba3e-4d33-a9f9-5599ad60b8dc | protons  |          4 | enabled  |
|  5 | 57b3d8a5-d5cb-4e9d-ae9f-22f6b8263b22 | protons  |          5 | enabled  |
+----+--------------------------------------+----------+------------+----------+
5 rows in set (0.00 sec)

The first two payloads do not have the entity information. The user information in the two payloads referred to the default admin account in which i logged in before i executed the disable user action on another account. Should we not have the entity information in all the payloads of the event?

I observed the same behavior with domain delete event too.
                
> AWS Regions - Events - User disable / Domain Delete event does not include the UUID of the user/domain that was disabled.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-1673
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1673
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.1.0, 4.2.0
>         Environment: Latest build from 4.1
>            Reporter: Sangeetha Hariharan
>            Assignee: Murali Reddy
>            Priority: Critical
>             Fix For: 4.2.0
>
>
> AWS Regions - Events - User disable / Domain Delete event does not include the UUID of the user/domain that was disabled
> Scenario 1:
> Pre Req:
> 1. Configure Management server to point to RabbitMQ server for event notifications.
> Steps:
> 1. Disable one of  the existing users.
> Following is the payload of the event that gets published: 
> {"status":"Scheduled","event":"USER.DISABLE","account":"1be7e5f7-7a3f-467c-b30d-4d6f834254d9","user":"3ff1190e-5aa3-4551-9cb3-a97db0bd0d51"}
> UUID of the user that was disabled is NOT included in the payload. The user that is present in the payload is the admin user i was logged in as when I performed the disable action. Account that is passed is the account that the user that is disabled belongs to.
> mysql> select * from user where uuid="3ff1190e-5aa3-4551-9cb3-a97db0bd0d51";
> +----+--------------------------------------+----------+----------------------------------+------------+-----------+----------+------------------+---------+---------+------------+---------------------+---------+---------------------+--------------------+---------------+--------------------------+-----------+
> | id | uuid                                 | username | password                         | account_id | firstname | lastname | email            | state   | api_key | secret_key | created             | removed | timezone            | registration_token | is_registered | incorrect_login_attempts | region_id |
> +----+--------------------------------------+----------+----------------------------------+------------+-----------+----------+------------------+---------+---------+------------+---------------------+---------+---------------------+--------------------+---------------+--------------------------+-----------+
> | 18 | 3ff1190e-5aa3-4551-9cb3-a97db0bd0d51 | san-adm1 | a072a11d146e3ff670cb4e43af5cdcc7 |         10 | san-adm1  | san-adm1 | san-adm1@abc.com | enabled | NULL    | NULL       | 2013-03-13 22:58:24 | NULL    | America/Los_Angeles | NULL               |             0 |                        0 |         1 |
> +----+--------------------------------------+----------+----------------------------------+------------+-----------+----------+------------------+---------+---------+------------+---------------------+---------+---------------------+--------------------+---------------+--------------------------+-----------+
> 1 row in set (0.00 sec)
> mysql> select * from user where uuid="c6ca317e-386e-43eb-8892-a702807e1935";
> +----+--------------------------------------+------------+----------------------------------+------------+----------------+----------------+--------------------+----------+---------+------------+---------------------+---------+---------------------+--------------------+---------------+--------------------------+-----------+
> | id | uuid                                 | username   | password                         | account_id | firstname      | lastname       | email              | state    | api_key | secret_key | created             | removed | timezone            | registration_token | is_registered | incorrect_login_attempts | region_id |
> +----+--------------------------------------+------------+----------------------------------+------------+----------------+----------------+--------------------+----------+---------+------------+---------------------+---------+---------------------+--------------------+---------------+--------------------------+-----------+
> |  4 | c6ca317e-386e-43eb-8892-a702807e1935 | san-test11 | 53d9012c4b85f29b8ff5c5c3606e9d62 |          4 | san-test113456 | san-test113456 | san-test11@abc.com | disabled | NULL    | NULL       | 2013-03-06 19:35:54 | NULL    | America/Los_Angeles | NULL               |             0 |                        0 |         1 |
> +----+--------------------------------------+------------+----------------------------------+------------+----------------+----------------+--------------------+----------+---------+------------+---------------------+---------+---------------------+--------------------+---------------+--------------------------+-----------+
> 1 row in set (0.00 sec)
> mysql>
> Scenario 2:
> AWS Regions - Events - Domain Delete event does not include the UUID of the domain that was deleted.
> Pre Req:
> 1. Configure Management server to point to RabbitMQ server for event notifications.
> Steps:
> 1. Delete an existing domain.
> Following is the payload of the event that gets prublished:
> {"status":"Scheduled","event":"DOMAIN.DELETE","account":"875cc6a8-8688-11e2-89d9-06d4460004b1","user":"875d71d4-8688-11e2-89d9-06d4460004b1"}
> This event does not include the uuid of the domain that was deleted.
> event DB for this activity:
> | 65 | d873a6a4-e107-4033-96ed-af1d753c044f | DOMAIN.DELETE | Scheduled | deleting domain: 5 | 2 | 2 | 1 | 2013-03-13 18:54:05 | INFO | 0 | NULL |
> +----+--------------------------------------+---------------------------+-----------+---------------------------------------------------+---------+------------+-----------+---------------------+-------+----------+------------+

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira