Bug 1513958 - Edit of OVN network name fails and displays unfriendly UI error
Summary: Edit of OVN network name fails and displays unfriendly UI error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.1
: ---
Assignee: Marcin Mirecki
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks: 1411300
TreeView+ depends on / blocked
 
Reported: 2017-11-16 11:31 UTC by Mor
Modified: 2018-02-12 11:47 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-02-12 11:47:39 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
evm and ovirt-provider-ovn logs (1.16 MB, application/octet-stream)
2017-11-16 11:31 UTC, Mor
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 84620 0 master MERGED Accept ".json" suffix as part of request entity id part 2020-02-10 09:47:00 UTC

Description Mor 2017-11-16 11:31:12 UTC
Created attachment 1353432 [details]
evm and ovirt-provider-ovn logs

Description of problem:
Editing name of existing OVN network on CFME console fails with error: 
"Unable to update Cloud Network "test_net_change": undefined method `response' for #<Fog::Network::OpenStack::NotFound:0x0000000d0f5d90> Did you mean? respond_to?"

Version-Release number of selected component (if applicable):
5.9.0.5.20171102023815_209f732

How reproducible:
100%

Steps to Reproduce:
1. Try to edit existing OVN network and change its name value.

Actual results:
UI error.

Expected results:
Should work.

Additional info:

ovirt-provider-ovn.log
----------------------
017-11-08 12:03:32,049   Starting new HTTPS connection (1): network-ge-2.scl.lab.tlv.redhat.com
2017-11-08 12:03:32,091   "POST /ovirt-engine/sso/oauth/token-info HTTP/1.1" 200 322
2017-11-08 12:03:32,185   Network 2527f7fb-0a0f-4d2e-a052-c530358f8eeb.json does not exist
Traceback (most recent call last):
  File "/usr/share/ovirt-provider-ovn/handlers/base_handler.py", line 117, in _handle_request
    method, path_parts, content)
  File "/usr/share/ovirt-provider-ovn/handlers/selecting_handler.py", line 175, 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 154, in put_network
    network = nb_db.update_network(received_network, parameters[NETWORK_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 104, in rest2row
    name=name
  File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north.py", line 172, in update_network
    return self.get_network(network_id)
  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 154, in get_network
    return self._get_network(network_id)
  File "/usr/share/ovirt-provider-ovn/ovndb/ovn_north.py", line 148, in _get_network
    'Network {network} does not exist'.format(network=network_id)
ElementNotFoundError: Network 2527f7fb-0a0f-4d2e-a052-c530358f8eeb.json does not exist

Comment 2 Dan Kenigsberg 2017-11-17 20:12:06 UTC
CFME asks the provider about a network with a trailing .json. Smells like a network provider bug.

2017-11-08 11:11:41,886   Request: PUT : /v2.0/networks/2527f7fb-0a0f-4d2e-a052-c530358f8eeb.json
2017-11-08 11:11:41,887   Request body:
{"network":{"name":"testmor","shared":false,"admin_state_up":false}}

Comment 3 Oved Ourfali 2017-11-17 20:43:17 UTC
Doesn't sound like a blocker for me.
Removing the blocker flag. 
If anyone thinks it is a wrong decision, let's discuss.

Comment 4 Meni Yakove 2017-11-19 10:04:19 UTC
I think that add, delete and edit are basic operations that should work for OVN feature.

Comment 5 Dave Johnson 2017-11-20 17:23:12 UTC
Daniel, see comment #3 and speak with Oved to get this one figured out.  We need to understand the issue some more.  I believe it is a automation blocker and the proposed workaround is not sufficient, is that correct?

Comment 7 Dan Kenigsberg 2017-11-20 21:28:19 UTC
I'd consider this a blocker only for RHV-4.2. I'd be fine if it is fixed in an upcoming CFME-5.9.z.

It seems like a tiny issue, of concatenating ".json" where it does not belong. I hope Alona can find the time to look into it and solve it regardless of its blocker status.

(In reply to Dave Johnson from comment #5)
> I believe it is a automation
> blocker and the proposed workaround is not sufficient, is that correct?

which workaround are you referring to, Dave?

Comment 8 Alona Kaplan 2017-11-21 13:14:12 UTC
Marcin,

It is documented in the neutron api documtation [1] the ".json" suffix should be supported.

"A .json extension can be added to the request URI. For example, the .json extension in the following requests are equivalent:

        GET publicURL/networks
        GET publicURL/networks.json

"

[1] https://developer.openstack.org/api-ref/network/v2/index.html#networks


I think the bug should be moved to ovn-provider. Marcin, do you agree?

Comment 9 Mor 2017-12-10 08:10:03 UTC
CMFE 5.9.0.11.20171127204214_e316988
RHV 4.2.0-0.6.el7
ovirt-provider-ovn 1.2.1-1.el7ev.noarch

Network name change doesn't fail now. BUT in order for the change to be propagated back to engine, the network needs to be reimported from ovirt-provider-ovn. Otherwise, the old name still appears in engine.

Comment 10 Mor 2017-12-10 13:42:10 UTC
Dan updated me that this should be solved once the auto-sync mechanism on RHV will be added. The bug is verified with the missing functionality.

Versions:
CMFE 5.9.0.11.20171127204214_e316988
RHV 4.2.0-0.6.el7
ovirt-provider-ovn 1.2.1-1.el7ev.noarch

Comment 11 Sandro Bonazzola 2017-12-12 14:11:29 UTC
This bug is targeted to 4.2.1 but it has been verified in 4.2.0.
Please check / fix

Comment 12 Marcin Mirecki 2018-01-24 10:27:37 UTC
This was fixed before target release.
The fix is correct.

Comment 13 Sandro Bonazzola 2018-02-12 11:47:39 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, 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.