Bug 980486 - Attaching a network to a host's nic inherits the host nic's IP to the new network
Summary: Attaching a network to a host's nic inherits the host nic's IP to the new net...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.3.0
Assignee: Mike Kolesnik
QA Contact: Meni Yakove
URL:
Whiteboard: network
Depends On:
Blocks: 998240
TreeView+ depends on / blocked
 
Reported: 2013-07-02 14:03 UTC by Moti Asayag
Modified: 2018-12-03 19:17 UTC (History)
15 users (show)

Fixed In Version: is11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 998240 (view as bug list)
Environment:
Last Closed: 2014-01-21 17:33:00 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0038 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.3.0 update 2014-01-21 22:03:06 UTC
oVirt gerrit 17140 0 None None None Never

Description Moti Asayag 2013-07-02 14:03:41 UTC
Description of problem:
The api action via /api/hosts/{host:id}/nics/{nic:id}/attach|rel=attach
is used to attach a network to a nic.
When a non-vm network is configured with address and boot protocol on top of that nic, any new vlan network attached to the nic will inherit that IP and the boot protocol.


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


How reproducible:
always

Steps to Reproduce:
1. Attach a non vm network 'nonvmnet' to 'eth4'.
2. Set an IP address and boot protocol for 'nonvmnet'
3. Attach a vlan network 'vlan1' to 'eth4'

Using python SDK:
nic1 = hostNics.list(name = 'eth4')[0]
nic1 = nic1.attach(action = params.Action(network = params.Network(name = 'nonvmnet')))
nic1.set_ip (params.IP(address = '10.35.10.200', netmask = '255.255.254.0'))
nic1.set_boot_protocol('static')
nic1.update();
nic1.attach(action = params.Action(network = params.Network(name = 'vlan1')))


Actual results:
Notice eth4.1 interface which carries 'vlan1' has the same IP and boot protocol as 'eth4', even it wasn't configured.

Expected results:
eth4.1 interface which carries 'vlan1' shouldn't have any IP address or boot protocol configuration.

Additional info:
The problem resides within the org.ovirt.engine.api.restapi.resource.BackendHostNicResource.doAttachAction which overrides the IP address, boot protocol (and bonding options) unnecessarily.
Also, the AttachNetworkToInterface command allows to be provide an IP address and boot protocol for the new network, however they aren't modelled in the restapi, hence user will have to use another call for the update() in order to set them.

Comment 1 lpeer 2013-07-10 08:08:48 UTC
*** Bug 980174 has been marked as a duplicate of this bug. ***

Comment 6 Meni Yakove 2013-08-22 12:39:59 UTC
rhevm-3.3.0-0.16.master.el6ev.noarch

Comment 7 Charlie 2013-11-28 00:15:33 UTC
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 8 errata-xmlrpc 2014-01-21 17:33:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHSA-2014-0038.html


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