Bug 988415 - [REST API]Can't create bond with attached network through API for non default bond name
Summary: [REST API]Can't create bond with attached network through API for non default...
Keywords:
Status: CLOSED DUPLICATE of bug 968190
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: unspecified
Hardware: x86_64
OS: Linux
high
unspecified
Target Milestone: ---
: ---
Assignee: Lior Vernia
QA Contact: GenadiC
URL:
Whiteboard: network
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-25 14:46 UTC by GenadiC
Modified: 2016-02-10 19:50 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-13 11:10:15 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log with the problem (209.89 KB, text/x-log)
2013-07-25 14:46 UTC, GenadiC
no flags Details

Description GenadiC 2013-07-25 14:46:54 UTC
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>

Comment 1 Dan Kenigsberg 2013-07-26 14:27:05 UTC
Dup of bug 968190? Please reopen if I'm wrong.

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

Comment 2 Meni Yakove 2013-07-27 17:03:56 UTC
Can you try to reproduce without VLAN?

Comment 3 GenadiC 2013-07-28 06:12:18 UTC
This bug happens without VLAN as well, so it's not a duplicate of the mentioned bug

Comment 4 Dan Kenigsberg 2013-07-28 07:30:40 UTC
So we cannot create a network over bond666, be it with or without VLAN tag? This still sounds like a dup.

Comment 5 GenadiC 2013-07-28 08:13:50 UTC
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

Comment 6 Lior Vernia 2013-08-06 14:12:47 UTC
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?

Comment 7 Lior Vernia 2013-08-13 11:10:15 UTC
Closing as duplicate until proven otherwise...

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


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