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

Bug 842163

Summary: REST API: Network set Port Mirroring when network Id is missing
Product: Red Hat Enterprise Virtualization Manager Reporter: Avi Tal <atal>
Component: ovirt-engine-restapiAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Yaniv Kaul <ykaul>
Severity: high Docs Contact:
Priority: high    
Version: 3.1.0CC: dyasny, ecohen, iheim, jkt, lpeer, mpastern, Rhev-m-bugs, sgrinber, shavivi, srevivo, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: si17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 20:01:09 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
engine log none

Description Avi Tal 2012-07-22 16:46:59 UTC
Description of problem:
Port Mirroring ignore network details when activating on specific vm nic and actually take the attached network (to the nic) As default port mirroring network.

An example of the problem:
<nic>
    <network>
        <name>sw1</name>
    </network>
    <port_mirroring>
        <networks>
            <network/>
        </networks>
    </port_mirroring>
</nic>

In the above example we can see that even though i haven't added specific network the command will succeed and configure sw1 automatically for port mirroring.

The thing is that having wrong network details also be ignored.

Engine log doesn't even present anything regarding the action.

Comment 1 Shahar Havivi 2012-07-23 06:47:32 UTC
(In reply to comment #0)
Right,
The network id need to be set.

Comment 2 lpeer 2012-07-23 07:29:26 UTC
In the engine the property is a boolean so this BZ is relevant only for the API.

Comment 3 Shahar Havivi 2012-07-23 11:59:01 UTC
posted at: http://gerrit.ovirt.org/#/c/6547/

Comment 4 Shahar Havivi 2012-08-06 11:29:52 UTC
merged at: 184f19a80152f291e021ac839cf66f582fee7949

Comment 5 Avi Tal 2012-08-20 15:26:17 UTC
Verify on SI14 - PASS but have related BUG

The main issue solved, adding port mirroring works only when adding the current network id.

BUT, it accept only ID. adding port mirroring should also support adding by name.

<port_mirroring>
       <networks>
               <network>sw2</network>
       </networks>
</port_mirroring>

Return org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
    org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
    org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
    org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
    org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
    org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
    org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

Comment 6 Avi Tal 2012-08-20 15:27:22 UTC
Created attachment 605722 [details]
engine log

Comment 7 Shahar Havivi 2012-08-30 08:09:13 UTC
support port mirroring via network name:
posted at: http://gerrit.ovirt.org/#/c/7602/

Comment 8 Shahar Havivi 2012-09-02 09:48:33 UTC
merged at: 9233ef4a337e9528f77bf0557f5af6b5b10e1fe2

Comment 10 Avi Tal 2012-09-11 14:41:23 UTC
Verify on SI17 - PASS

<nic>
    <network>
        <name>rhevm</name>
    </network>
    <port_mirroring>
        <networks>
            <network><name>rhevm</name></network>
        </networks>
    </port_mirroring>
</nic>