Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1530053

Summary: Provider does not support fixed_ips property when creating network ports
Product: [oVirt] ovirt-provider-ovn Reporter: Mor <mkalfon>
Component: providerAssignee: Marcin Mirecki <mmirecki>
Status: CLOSED DUPLICATE QA Contact: Mor <mkalfon>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bugs, danken, myakove, ylavi
Target Milestone: ovirt-4.2.2Keywords: Automation
Target Release: ---Flags: rule-engine: ovirt-4.2+
ylavi: exception+
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-02-07 09:03:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ovirt-provider-ovn.log none

Description Mor 2018-01-01 15:46:58 UTC
Created attachment 1375262 [details]
ovirt-provider-ovn.log

Description of problem:
fixed_ips is the only property which allows to assign IPs on network ports. ovirt-provider-ovn doesn't support using the fixed_ips property when creating network ports. This blocks me from adding a router interface by port, since the port is required to have an IP from subnet assigned to it.

Request to create the port:
2018-01-01 17:13:03,016   Request: POST : /v2.0/ports
2018-01-01 17:13:03,017   Request body:
{"port": {"network_id": "3ea241e5-ccee-431d-a99f-88d41adf35ab", "fixed_ips": [{"subnet_id": "cf3e9b08-296d-48fc-a202-f1743c3ef63e", "ip_address": "10.0.0.1"}], "name": "port_name", "device_id": "dev_id"}}
2018-01-01 17:13:03,167   Response code: 201

Response received by the PORT mapper:
2018-01-01 17:13:03,167   Response body: {"port": {"name": "port_name", "tenant_id": "00000000000000000000000000000001", "network_id": "3ea241e5-ccee-431d-a99f-88d41adf35ab", "port_security_enabled": false, "admin_state_up": false, "fixed_ips": [], "id": "35488ed5-1de2-495f-9568-31dcf4113147", "security_groups": [], "device_id": "dev_id"}}

Note the empty fixed_ips property.

Subnet definition:
2018-01-01 17:12:02,483   Request body:
{"network": {"tenant_id": null, "name": "test_network", "admin_state_up": true}}
2018-01-01 17:12:02,590   Response code: 201
2018-01-01 17:12:02,590   Response body: {"network": {"status": "ACTIVE", "tenant_id": "00000000000000000000000000000001", "id": "3ea241e5-ccee-431d-a99f-88d41adf35ab", "name": "test_network"}}
2018-01-01 17:12:26,165   Request: POST : /v2.0/subnets
2018-01-01 17:12:26,166   Request body:
{"subnet": {"network_id": "3ea241e5-ccee-431d-a99f-88d41adf35ab", "ip_version": 4, "cidr": "10.0.0.0/24", "name": "test_router_subnet", "enable_dhcp": true}}

Version-Release number of selected component (if applicable):
ovirt-provider-ovn-1.2.2-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create subnet (see description above).
1. Sent API request to create the port (see description above).

Actual results:
Port is created without IP from subnet.

Expected results:
ovirt-provider-ovn should support fixed_ips as defined in the Neutron API:
https://developer.openstack.org/api-ref/network/v2/index.html#create-port

Additional info:

Comment 1 Yaniv Lavi 2018-01-08 13:36:17 UTC
fixed_ips allows a VM that is using DHCP to get a specific IP from default subnet or any other subnet.

Comment 2 Yaniv Lavi 2018-02-07 09:03:57 UTC

*** This bug has been marked as a duplicate of bug 1536791 ***