[OPNFLWPLUG-62] Meter Statistics not showing output/logs on OSGI prompt and through REST Created: 29/Jan/14  Updated: 27/Sep/21  Resolved: 06/Feb/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Praveen Darshanam Assignee: Sachi Gupta
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Attachments: File f901.xml    

 Description   

Start controller (./run.sh -debug) and mininet (sudo mn --topo single,2 --controller remote,ip=192.168.56.103:6653 --switch ovsk,protocols=OpenFlow13)
osgi> setLogLevel DECONTROLLER-5
osgi> addMeter openflow:1
Push XML(attached) using REST and GET works fine
http://192.168.56.103:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/172
osgi> meterConfigStats
null
osgi> meterStats
osgi>
Below rest returns "404 Not Found", "No data exists" error
http://192.168.56.103:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/meter/8

Controller version used
commit 4c433343d958b7db6aa3eddde9bd9be45041b07d
Author: Krishnan Iyer <krishnan.k.iyer@gmail.com>
Date: Tue Jan 28 14:53:57 2014 +0530
REST Actions testing
Signed-off-by: Krishnan Iyer <krishnan.k.iyer@gmail.com>
Change-Id: I3b9cad70460a00b51801c246fffcd99ac415f811



 Comments   
Comment by Praveen Darshanam [ 29/Jan/14 ]

Attachment f901.xml has been added with description: Meter, Group and Flow Statistics

Comment by Praveen Darshanam [ 30/Jan/14 ]

Used the xml provided at
https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:End_to_End_Meters
PUT/GET was working file but meterConfigStats returns null string on OSGI prompt.

GET request using below link doesn't return Meter stats instead return some unexpected HTML file
http://192.168.56.103:8080/restconfig/operational/opendaylight-inventory:nodes/node/openflow:1/meter/1
********
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Bootstrap CSS - 1 -->
<link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- Login CSS - 2 -->
<link rel="stylesheet/less" type="text/css" href="/css/login.less">
<title>OpenDaylight - Login</title>
<!-- Bootstrap JS - 1 -->
<script src="/js/bootstrap.min.js"></script>
<!-- LESS - 2 -->
<script type="text/javascript">
less =

{ env: "production" }

;
</script>
<script src="/js/less-1.3.3.min.js"></script>
</head>
<body>
<form action="j_security_check" id="form" method="post">
<div class="container">
<div class="content">
<div class="login-form">
<div id="logo"></div>
<fieldset>
<div class="control-group">
<input type="text" name="j_username" placeholder="Username">
</div>
<div class="control-group">
<input type="password" name="j_password" placeholder="Password">
</div>
<button class="btn btn-primary" type="submit" value="Log In" >
<div class="icon-login"></div> Log In
</button>
</fieldset>
</div>
</div>
</div>
</form>
</body>
</html>
********

Comment by Praveen Darshanam [ 30/Jan/14 ]

Mininet details

mininet@mininet-vm104:~$ sudo ovs-ofctl -O OpenFlow13 dump-desc s1
OFPST_DESC reply (OF1.3) (xid=0x2):
Manufacturer: Nicira, Inc.
Hardware: Open vSwitch
Software: 2.0.0
Serial Num: None
DP Description: None
mininet@mininet-vm104:~$

mininet@mininet-vm104:~$ sudo ovs-ofctl -O OpenFlow13 show s1
OFPT_FEATURES_REPLY (OF1.3) (xid=0x2): dpid:0000000000000001
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS
OFPT_GET_CONFIG_REPLY (OF1.3) (xid=0x4): frags=normal miss_send_len=0

mininet@mininet-vm104:~$ sudo ovs-ofctl -V
ovs-ofctl (Open vSwitch) 2.0.0
Compiled Jan 21 2014 22:37:51
OpenFlow versions 0x1:0x4
mininet@mininet-vm104:~$

Comment by Sachi Gupta [ 31/Jan/14 ]

Hi Praveen,

I am able to replicate the same problem.

Observation 1: GET request using below link doesn't return Meter stats instead return some unexpected HTML file
http://192.168.56.103:8080/restconfig/operational/opendaylight-inventory:nodes/node/openflow:1/meter/1

Observation 2: The meterConfigStats return null value on osgi prompt.

