[ https://issues.apache.org/jira/browse/CLOUDSTACK-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13730127#comment-13730127 ]
Parth Jagirdar commented on CLOUDSTACK-3307: -------------------------------------------- Using wrong cred does throw an appropriate error on UI and in apilog.log. But db entry is still created. 2013-08-05 15:55:44,840 INFO [cloud.api.ApiServer] (catalina-exec-24:null) (userId=2 accountId=2 sessionId=61464CDDE9548D177B535C14FD7BFF7C) 10.217.252.127 -- POST command=addUcsManager&response=json&sessionkey=MwBqDbF%2BPUbEN4jLMHF4%2ByE7uDk%3D 530 duplicate UCS manager. url[10.223.184.2] is used by another UCS manager already 2013-08-05 15:56:20,640 INFO [cloud.api.ApiServer] (catalina-exec-15:null) (userId=2 accountId=2 sessionId=61464CDDE9548D177B535C14FD7BFF7C) 10.217.252.127 -- POST command=addUcsManager&response=json&sessionkey=MwBqDbF%2BPUbEN4jLMHF4%2ByE7uDk%3D 530 Cannot get cookie mysql> select * from ucs_manager; +----+--------------------------------------+---------+-----------+---------------+----------+----------------------------------+ | id | uuid | zone_id | name | url | username | password | +----+--------------------------------------+---------+-----------+---------------+----------+----------------------------------+ | 1 | c3142e46-ccb4-4551-a424-119312255b1d | 1 | UCS1 | 10.223.184.2 | admin | h87V6nZlQuI0sTNbWPiii382WTY2w6Qw | | 2 | 6c699a9b-f0be-403e-ac8f-028c29177b57 | 1 | UCS Wrong | 10.223.184.22 | wrong | K+6cK+tdIXZn0vH35mHCAA== | +----+--------------------------------------+---------+-----------+---------------+----------+----------------------------------+ 2 rows in set (0.00 sec) > UCS:DB: Same UCS manager can be added multiple times > ---------------------------------------------------- > > Key: CLOUDSTACK-3307 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3307 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: UCS > Affects Versions: 4.2.0 > Environment: Master with UCS and Basic Baremetal > Reporter: Parth Jagirdar > Assignee: frank zhang > Priority: Critical > Fix For: 4.2.0 > > Attachments: ucs_wrong_cred.jpg > > > Same UCS manager can be added multiple times to a Zone with multiple > redundant entries in database. > Observe below table; Upon adding a UCS manager with incorrect credentials; > API error out with cannot get the cookie; however it still adds an entry into > the database. > mysql> select * from ucs_manager; > +----+--------------------------------------+---------+------------+--------------+----------+----------------+ > | id | uuid | zone_id | name | url > | username | password | > +----+--------------------------------------+---------+------------+--------------+----------+----------------+ > | 1 | ec179fa5-a38c-4df0-a688-b89c29764b1d | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 2 | c14c6917-274b-47f1-b2f8-e7af767fe5c6 | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 3 | 10e7ef23-f9b9-49f4-aac5-8508eb882a52 | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 4 | be42a44f-4ae6-41ba-9e13-76a7707dcf5e | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 5 | b464511b-e961-4b65-9c9c-9cf5974f5cd1 | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 6 | dd669374-27f8-49d3-9425-498af6bbc16e | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 7 | 7e902e15-e634-41a9-9bed-d6134bb7a377 | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 8 | 1d6775c8-270a-461c-9b28-7b1b2acbbd5e | 2 | ucsmanager | > 10.223.184.2 | aa | C1tr1x99 | > | 9 | 4da9accc-eb7c-42fb-a23c-3c45716db1f5 | 2 | ucsmanager | > 10.223.184.2 | admin | C1tr1x99 | > | 10 | 55023c65-4470-4ee7-b264-f19cd4065c75 | 2 | ucsmanager | > 10.223.184.2 | admin | wrong-password | > +----+--------------------------------------+---------+------------+--------------+----------+----------------+ > 10 rows in set (0.00 sec) -- 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