Bug 842163 - REST API: Network set Port Mirroring when network Id is missing
Summary: REST API: Network set Port Mirroring when network Id is missing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Shahar Havivi
QA Contact: Yaniv Kaul
URL:
Whiteboard: network
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-22 16:46 UTC by Avi Tal
Modified: 2016-04-22 04:59 UTC (History)
11 users (show)

Fixed In Version: si17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 20:01:09 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log (75.33 KB, application/x-compressed-tar)
2012-08-20 15:27 UTC, Avi Tal
no flags Details

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>


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