Hi everyone,

I'm trying to get Flow Entry Monitoring to work and running into trouble
getting the example code to work. I'm trying to add an flow monitor to
the switch when it connects to Ryu. However the code crashes with
following exception, when I try to send/generate the of-request:

MonitoringApp: Exception occurred during handler processing. Backtrace
from offending handler [_event_switch_enter_handler] servicing event
[EventOFPSwitchFeatures] follows.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py",
line 290, in _event_loop
    handler(ev)
  File "/home/vagrant/ryu/monitoring.py", line 73, in
_event_switch_enter_handler
    self.send_flow_monitor_request(datapath)
  File "/home/vagrant/ryu/monitoring.py", line 27, in
send_flow_monitor_request
    datapath.send_msg(req)
  File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
line 286, in send_msg
    msg.serialize()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
line 211, in serialize
    self._serialize_body()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_4_parser.py",
line 1447, in _serialize_body
    self._serialize_stats_body()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_4_parser.py",
line 3168, in _serialize_stats_body
    self.monitor_flags, self.table_id, self.command)
  File "/usr/local/lib/python2.7/dist-packages/ryu/lib/pack_utils.py",
line 25, in msg_pack_into
    buf += struct.pack(fmt, *args)
error: cannot convert argument to integer

I'm running on an Ubuntu 14.04. The code is simply copy pasted from the
example in ofproto/ofproto_v1_4.py

    def send_flow_monitor_request(self, datapath):
        ofp = datapath.ofproto
        ofp_parser = datapath.ofproto_parser
        monitor_flags = [ofp.OFPFMF_INITIAL, ofp.OFPFMF_ONLY_OWN]
        match = ofp_parser.OFPMatch(in_port=1)
        req = ofp_parser.OFPFlowMonitorRequest(datapath, 0, 10000,
                                               ofp.OFPP_ANY, ofp.OFPG_ANY,
                                               monitor_flags,
                                               ofp.OFPTT_ALL,
                                               ofp.OFPFMC_ADD, match)
        datapath.send_msg(req)

    @set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)
    def _event_switch_enter_handler(self, ev):
        datapath = ev.msg.datapath
        self.send_flow_stats_request(datapath)
        self.send_flow_monitor_request(datapath)


For reference I have also tried using a normal stats request, since it
is also based upon MultipartRequest since I assumed I'm using it
incorrectly. However the stats request work without problems. Anyone got
some suggestions? Thanks a lot in advance!

Best regards,
Joel

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to