Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1340644

Summary: [REST-API] - Creating bond with network attached via rest leaving the setup networks dialog in unrecoverable state
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Yevgeny Zaspitsky <yzaspits>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: high Docs Contact:
Priority: high    
Version: 4.0.0CC: bugs, mburman, s.kieske, yzaspits
Target Milestone: ovirt-4.0.1Keywords: Regression
Target Release: 4.0.1.1Flags: rule-engine: ovirt-4.0.z+
rule-engine: blocker+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 06:24:36 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:
Attachments:
Description Flags
Logs none

Description Michael Burman 2016-05-29 14:02:30 UTC
Created attachment 1162623 [details]
Logs

Description of problem:
[REST-API] - Creating bond with network attached via rest leaving the setup networks dialog in unrecoverable state.

When creating bond with network attached via rest api and passing only ip_address_assignments without ipv6 or vise versa, it will leave the setup networks dialog(ui) in unrecoverable state. It isn't possible to detach the network, to break the bond or to edit it. UI filled with exceptions. 

When passing the request without the ip_address_assignments and without ipv6, everything working ok. 

Version-Release number of selected component (if applicable):
4.1.0-0.0.master.20160528231304.git9350259.el7.centos

How reproducible:
100

Steps to Reproduce:
1. Create bond with network attached via rest --> 
POST -

<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <modified_network_attachments>
        <network_attachment>
         <network>
           <name>n-3</name>
           <link rel="permissions"/> 
           <link rel="vnicprofiles"/>
           <link rel="labels"/>
           <data_center id="1559aee8-d294-4299-a733-8ff08a29feec"/>
           <stp>false</stp>
            <mtu>0</mtu>
             <usages>
                <usage>vm</usage>
           </usages>
         </network>
            <host_nic>
                <name>bond10</name>
            </host_nic>
            <ip_address_assignments>
                <ip_address_assignment>
                    <ip/>
                    <assignment_method>none</assignment_method>
                </ip_address_assignment>
            </ip_address_assignments>
        </network_attachment>
    </modified_network_attachments>
    <removed_network_attachments/>
    <synchronized_network_attachments/>
    <modified_bonds>
        <host_nic> 
    <name>bond10</name> 
      <bonding>
        <slaves>
            <host_nic id="7218509b-39d1-4b3a-ba8f-955b0aae4b9e"/>
            <host_nic id="22caa77f-9dd2-401e-adee-624c0634ec55"/>
        </slaves>
     </bonding>
    </host_nic>
   </modified_bonds>
  <removed_bonds/>
    <modified_labels/>
    <removed_labels/>
    <check_connectivity>true</check_connectivity>
    <connectivity_timeout>60</connectivity_timeout>
  </action>


2. Go to setup networks dialog in the engine UI and try to break the bond, try to edit network, try to detach network. 

Actual results:
Can't do anything with this bond and the network that is attached to him.
UI filled with UI exceptions:

Uncaught exception occurred. Please try reloading the page. Details: Exception caught: (TypeError) __gwt$exception: <skipped>: Cannot read property 'c' of null
Please have your administrator check the UI logs

Uncaught exception occurred. Please try reloading the page. Details: IpConfiguration does not have IPv6 address set.
Please have your administrator check the UI logs

Uncaught exception occurred. Please try reloading the page. Details: Exception caught: IpConfiguration does not have IPv6 address set.
Please have your administrator check the UI logs

-The workaround is to delete the network attachment via rest.

Expected results:
Should work and handle requests with ip attachments and without

Additional info -->
The bond is created with warning icon and tooltip that explaining that the bond created in mode 4, but have no partner mac. Need to understand if it's caused by this bug.

Comment 1 Yaniv Kaul 2016-05-30 14:31:18 UTC
Is that REST v4 or v3 API? Is this a regression?

Comment 2 Martin Mucha 2016-05-30 16:30:40 UTC
v4 api

Comment 3 Michael Burman 2016-05-31 07:12:33 UTC
(In reply to Yaniv Kaul from comment #1)
> Is that REST v4 or v3 API? Is this a regression?

Both v3 and v4 and yes it's a regression, setting the flag.

Comment 4 Red Hat Bugzilla Rules Engine 2016-05-31 07:12:38 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 5 Meni Yakove 2016-07-02 08:37:41 UTC
rhevm-4.0.2-0.2.rc1.el7ev.noarch

Comment 6 Sandro Bonazzola 2016-07-19 06:24:36 UTC
Since the problem described in this bug report should be
resolved in oVirt 4.0.1 released on July 19th 2016, it has been closed with a
resolution of CURRENT RELEASE.

For information on the release, and how to update to this release, follow the link below.

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

http://www.ovirt.org/release/4.0.1/