Bug 980486 - Attaching a network to a host's nic inherits the host nic's IP to the new network
Attaching a network to a host's nic inherits the host nic's IP to the new net...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: 3.3.0
Assigned To: Mike Kolesnik
Meni Yakove
: ZStream
Depends On:
Blocks: 998240
  Show dependency treegraph
Reported: 2013-07-02 10:03 EDT by Moti Asayag
Modified: 2016-02-10 14:52 EST (History)
15 users (show)

See Also:
Fixed In Version: is11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 998240 (view as bug list)
Last Closed: 2014-01-21 12:33:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 17140 None None None Never

  None (edit)
Description Moti Asayag 2013-07-02 10:03:41 EDT
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:

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 = '', netmask = ''))
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 04:08:48 EDT
*** Bug 980174 has been marked as a duplicate of this bug. ***
Comment 6 Meni Yakove 2013-08-22 08:39:59 EDT
Comment 7 Charlie 2013-11-27 19:15:33 EST
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:


Thanks in advance.
Comment 8 errata-xmlrpc 2014-01-21 12:33:00 EST
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.


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