Created attachment 778288 [details] engine log with the problem Description of problem: Error 400 [var action setup, var type networks, network cannot detach network used by vms, network interfaces dont exist] is received when you try to create bond (with non-default name) with network using REST API.(for example bond10) Using default bond names works fine (for example bond1) Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Use API request in 'Additional info' section to create network on bond 2. 3. Actual results: Creation of bond10 with network fails Expected results: Creation should work Additional info: When sending the following API requiest with bond1 works fine, but fails on sending bond10 <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> <host_nics> <host_nic> <name>bond10</name> <network/> <bonding> <options> <option name="mode" value="1"/> </options> <slaves> <host_nic> <name>eth2</name> </host_nic> <host_nic> <name>eth3</name> </host_nic> </slaves> </bonding> </host_nic> <host_nic> <name>bond10.162</name> <network> <name>sw1</name> </network> </host_nic> <host_nic href="/api/hosts/f16ddd9f-14de-43b3-9246-1f18eeb23561/nics/2fc27a70-1f44-47eb-81be-6a3fd76c50de" id="2fc27a70-1f44-47eb-81be-6a3fd76c50de"> <actions> <link href="/api/hosts/f16ddd9f-14de-43b3-9246-1f18eeb23561/nics/2fc27a70-1f44-47eb-81be-6a3fd76c50de/attach" rel="attach"/> <link href="/api/hosts/f16ddd9f-14de-43b3-9246-1f18eeb23561/nics/2fc27a70-1f44-47eb-81be-6a3fd76c50de/detach" rel="detach"/> </actions> <name>eth0</name> <link href="/api/hosts/f16ddd9f-14de-43b3-9246-1f18eeb23561/nics/2fc27a70-1f44-47eb-81be-6a3fd76c50de/statistics" rel="statistics"/> <host href="/api/hosts/f16ddd9f-14de-43b3-9246-1f18eeb23561" id="f16ddd9f-14de-43b3-9246-1f18eeb23561"/> <network href="/api/networks/fdaaa86b-1e76-4291-a85c-55867ad15436" id="fdaaa86b-1e76-4291-a85c-55867ad15436"/> <mac address="00:15:17:a7:6a:4c"/> <ip netmask="255.255.255.0" gateway="10.35.128.254" address="10.35.128.10"/> <boot_protocol>dhcp</boot_protocol> <speed>1000000000</speed> <status> <state>up</state> </status> <mtu>1500</mtu> <bridged>true</bridged> <custom_configuration>false</custom_configuration> </host_nic> </host_nics> <check_connectivity>true</check_connectivity> <connectivity_timeout>60</connectivity_timeout> <force>false</force> </action>
Dup of bug 968190? Please reopen if I'm wrong. *** This bug has been marked as a duplicate of bug 968190 ***
Can you try to reproduce without VLAN?
This bug happens without VLAN as well, so it's not a duplicate of the mentioned bug
So we cannot create a network over bond666, be it with or without VLAN tag? This still sounds like a dup.
This bug is for API only And I can create network over bond666 with API if I do it in 2 stages 1) Create bond 2) Put the network on the bond Doing it in one stage fails
Genadi, I have been able to to both create a bond that hadn't existed on the host and attach a network to it in a single Setup Networks command via the REST API, so the problem is probably different. My theory is that one error you got is a duplicate of the said bug, and that the other error isn't a bug. I suspect the NETWORKS_INTERFACES_DONT_EXIST error doesn't appear when the network isn't VLAN-tagged; I think that specific error is indeed a duplicate of the other bug. When you chcek with a non-VLAN-tagged network, does that error appear in the log? The other error seems to be about the network being attached to another NIC and used by a VM, and it seems that's the reason it couldn't be attached to your bond, not that the bond didn't exist before. Was it used by a VM? When you retried as per Meni's request with a non-VLAN-tagged network, was that network used by a VM as well?
Closing as duplicate until proven otherwise... *** This bug has been marked as a duplicate of bug 968190 ***