zoukankan      html  css  js  c++  java
  • dhcp 提示could not load neutron.agent

    错误日志如下:

    N版存在问题,其它版本不知道

    解决方法(代码问题):

    /usr/lib/python2.7/site-packages/neutron/common/utils.py

    在这个方法上(def load_class_by_alias_or_classname)面增加下面代码:

    class _SilentDriverManager(driver.DriverManager):
        """The lamest of hacks to allow us to pass a kwarg to DriverManager parent.
    
        DriverManager doesn't accept the warn_on_missing_entrypoint param
        to pass to its parent on __init__ so we mirror the __init__ here and bypass
        the one in DriverManager in order to silence the warnings.
        TODO(kevinbenton): remove once Ia6f5f749fc2f73ca6091fa6d58506fddb058902a
        is released or we stop supporting loading by class path.
        """
        def __init__(self, namespace, name):
            p = super(driver.DriverManager, self)  # pylint: disable=bad-super-call
            p.__init__(
                namespace=namespace, names=[name],
                on_load_failure_callback=self._default_on_load_failure,
                warn_on_missing_entrypoint=False
            )

    在修改下这个方法def load_class_by_alias_or_classname:

    mgr = driver.DriverManager(namespace, name)
    将上面代码改成下面 
    mgr = _SilentDriverManager(namespace, name)

    重启服务即可:

    systemctl restart neutron-dhcp-agent.service  neutron-metadata-agent.service

  • 相关阅读:
    array_flip
    qy Undefied index报错
    strip_tag
    query使用
    tp5 sql 大于小于
    OfficeTools.OnlineEditWord
    OCX控件打包成CAB并实现数字签名过程
    使用css技术代替传统的frame技术
    delphi常用函数和方法
    js正则表达使用实例
  • 原文地址:https://www.cnblogs.com/menkeyi/p/7064593.html
Copyright © 2011-2022 走看看