Will investigate and debug the issue to fix it.

Comment by Anil Vishnoi [ 31/Jan/14 ]

Hi Sachi/Praveen,

Can you please try to recreate this scenario with CPqD switch? I think Openvswitch 2.0.0 don't have support for Meter Multipart request/reply messages. So if you test with CPqD switch and it works fine then i think we can confirm it.

Thanks
Anil

Comment by Sachi Gupta [ 31/Jan/14 ]

Hi Avishnoi,

Please find the comments inline:

1. Have run the controller using openflowplugin1.3 using https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin::Build_Instructions

2. Have installed mininet 2.1.0 with openvswitch 2.0.0 and openflow1.3 using https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin::Test_Environment

3. Started controller and mininet (sudo mn --topo single,2 --controller remote,ip=192.168.56.103:6653 --switch ovsk,protocols=OpenFlow13)

4. Used the xml provided at https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:End_to_End_Meters
PUT/GET was working file but meterConfigStats returns null string on OSGI prompt.

5. GET request using below link doesn't return Meter stats instead return some unexpected HTML file
http://192.168.56.103:8080/restconfig/operational/opendaylight-inventory:nodes/node/openflow:1/meter/1

Comment by Sachi Gupta [ 03/Feb/14 ]

Hi,

Please find the below comments:

Have tried to add meter by three different ways:

1. Added meter through osgi prompt:
osgi> addMeter openflow:1

The output is as:
1.1 On osgi prompt run meterConfigStats command which returned null
1.2 On mininet no meter stats are received : sudo dpctl tcp:127.0.0.1:6680 meter-config
1.3 Through restconf GET http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/12 - Meter is shown

2. Added meter through restconf:
PUT http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/12

REQUEST BODY:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<meter xmlns="urn:opendaylight:flow:inventory">
<container-name>abcd</container-name>
<flags>meter-burst</flags>
<meter-band-headers>
<meter-band-header>
<band-burst-size>444</band-burst-size>
<band-id>0</band-id>
<band-rate>234</band-rate>
<dscp-remark-burst-size>5</dscp-remark-burst-size>
<dscp-remark-rate>12</dscp-remark-rate>
<perc_level>1</perc_level>
<meter-band-types>
<flags>ofpmbt-dscp-remark</flags>
</meter-band-types>
</meter-band-header>
</meter-band-headers>
<meter-id>1</meter-id>
<meter-name>Foo</meter-name>
</meter>

The output is as:
2.1 On osgi prompt run meterConfigStats command which returned null
2.2 On mininet no meter stats are received : sudo dpctl tcp:127.0.0.1:6680 meter-config
2.3 Through restconf GET http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/12 - Meter is shown

3. Added meter through switch:
dpctl tcp:127.0.0.1 meter-mod cmd=add,meter=1 drop:rate=50

The output is as:
3.1 On osgi prompt run meterConfigStats command which returned meterStats
osgi>meterConfigStats
NodeMeterConfigStats [_meterConfigStats=MeterConfigStats [_barrier=null, _containerName=null, _flags=null, _meterBandHeaders=MeterBandHeaders [_meterBandHeader=[MeterBandHeader [_bandBurstSize=0, _bandId=BandId [_value=0], _bandRate=50, _meterBandTypes=MeterBandTypes [_flags=MeterBandType [_ofpmbtDrop=true, _ofpmbtDscpRemark=false, _ofpmbtExperimenter=false], augmentation=[]], _key=MeterBandHeaderKey [_bandId=BandId [_value=0]], _bandType=Drop [_dropBurstSize=0, _dropRate=50, augmentation=[]], augmentation=[]]], augmentation=[]], _meterId=MeterId [_value=1], _meterName=null, augmentation=[]]]osgi>

