Bug 1490092 - OVN network subnet without DNS or gateway unexpected behaviour
Summary: OVN network subnet without DNS or gateway unexpected behaviour
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: 1.0.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Marcin Mirecki
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-10 06:29 UTC by Mor
Modified: 2017-12-20 11:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-12-20 11:07:09 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
engine and ovirt-provider-ovn logs (1.26 MB, application/x-gzip)
2017-09-10 06:29 UTC, Mor
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 81686 0 master POST Fix adding subnet without DNS 2017-09-13 09:01:30 UTC

Description Mor 2017-09-10 06:29:58 UTC
Created attachment 1324244 [details]
engine and ovirt-provider-ovn logs

Description of problem:
When creating OVN subnet without specifying a DNS server or gateway, OVN throws a generic error in the UI: "Error while executing action Add Subnet to Provider: Failed to communicate with the external provider, see log for additional details.", and the provider doesn't handle the case, and throws an exception:
Traceback (most recent call last):
  File "/usr/share/ovirt-provider-ovn/handlers/base_handler.py", line 111, in _handle_request
    method, key, id, content)
  File "/usr/share/ovirt-provider-ovn/handlers/selecting_handler.py", line 53, in handle_request
    self._get_response_handler(method, key), content, id
  File "/usr/share/ovirt-provider-ovn/handlers/neutron.py", line 36, in call_response_handler
    return response_handler(ovn_north, content, id)
  File "/usr/share/ovirt-provider-ovn/handlers/neutron_responses.py", line 143, in post_subnets
    subnet = nb_db.add_subnet(received_subnet)
  File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 58, in wrapper
    else f(wrapped_self, rest_data))
  File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 41, in wrapper
    return cls.rest2row(wrapped_self, f, rest_data, entity_id)
  File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north_mappers.py", line 272, in rest2row
    if SubnetMapper.REST_SUBNET_DNS_NAMESERVERS in rest_data
IndexError: list index out of range


Version-Release number of selected component (if applicable):
ovirt-provider-ovn-1.1-2.20170905145914.gitaf4fe87.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create OVN network with subnet, specify CIDR, and don't specify gateway or DNS server.

Actual results:
UI throws error, ovirt-provider-ovn throws exception.

Expected results:
UI should display a guided message to the user, for example, "DNS / gateway is required in order to create a subnet". ovirt-provider-ovn should handle this and log similar message.

Comment 1 Mor 2017-09-25 11:13:56 UTC
Verified on:
4.2.0-0.0.master.20170924221426.git196b802.el7.centos

Comment 2 Sandro Bonazzola 2017-12-20 11:07:09 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.