[ https://issues.apache.org/jira/browse/CLOUDSTACK-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alena Prokharchyk reassigned CLOUDSTACK-198: -------------------------------------------- Assignee: Kishan Kavala (was: Alena Prokharchyk) Kishan, it's a regression bug introduced by your commit: 606779b300f2cab3aab99363aa4d9bbd735f648f Consider the following scenario: * Add 2 vpn users; they got applied on the backend * Add third user. We re-send the entire stack of vpn users to the backend (if the users state was Active, it's changed to Add beforehand. If they failed to apply, we should never ever remove the rules from the DB. But that's what happens after your checkin - all 3 vpn users are being removed. And now you have to recreate all of them instead of only one. We should leave all the existing rules in Add state if they failed to apply. You can remove just the rule that you were trying to add with addVpnUser command. UI code should be changed though - it should always display the rules in Add state. We just have to display it to user differently - say, you can show Add as "Inactive" and Active as "Active". it will tell the user if something went wrong with applying the rules on the backend. And it can be fixed by networkRestart/routerRestart/adding new rule, etc as on all these operations we try to reapply the vpn users. > vpn:failto add VPN Users deletes all the existing Vpn user > ---------------------------------------------------------- > > Key: CLOUDSTACK-198 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-198 > Project: CloudStack > Issue Type: Bug > Components: Network Controller > Affects Versions: pre-4.0.0 > Reporter: sadhu suresh > Assignee: Kishan Kavala > Priority: Critical > Attachments: management-server.rar > > > Steps: > *********** > 1.deploy the advance zone with hypervisor as xen > 2.create an account > 3.deployvm > 4.enable vpn on sourNat Ip > 5.create Vpn users > 6.stop the router > 7.try to add VPN users when router is in stopped state > actual results: > ************ > AddVPN user failed because router is stopped state and at same time it > deletes all the existing vpn-users > After doing step5: > mysql> select * from vpn_users; > +----+--------------------------------------+----------+-----------+----------+----------------------------------+--------+ > | id | uuid | owner_id | domain_id | username > | password | state | > +----+--------------------------------------+----------+-----------+----------+----------------------------------+--------+ > | 2 | f1da3e04-46d5-45fa-9559-60e5b18b0aa1 | 2 | 1 | baby > | RXLxcW3THxLgSr4Go0vmbw== | Active | > | 4 | 2ba2b4a6-6bea-4ba4-a563-62aa70079de5 | 2 | 1 | bbb > | awMqD1GshW9TyHL4nOah2Q== | Active | > | 5 | 56be8320-a691-4076-bf27-067a97499cbb | 2 | 1 | ccc > | w+pjT7ECcenr0bdQNU8jHQ== | Active | > | 6 | 96d18f7a-2a02-42f2-b97b-87e6d57462d5 | 2 | 1 | vvv > | /POkwYhduO9HG2oXrb41WQ== | Active | > | 7 | 3b618fda-a4c5-4aca-8e9e-230d15ecdfc9 | 2 | 1 | mmm > | rROFGjq9dIu6je1Xs/ZwxA== | Active | > | 8 | 08d62111-9391-4e33-be92-dd3d90a4464b | 2 | 1 | lll > | j3Gl7dAKCW/BYY9lAYFWYA== | Active | > | 9 | cf72b697-dee7-4176-88d1-028fd8a135a0 | 2 | 1 | kkk > | HAh1zND5p6lZlgA2Qp73JQ== | Active | > | 10 | 6c563eb8-eacb-4c09-9a54-5288e3590152 | 2 | 1 | hhh > | eHRo0vybs/sdzai9dzbKlw== | Active | > | 13 | 24c9add6-bd0c-451c-8233-9f91439f53c0 | 6 | 1 | vvv > | qVan9OdiixBZCP4NQTcz3WJCyTucvaWL | Active | > | 14 | 633bcf15-3a69-4337-8652-e77cbe71ea8f | 6 | 1 | user1 > | Xbf7exMn0ZIFD26/c4UQn3lHljtjTrdn | Active | > +----+--------------------------------------+----------+-----------+----------+----------------------------------+--------+ > 10 rows in set (0.00 sec) > After doing Step7: > mysql> select * from vpn_users; > +----+--------------------------------------+----------+-----------+----------+--------------------------+--------+ > | id | uuid | owner_id | domain_id | username > | password | state | > +----+--------------------------------------+----------+-----------+----------+--------------------------+--------+ > | 2 | f1da3e04-46d5-45fa-9559-60e5b18b0aa1 | 2 | 1 | baby > | RXLxcW3THxLgSr4Go0vmbw== | Active | > | 4 | 2ba2b4a6-6bea-4ba4-a563-62aa70079de5 | 2 | 1 | bbb > | awMqD1GshW9TyHL4nOah2Q== | Active | > | 5 | 56be8320-a691-4076-bf27-067a97499cbb | 2 | 1 | ccc > | w+pjT7ECcenr0bdQNU8jHQ== | Active | > | 6 | 96d18f7a-2a02-42f2-b97b-87e6d57462d5 | 2 | 1 | vvv > | /POkwYhduO9HG2oXrb41WQ== | Active | > | 7 | 3b618fda-a4c5-4aca-8e9e-230d15ecdfc9 | 2 | 1 | mmm > | rROFGjq9dIu6je1Xs/ZwxA== | Active | > | 8 | 08d62111-9391-4e33-be92-dd3d90a4464b | 2 | 1 | lll > | j3Gl7dAKCW/BYY9lAYFWYA== | Active | > | 9 | cf72b697-dee7-4176-88d1-028fd8a135a0 | 2 | 1 | kkk > | HAh1zND5p6lZlgA2Qp73JQ== | Active | > | 10 | 6c563eb8-eacb-4c09-9a54-5288e3590152 | 2 | 1 | hhh > | eHRo0vybs/sdzai9dzbKlw== | Active | > -------------------------+--------+ > 8 rows in set (0.00 sec) > Expected result: > ********************* > It should not delete the existing vpn_users when add vpn_user operation > failed. > Git Revision: 2a5e5b2e62a9f35d674f016e02abc1da77b95745 > Git URL: https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git -- 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