Hello FUJITA,

thanks! now it runs. However I have found the following error:

  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/services/protocols/bgp/base.py",
line 243, in start
    self._run(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/core.py",
line 234, in _run
    server_thread.wait()
AttributeError: 'NoneType' object has no attribute 'wait'

BTW, as I said in my confusing other thread's mail, I found the exact place
where it register the wrong option. Check out my debug stack: [1]

Thanks for the response.

[1]: http://pastie.org/private/yqrcdai6aqjvpxecs2gjw




On 12 August 2014 11:30, FUJITA Tomonori <[email protected]>
wrote:

> On Tue, 12 Aug 2014 10:24:41 +0200
> Jaume Devesa <[email protected]> wrote:
>
> > I've found an error caused by the use of oslo.cfg in Ryu's applications.
> > Maybe I'm doing something wrong... but I find it strange, because I am
> > following the common OpenStack path in agents.
> >
> > I'm trying to import our Ryu's BGP driver through OpenStack's
> > *importutils* module[1].
> > When the module imports the driver's module, it raises a
> > ArgsAlreadyParsedException in this line of code [2].
> >
> > Digging a little bit in Ryu's code, I found the error raises when
> importing
> > the app_manager module[3].
> >
> > The module in [1] has a main method and does not need to have OpenStack
> > deployed to reproduce it.
> >
> > Can you tell me if I am doing something wrong? Meanwhile I will explore
> > more in Ryu's code to find a solution...
>
> I'll fix the problem in the better way. Meanwhile, can you try the
> following? Your agent don't need ssh cli anyway.
>
> I think that the problem is our code calls register_opts() internally
> (after your agent created an oslo.cfg instance).
>
> diff --git a/ryu/services/protocols/bgp/bgpspeaker.py
> b/ryu/services/protocols/bgp/bgpspeaker.py
> index 615bf75..fcae954 100644
> --- a/ryu/services/protocols/bgp/bgpspeaker.py
> +++ b/ryu/services/protocols/bgp/bgpspeaker.py
> @@ -18,8 +18,6 @@
>
>  import netaddr
>  from ryu.lib import hub
> -from ryu.base import app_manager
> -from ryu.services.protocols.bgp.operator import ssh
>
>  from ryu.services.protocols.bgp.core_manager import CORE_MANAGER
>  from ryu.services.protocols.bgp.signals.emit import BgpSignalBus
> @@ -137,11 +135,6 @@ class BGPSpeaker(object):
>          self._init_signal_listeners()
>          self._best_path_change_handler = best_path_change_handler
>
> -        if ssh_console:
> -            app_mgr = app_manager.AppManager.get_instance()
> -            ssh_cli = app_mgr.instantiate(ssh.Cli)
> -            ssh_cli.start()
> -
>      def _notify_best_path_changed(self, path, is_withdraw):
>          if not path.source:
>              # ours
>



-- 
Jaume Devesa
Software Engineer at Midokura
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to