Bug 1399511 - Provider should support PUT method to allow update of subnet properties
Summary: Provider should support PUT method to allow update of subnet properties
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.2.0
: 1.2.1
Assignee: Marcin Mirecki
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-29 08:46 UTC by Mor
Modified: 2017-12-20 11:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:02:17 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80399 0 master MERGED Implement update subnet with ovsdbapp 2017-08-28 12:49:38 UTC
oVirt gerrit 81702 0 master MERGED Validate subnet network exists. 2017-09-29 08:51:36 UTC

Description Mor 2016-11-29 08:46:40 UTC
Description of problem:
I got "incorrect path" server error while trying to update existing subnet properties using the PUT server method on <server>/v2.0/api/subnets/<subnet_id>

Version-Release number of selected component (if applicable):
oVirt Engine Version: 4.1.0-0.0.master.20161127231313.git9bb30a5.el7.centos
oVirt Provider OVN: ovirt-provider-ovn-0.1-1

How reproducible:
100%

Steps to Reproduce:
1. Create two OVN networks, where one network attached to subnet.
2. Try to use PUT to update the network_id key of the subnet to the network_id of the other network (without subnet attached).

Actual results:
Incorrect path error is displayed.

Expected results:
network_id value should be modified.

Additional info:
https://wiki.openstack.org/wiki/Neutron/APIv2-specification#Update_Subnet

Comment 1 Marcin Mirecki 2016-11-29 08:56:58 UTC
We currently only support the part of Neutron API which is used by the engine (external networks).
Since you can not modify subnets from the engine, this is not supported at this moment.

Comment 2 Dan Kenigsberg 2016-11-30 09:15:06 UTC
our provider must be a very shallow integration layer above OVN. we should not create and manage entities that do not exist in OVN.

do we currently have any other means to modify network's subnet via our API?

Comment 3 Marcin Mirecki 2017-01-18 09:30:06 UTC
We only implement a subset of the neutron REST API, only the items which are needed by the external network providers feature in ovirt-engine.
PUT is not supported for subnets and networks, as it is not needed by the exernal network providers feature.

Comment 4 Dan Kenigsberg 2017-05-29 09:55:50 UTC
Let's wait with this until we reimplement ovirt-provider-ovn using ovsdbapp.

Comment 5 Mor 2017-08-28 08:04:23 UTC
Patch is not merged yet.

Comment 6 Mor 2017-09-10 07:59:10 UTC
It is possible to associate a subnet using the PUT method with non-existent network ID, do we consider this a bug?

Comment 7 Dan Kenigsberg 2017-09-10 08:04:48 UTC
it smells like a bug, but I am not sure I understand what you are doing. Please state here which action you do, what do you receive instead of the expected error. Also, please direct this type of questions to Marcin.

Comment 8 Mor 2017-09-10 08:26:08 UTC
(In reply to Dan Kenigsberg from comment #7)
> it smells like a bug, but I am not sure I understand what you are doing.
> Please state here which action you do, what do you receive instead of the
> expected error. Also, please direct this type of questions to Marcin.

I will try to elaborate:  I am able to change the 'network_id' value of existing subnet to non-existent network id. The provider doesn't check if the ID exist or not.

Comment 9 Marcin Mirecki 2017-09-11 10:56:03 UTC
This should not be possible, needs to be fixed.

Comment 10 Mor 2017-10-23 14:53:27 UTC
Verified on:
ovirt-provider-ovn-1.2-0.20171020111522.git3dd43cf.el7.centos.noarch

{
  "error": {
    "message": "Unable to move subnet to network `<id_of_network>`. The network does not exit.",
    "code": 400,
    "title": "Bad Request"
  }
}

Comment 11 Sandro Bonazzola 2017-12-20 11:02:17 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.