3.2 On mininet meter stats are received :
root@mininet-vm:/home/mininet# sudo dpctl tcp:127.0.0.1:6680 meter-config
SENDING:
stat_req{type="mconf", flags="0x0"

{meter_id= ffffffff"}

RECEIVED:
stat_repl{type="mconf", flags="0x0", stats=[{meter= 1"", flags="1", bands=[

{type = drop, rate="50", burst_size="0"}

]}]}

3.3 Through restconf GET http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/1 returns "404 NOT FOUND"

It seems the issue is in adding the meter to the switch through controller(Either via osgi prompt or through RestConf)

Comment by Sachi Gupta [ 03/Feb/14 ]

Hi Avishnoi/Praveen,

I recreated the scenario with CPqD Switch:

1. Run the Controller with openflowplugin 1.3

2. Setup and start the CPqD switch
sudo udatapath/ofdatapath --datapath-id=000000000004 --interfaces=eth7 ptcp:6680 &
secchan/ofprotocol tcp:127.0.0.1:6680 tcp:192.168.56.1:6633

3. The switch(MD_SAL|openflow:4/CPqD switch) is connected to the controller

4. Run the command addMeter openflow:4 on osgi prompt

5. The meter get added to the CPqD switch
root@mininet-vm:/home/mininet# sudo dpctl tcp:127.0.0.1:6680 meter-config
SENDING:
stat_req{type="mconf", flags="0x0"

{meter_id= ffffffff"}

RECEIVED:
stat_repl{type="mconf", flags="0x0", stats=[{meter= c"", flags="4", bands=[

{type = dscp_remark, rate="12", burst_size="5", prec_level="1"}

]}]}

6. Run the command meterConfigStats on osgi prompt and output is received
NodeMeterConfigStats [_meterConfigStats=MeterConfigStats [_barrier=null, _containerName=null, _flags=null, _meterBandHeaders=MeterBandHeaders [_meterBandHeader=[MeterBandHeader [_bandBurstSize=5, _bandId=BandId [_value=0], _bandRate=12, _meterBandTypes=MeterBandTypes [_flags=MeterBandType [_ofpmbtDrop=false, _ofpmbtDscpRemark=true, _ofpmbtExperimenter=false], augmentation=[]], _key=MeterBandHeaderKey [_bandId=BandId [_value=0]], _bandType=DscpRemark [_dscpRemarkBurstSize=5, _dscpRemarkRate=12, _percLevel=null, augmentation=[]], augmentation=[]]], augmentation=[]], _meterId=MeterId [_value=12], _meterName=null, augmentation=[]]]osgi>

7. Used the Rest URLs to get the meter data - The URLs retain with correct information.

GET http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:4/meter/12
GET http://127.0.0.1:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:4/meter/12

So, It seems that Meter Multipart request/reply messages works fine with CPqD switch whereas OpenvSwitch 2.0.0 doesnot have support for Meter Multipart request/reply messages.

Please confirm to close the bug.

Comment by Praveen Darshanam [ 04/Feb/14 ]

Hi Sachi,

I see the same issue on Open vSwitch 2.1.0, this is not specific to OVS 2.0.0.

Best Regards,
Praveen Darshanam

Comment by Sachi Gupta [ 04/Feb/14 ]

Hi Praveen,

I have replicated and tested the scenario with CPqD switch and it is working fine.

It seems that the controller functionality is working fine, but the issue is with switch(whether it is OpenvSwitch - 2.0.0/OpenvSwitch - 2.1.0)

Thanks,
Sachi

Comment by Praveen Darshanam [ 04/Feb/14 ]

Are we going to CLOSE the bug or change product and assign to other folks.
We were working with OVSK so the bug will remain as is and can't test Meter/Group statistics.

Comment by Sachi Gupta [ 04/Feb/14 ]

Hi Praveen/ Avishnoi,

The OpenDayLight controller functionality is working fine for meter/group statistics in CPqD switch

Since OpenvSwitch-2.0.0/OpenvSwitch-2.1.0, any other, does not support meter/group statistics so it confirms that implementation needs to be enhanced in OpenvSwitch for meter/group

So it seems, it is for OpenvSwitch not for OpenDaylight controller.

Comment by Anil Vishnoi [ 04/Feb/14 ]

Agree, Its OVS issue and not Controller. I think we can close this bug.

THanks
Anil

Comment by Sachi Gupta [ 06/Feb/14 ]

Hi Avishnoi/Praveen,

The bug is an OVS issue and not the controller, since the meter multipart request/reply messages are working fine with CPqD switch but not for OVS.

So, I am closing it.

Generated at Wed Feb 07 20:31:28 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.