Hi Oguchi,

The following seems to need in addition.

# sudo apt-get install rabbitmq-server

And ofagent installed from deb package is ran from
Upstart using /etc/init/neutron-plugin-openflow-agent.conf
That refers /etc/neutron/plugins/ml2/ml2_conf_ofa.ini instead of
/etc/neutron/plugins/ml2/ml2_conf.ini.
So you should configure /etc/neutron/plugins/ml2/ml2_conf_ofa.ini.

Procedure would be this way:

# service neutron-plugin-openflow-agent stop

do some modification.

# service neutron-plugin-openflow-agent start

thanks kakuma

On Fri, 01 May 2015 09:59:06 +0900
fumihiko kakuma <[email protected]> wrote:

> Hi Oguchi
> 
> On Fri, 1 May 2015 06:21:01 +0900
> Masato Oguchi <[email protected]> wrote:
> 
> > Hi kakuma,
> > 
> > Thank you very much for the advice.
> > 
> > > If you install neutron-plugin-openflow-agent package,
> > > ofagent will be started when the system boots.
> > > Because deb package registers the job of ofagent.
> > > You can confirm whether ofagent is runing by the following.
> > >
> > > # service neutron-plugin-openflow-agent status
> > >
> > >
> > > ryu application uses the port 6633 by default.
> > > So executing of an another ryu application will fail
> > > if ofagent is runing.
> > 
> > Surely ofagent is already running when the system boots,
> > which is confirmed by the service command.
> > 
> > And the application could not run because port number 6633
> > is already used by ofagent.
> > When I modify OFP_TCP_PORT written in
> > /usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_common.py
> > from 6633 to another value, the error disappears.
> > 
> > # Is there any better way rather than modifying ofproto_common.py?
> > # This file seems to be read by both ofagent and ryu application, so
> > # when ofagent is rebooted, it also uses the new value for OFP_TCP_PORT.
> > 
> 
> You can use --ofp-tcp-listen-port option.
> 
> > 
> > Anyway, even though the port number error is resolved, the application
> > still cannot connect to Open vSwitch in compute node.
> > I have checked /var/log/neutron/openvswitch-agent.log and it says
> > as follows.
> 
> openvswitch-agent.log is a log file for openvswitch 
> agent.
> You should check /var/log/neutron/openflow-agent.log to
> see a status of ofagent agent.
> And please run only one agent on a node.
> 
> 
> thanks kakuma
> 
> > 
> > ----------------------------------------------------
> > ......................
> > 2015-05-01 04:50:16.879 1639 INFO oslo.messaging._drivers.impl_rabbit
> > [req-67c50a56-64cd-4308-8f56-ee96abaa88a4 ] Connected to AMQP server on
> > controller:5672
> > 2015-05-01 04:50:16.890 1639 INFO
> > neutron.plugins.openvswitch.agent.ovs_neutron_agent
> > [req-67c50a56-64cd-4308-8f56-ee96abaa88a4 None] Agent initialized
> > successfully, now running...
> > 2015-05-01 04:50:16.892 1639 INFO
> > neutron.plugins.openvswitch.agent.ovs_neutron_agent
> > [req-67c50a56-64cd-4308-8f56-ee96abaa88a4 None] Agent out of sync with
> > plugin!
> > 2015-05-01 04:50:16.942 1639 INFO
> > neutron.plugins.openvswitch.agent.ovs_neutron_agent
> > [req-67c50a56-64cd-4308-8f56-ee96abaa88a4 None] Agent tunnel out of sync
> > with plugin!
> > ----------------------------------------------------
> > 
> > Although ofagent is running, it seems not to work properly.
> > Is this a problem about ofagent settings?
> > 
> > I have setup ml2_conf.ini file according to
> > https://github.com/osrg/ryu/wiki/Configuration-OpenStack-OFAgent-agent
> > as follows.
> > 
> > ----------------------------------------------------
> > [ml2]
> > type_drivers = flat,gre
> > tenant_network_types = gre
> > mechanism_drivers = ofagent,l2population
> > 
> > [ml2_type_gre]
> > tunnel_id_ranges = 1:1000
> > 
> > [securitygroup]
> > enable_security_group = True
> > enable_ipset = True
> > firewall_driver =
> > neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
> > 
> > [ovs]
> > local_ip = (local IP address)
> > enable_tunneling = True
> > 
> > [agent]
> > tunnel_types = gre
> > get_datapath_retry_times = 60
> > ----------------------------------------------------
> > 
> > Could you find something wrong in those settings?
> > I appreciate if you have some advices.
> > 
> > Best regards,
> > Masato Oguchi
> > 
> > 
> > > -----Original Message-----
> > > From: fumihiko kakuma [mailto:[email protected]]
> > > Sent: Thursday, April 30, 2015 5:59 PM
> > > To: Masato Oguchi
> > > Cc: [email protected]
> > > Subject: Re: [Ryu-devel] How to start the ofagent
> > >
> > > Hi Oguchi,
> > >
> > > If you install neutron-plugin-openflow-agent package,
> > > ofagent will be started when the system boots.
> > > Because deb package registers the job of ofagent.
> > > You can confirm whether ofagent is runing by the following.
> > >
> > > # service neutron-plugin-openflow-agent status
> > >
> > >
> > > ryu application uses the port 6633 by default.
> > > So executing of an another ryu application will fail
> > > if ofagent is runing.
> > >
> > >
> > > thanks kakuma
> > >
> > > On Wed, 29 Apr 2015 03:38:06 +0900
> > > Masato Oguchi <[email protected]> wrote:
> > >
> > > > Hi kakuma,
> > > >
> > > > I have construct a Juno OpenStack using different machines
> > > > and test it, but the result seems to be similar...
> > > >
> > > > > You may know about the following.
> > > > > neutron-plugin-openflow-agent package configures upstart
> > > > > of ofagent. So the rebooted host will start
> > > > > neutron-plugin-openvswitch-agent service.
> > > > > /var/log/neutron/openflow-agent.log may give you some
> > > > > information about that.
> > > > > Then if you execute ofagent, you will get an error
> > > > > message like "Address already in use".
> > > >
> > > > Is this mean, I don't have to execute /usr/bin/neutron-ofagent-agent
> > > > after the host is rebooted?
> > > > I might misunderstand it. Thank you for the information.
> > > >
> > > > Then, after the host is rebooted, I should be able to
> > > > execute Ryu program directly.
> > > > I have just execute a sample from Ryubook (and sample code
> > > > distributed with Ryu), simple_switch_13.py, on a compute node.
> > > > But it returns the following error:
> > > >
> > > > --------------------------------------------------------
> > > > # ovs-vsctl set Bridge br-int protocols=OpenFlow13
> > > >
> > > > # ryu-manager --verbose ryu.app.simple_switch_13
> > > > loading app ryu.app.simple_switch_13
> > > > loading app ryu.controller.ofp_handler
> > > > instantiating app ryu.app.simple_switch_13 of SimpleSwitch13
> > > > instantiating app ryu.controller.ofp_handler of OFPHandler
> > > > BRICK SimpleSwitch13
> > > >   CONSUMES EventOFPSwitchFeatures
> > > >   CONSUMES EventOFPPacketIn
> > > > BRICK ofp_event
> > > >   PROVIDES EventOFPSwitchFeatures TO {'SimpleSwitch13':
> > set(['config'])}
> > > >   PROVIDES EventOFPPacketIn TO {'SimpleSwitch13': set(['main'])}
> > > >   CONSUMES EventOFPEchoRequest
> > > >   CONSUMES EventOFPHello
> > > >   CONSUMES EventOFPErrorMsg
> > > >   CONSUMES EventOFPSwitchFeatures
> > > >   CONSUMES EventOFPPortDescStatsReply
> > > > hub: uncaught exception: Traceback (most recent call last):
> > > >   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line
> > 52,
> > > > in _launch
> > > >     func(*args, **kwargs)
> > > >   File
> > > > "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
> > > > line 71, in __call__
> > > >     self.server_loop()
> > > >   File
> > > > "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
> > > > line 94, in server_loop
> > > >     datapath_connection_factory)
> > > >   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line
> > 108,
> > > > in __init__
> > > >     self.server = eventlet.listen(listen_info)
> > > >   File "/usr/lib/python2.7/dist-packages/eventlet/convenience.py",
> > line
> > > > 38, in listen
> > > >     sock.bind(addr)
> > > >   File "/usr/lib/python2.7/socket.py", line 224, in meth
> > > >     return getattr(self._sock,name)(*args)
> > > > error: [Errno 98] Address already in use
> > > > --------------------------------------------------------
> > > >
> > > > I'm not so sure about how the OFAgent is executed
> > > > on a compute node, so I may misunderstand something
> > > > when Ryu program is executed...
> > > > The result is similar when the IceHouse OpenStack
> > > > is used.
> > > > Could you recognize what happens in this case?
> > > >
> > > > Best regards,
> > > > Masato Oguchi
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: fumihiko kakuma [mailto:[email protected]]
> > > > > Sent: Saturday, April 25, 2015 7:53 PM
> > > > > To: Masato Oguchi
> > > > > Cc: [email protected]
> > > > > Subject: Re: [Ryu-devel] How to start the ofagent
> > > > >
> > > > > Hi Oguchi
> > > > >
> > > > > I agree your idea(to upgrade openstack).
> > > > > But I'm not sure whether icehouse cause this problem.
> > > > >
> > > > > You may know about the following.
> > > > > neutron-plugin-openflow-agent package configures upstart
> > > > > of ofagent. So the rebooted host will start
> > > > > neutron-plugin-openvswitch-agent service.
> > > > > /var/log/neutron/openflow-agent.log may give you some
> > > > > information about that.
> > > > > Then if you execute ofagent, you will get an error
> > > > > message like "Address already in use".
> > > > >
> > > > >
> > > > > thanks kakuma
> > > > >
> > > > > On Sat, 25 Apr 2015 10:25:23 +0900
> > > > > Masato Oguchi <[email protected]> wrote:
> > > > >
> > > > > > Hi kakuma,
> > > > > >
> > > > > > I have already rebooted host and tested neutron-ofagent-agent
> > > > > > several times, but it ends up with the same error.
> > > > > > As you say, using Juno (or Kilo) seems to be the better
> > > > > > solution in this case... I will upgrade my OpenStack.
> > > > > >
> > > > > > Thank you very much for the valuable advices and information.
> > > > > > They help me a lot.
> > > > > >
> > > > > > Best regards,
> > > > > > Masato Oguchi
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: fumihiko kakuma [mailto:[email protected]]
> > > > > > > Sent: Saturday, April 25, 2015 9:39 AM
> > > > > > > To: Masato Oguchi
> > > > > > > Cc: [email protected]
> > > > > > > Subject: Re: [Ryu-devel] How to start the ofagent
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Can you reboot your host once and then try to
> > > > > > > execute ofagent?
> > > > > > >
> > > > > > > Anyway I reccomend using juno later.
> > > > > > > And kilo will be released soon. But I don't know about
> > > > > > >  deb packages of that.
> > > > > > > https://wiki.openstack.org/wiki/Kilo_Release_Schedule
> > > > > > >
> > > > > > > thanks kakuma
> > > > > > >
> > > > > > > On Sat, 25 Apr 2015 05:20:18 +0900
> > > > > > > Masato Oguchi <[email protected]> wrote:
> > > > > > >
> > > > > > > > Hi kakuma,
> > > > > > > >
> > > > > > > > I appreciate you have checked my configuration.
> > > > > > > > I have degraded ryu to version 3.18 and tried,
> > > > > > > > but the following errors occur in this case when
> > > > > > > > neutron-ofagent-agent is executed...
> > > > > > > >
> > > > > > > > -----------------------------------------------
> > > > > > > > # python /usr/bin/neutron-ofagent-agent --config-file
> > > > > > > > /etc/neutron/neutron.conf --config-file
> > > > > > /etc/neutron/plugins/ml2/ml2_conf.
> > > > > > > > ini
> > > > > > > > 2015-04-25 05:03:37.046 2651 ERROR ryu.lib.hub [-] hub:
> > uncaught
> > > > > > > > exception: Traceback (most recent call last):
> > > > > > > >   File
> > "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py",
> > > > line
> > > > > > 52,
> > > > > > > > in _launch
> > > > > > > >     func(*args, **kwargs)
> > > > > > > >   File
> > > > > > > >
> > > > "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
> > > > > > > > line 70, in __call__
> > > > > > > >     self.server_loop()
> > > > > > > >   File
> > > > > > > >
> > > > "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
> > > > > > > > line 93, in server_loop
> > > > > > > >     datapath_connection_factory)
> > > > > > > >   File
> > "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py",
> > > > line
> > > > > > 108,
> > > > > > > > in __init__
> > > > > > > >     self.server = eventlet.listen(listen_info)
> > > > > > > >   File
> > "/usr/lib/python2.7/dist-packages/eventlet/convenience.py",
> > > > > > line
> > > > > > > > 38, in listen
> > > > > > > >     sock.bind(addr)
> > > > > > > >   File "/usr/lib/python2.7/socket.py", line 224, in meth
> > > > > > > >     return getattr(self._sock,name)(*args)
> > > > > > > > error: [Errno 98] Address already in use
> > > > > > > >
> > > > > > > > 2015-04-25 05:03:37.146 2651 ERROR neutron.agent.linux.ovs_lib
> > > > > > > > [req-44a2fb2c-56d4-4dcb-9691-802d1eb22ca4 None] Unable to
> > execute
> > > > > > > > ['ovs-vsctl', '--timeout=10', '--', 'set', 'bridge', 'br-int',
> > > > > > > > 'protocols=OpenFlow13']. Exception:
> > > > > > > > Command: ['sudo', '/usr/bin/neutron-rootwrap',
> > > > > > > > '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10',
> > '--',
> > > > > > 'set',
> > > > > > > > 'bridge', 'br-int', 'protocols=OpenFlow13']
> > > > > > > > Exit code: 1
> > > > > > > > Stdout: ''
> > > > > > > > Stderr: 'Traceback (most recent call last):\n  File
> > > > > > > > "/usr/bin/neutron-rootwrap", line 6, in <module>\n    from
> > > > > > > > oslo.rootwrap.cmd import main\nImportError: No module named
> > > > > > > > rootwrap.cmd\n'
> > > > > > > > 2015-04-25 05:03:37.147 2651 ERROR
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent
> > > > > > > > [req-44a2fb2c-56d4-4dcb-9691-802d1eb22ca4 None] Agent
> > terminated
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent Traceback
> > (most
> > > > recent
> > > > > > > > call last):
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent   File
> > > > > > > >
> > > > > >
> > > >
> > "/usr/lib/python2.7/dist-packages/neutron/plugins/ofagent/agent/ofa_neutro
> > > > > > > > n_agent.py", line 137, in setup_ofp
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent
> > > > > > > > self.set_protocols(protocols)
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent   File
> > > > > > > >
> > "/usr/lib/python2.7/dist-packages/neutron/agent/linux/ovs_lib.py",
> > > > > > line
> > > > > > > > 135, in set_protocols
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent
> > > > check_error=True)
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent   File
> > > > > > > >
> > "/usr/lib/python2.7/dist-packages/neutron/agent/linux/ovs_lib.py",
> > > > > > line
> > > > > > > > 75, in run_vsctl
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent
> > ctxt.reraise =
> > > > > > False
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent   File
> > > > > > > >
> > > > > >
> > > >
> > "/usr/lib/python2.7/dist-packages/neutron/openstack/common/excutils.py",
> > > > > > > > line 82, in __exit__
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent
> > > > > > > > six.reraise(self.type_, self.value, self.tb)
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent   File
> > > > > > > >
> > "/usr/lib/python2.7/dist-packages/neutron/agent/linux/ovs_lib.py",
> > > > > > line
> > > > > > > > 68, in run_vsctl
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent     return
> > > > > > > > utils.execute(full_args, root_helper=self.root_helper)
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent   File
> > > > > > > >
> > "/usr/lib/python2.7/dist-packages/neutron/agent/linux/utils.py",
> > > > line
> > > > > > 76,
> > > > > > > > in execute
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent     raise
> > > > > > RuntimeError(m)
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent RuntimeError:
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent Command:
> > ['sudo',
> > > > > > > > '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf',
> > > > > > 'ovs-vsctl',
> > > > > > > > '--timeout=10', '--', 'set', 'bridge', 'br-int',
> > > > > > 'protocols=OpenFlow13']
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent Exit code: 1
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent Stdout: ''
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent Stderr:
> > 'Traceback
> > > > > > (most
> > > > > > > > recent call last):\n  File "/usr/bin/neutron-rootwrap", line
> > 6, in
> > > > > > > > <module>\n    from oslo.rootwrap.cmd import main\nImportError:
> > No
> > > > > > module
> > > > > > > > named rootwrap.cmd\n'
> > > > > > > > 2015-04-25 05:03:37.147 2651 TRACE
> > > > > > > > neutron.plugins.ofagent.agent.ofa_neutron_agent
> > > > > > > > 2015-04-25 05:03:37.148 2651 ERROR ryu.lib.hub [-] hub:
> > uncaught
> > > > > > > > exception: Traceback (most recent call last):
> > > > > > > >   File
> > "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py",
> > > > line
> > > > > > 52,
> > > > > > > > in _launch
> > > > > > > >     func(*args, **kwargs)
> > > > > > > >   File
> > > > > > > >
> > > > > >
> > > >
> > "/usr/lib/python2.7/dist-packages/neutron/plugins/ofagent/agent/ofa_neutro
> > > > > > > > n_agent.py", line 184, in _agent_main
> > > > > > > >     agent = OFANeutronAgent(ryuapp, **agent_config)
> > > > > > > >   File
> > > > > > > >
> > > > > >
> > > >
> > "/usr/lib/python2.7/dist-packages/neutron/plugins/ofagent/agent/ofa_neutro
> > > > > > > > n_agent.py", line 256, in __init__
> > > > > > > >     self.setup_integration_br()
> > > > > > > >   File
> > > > > > > >
> > > > > >
> > > >
> > "/usr/lib/python2.7/dist-packages/neutron/plugins/ofagent/agent/ofa_neutro
> > > > > > > > n_agent.py", line 708, in setup_integration_br
> > > > > > > >     self.int_br.setup_ofp()
> > > > > > > >   File
> > > > > > > >
> > > > > >
> > > >
> > "/usr/lib/python2.7/dist-packages/neutron/plugins/ofagent/agent/ofa_neutro
> > > > > > > > n_agent.py", line 141, in setup_ofp
> > > > > > > >     raise SystemExit(1)
> > > > > > > > SystemExit: 1
> > > > > > > > -----------------------------------------------
> > > > > > > >
> > > > > > > > Could you recognize these errors?
> > > > > > > > If it is difficult to solve these problems, as you have
> > > > > > > > recommended, the best way may be to version up OpenStack
> > > > > > > > from IceHouse to Juno and use the latest ryu and
> > > > > > > > neutron-ofagent-agent, even though it takes a little time...
> > > > > > > >
> > > > > > > > Best regards,
> > > > > > > > Masato Oguchi
> > >
> > > --
> > > fumihiko kakuma <[email protected]>
> > >
> 
> -- 
> fumihiko kakuma <[email protected]>
> 
> 
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel

-- 
fumihiko kakuma <[email protected]>



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to