Bug 1529104
| Summary: | [UI] Generic error in adding duplicate subnet should be changed to specific error | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Mor <mkalfon> | ||||
| Component: | Providers | Assignee: | Alona Kaplan <alkaplan> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Mor <mkalfon> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 5.9.0 | CC: | cpelland, danken, gblomqui, jfrey, jhardy, obarenbo | ||||
| Target Milestone: | GA | ||||||
| Target Release: | 5.9.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-01-07 14:34:31 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | RHEVM | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Once bug #1529108 would be fixed, there would be no possibility to add the same subnet twice to the same interface via the ui. *** This bug has been marked as a duplicate of bug 1529108 *** |
Created attachment 1372417 [details] logs Description of problem: When trying to add a router interface with subnet that is already attached to that router, CFME UI throws a generic error message: "Unable to add Subnet "test_router": undefined method `[]' for nil:NilClass". Version-Release number of selected component (if applicable): CFME 5.9.0.12.20171205180333_3e32b3d ovirt-provider-ovn-1.2.2-1.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. Create cloud router. 2. Create cloud subnet. 3. Add router interface with subnet from step 2. 4. Redo step 3. Actual results: UI Exception: "Unable to add Subnet "test_router": undefined method `[]' for nil:NilClass" Expected results: UI Error should be something like "Subnet: <NAME> is already connected to this router" Additional info: ovirt-provider-ovn.log: 2017-12-26 12:04:14,460 Can not add subnet 8cf8ae96-5bc8-4e91-8336-8de1f6708d0e to router 8c1d2ba2-9aff-40ca-a5e2-e74e27de4f71. Subnet is already connected to this router Traceback (most recent call last): File "/usr/share/ovirt-provider-ovn/handlers/base_handler.py", line 126, in _handle_request method, path_parts, content) File "/usr/share/ovirt-provider-ovn/handlers/selecting_handler.py", line 176, in handle_request return self.call_response_handler(handler, content, parameters) File "/usr/share/ovirt-provider-ovn/handlers/neutron.py", line 36, in call_response_handler return response_handler(ovn_north, content, parameters) File "/usr/share/ovirt-provider-ovn/handlers/neutron_responses.py", line 230, in put_add_router_inerface get_entity(content), parameters[ROUTER_ID] File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 58, in wrapper return (f(wrapped_self, rest_data, entity_id) if entity_id File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 42, in wrapper return cls.rest2row(wrapped_self, f, rest_data, entity_id) File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 493, in rest2row wrapped_self, router_id=router_id, subnet_id=subnet, port_id=port File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 66, in wrapper data = f(wrapped_self, *args, **kwargs) File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north.py", line 814, in add_router_interface if subnet_id else File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north.py", line 769, in _create_routing_lsp_by_subnet subnet_id, subnet, router_id, network_id) File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north.py", line 753, in _validate_create_routing_lsp_by_subnet subnet=subnet_id, router=router_id BadRequestError: Can not add subnet 8cf8ae96-5bc8-4e91-8336-8de1f6708d0e to router 8c1d2ba2-9aff-40ca-a5e2-e74e27de4f71. Subnet is already connected to this router