Bug 820989
Summary: | [RHEVM] [backend] switching rhevm network to different NIC throws exception NETWORK_ATTACH_ILLEGAL_GATEWAY | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Martin Pavlik <mpavlik> | ||||||||||
Component: | ovirt-engine | Assignee: | Moti Asayag <masayag> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Pavlik <mpavlik> | ||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | high | ||||||||||||
Version: | 3.1.0 | CC: | dyasny, gklein, iheim, lpeer, mkenneth, Rhev-m-bugs, yeylon, ykaul | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | x86_64 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | network | ||||||||||||
Fixed In Version: | si11 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2012-12-04 20:03:45 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: | |||||||||||||
Bug Depends On: | 843081 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Martin Pavlik
2012-05-11 13:52:17 UTC
Created attachment 583853 [details]
screenshot
Created attachment 583854 [details]
vdsm.log + engine.log
I believe the problem is with DHCP configuration on mgmt network. Is it reproduce when changing to STATIC after moving mgmt network (instead of DHCP)? Yes it does reproduce with static as well. Please see attached screenshots with error and another screenshot with settings I put in. engine.log 2012-05-14 08:57:11,711 WARN [org.ovirt.engine.core.bll.SetupNetworksCommand] (ajp--0.0.0.0-8009-2) [34ef2a6f] CanDoAction of action SetupNetworks failed. Reasons:NETWORK_ATTACH_ILLEGAL_GATEWAY, Created attachment 584261 [details]
screenshot of static IP input
Created attachment 584262 [details]
screenshot of error with static IP
It happend because the old nic doesn't clean its default gateway attribute. The engine throws an error if there is a nic with default gateway attribute and it is not management. The old nic has no networks, so there is no reason to check if it is management and to check its default gateway. I fixed it in the webadmin, now the old nic cleans its default gateway. But I think it also should be fixed in the engines side. The ui fix is in commit 85b42bb19dccfb75607b55313f87bb898d31ca6c I don't think any change should be done on backend side: The validation on backend verifies that gateway shouldn't be provided for any interface which isn't the management network. When attempting same scenario with rest-api - the error doesn't occur due to the fact rest doesn't send gateway to the previous nic (user responsibility to remove it): before sending setupnetworks request: <action> <host_nics> <host_nic id="0640fe2d-b462-4057-a1a8-afcc4469e551"> <name>eth0</name> <network id="3fc2f39e-6a3a-4dd6-8ffa-b2cf4550f1b9"/> <mac address="b4:99:ba:11:11:11"/> <!-- the gateway attribute should be removed after assigning the management network to new interface--> <ip gateway="10.11.11.11" netmask="255.255.252.0" address="10.22.22.22"/> <boot_protocol>static</boot_protocol> <bridged>true</bridged> </host_nic> <!-- the new nic to be attached with management network --> <host_nic id="d2cfb266-6065-4cec-9d04-251659f444bd"> <name>eth5</name> <mac address="78:ac:c0:aa:aa:aa"/> <ip netmask="" address=""/> <boot_protocol>none</boot_protocol> <status> <state>down</state> </status> <bridged>false</bridged> </host_nic> </host_nics> </action> the input for the request (moving management network from eth0 to eth5: <action> <host_nics> <host_nic id="0640fe2d-b462-4057-a1a8-afcc4469e551"> <name>eth0</name> <mac address="b4:99:ba:11:11:11"/> <!-- the gateway attribute should be removed after assigning the management network to new interface--> <ip netmask="255.255.252.0" address="10.22.22.22"/> <boot_protocol>static</boot_protocol> <bridged>false</bridged> </host_nic> <!-- the new nic to be attached with management network --> <host_nic id="d2cfb266-6065-4cec-9d04-251659f444bd"> <name>eth5</name> <mac address="78:ac:c0:aa:aa:aa"/> <network id="3fc2f39e-6a3a-4dd6-8ffa-b2cf4550f1b9"/> <ip netmask="" address=""/> <boot_protocol>dhcp</boot_protocol> <bridged>true</bridged> </host_nic> </host_nics> <check_connectivity>true</check_connectivity> <connectivity_timeout>50</connectivity_timeout> </action> Problem mentioned in bug is solved, but it is not possible to switch RHEVM network to different NIC, followuo in bug #BZ843081 |