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

  • 相关阅读:
    jQuery 笔记
    centos 项目上线shell脚本
    linux关于用户密码家目录总结
    python 写了一个批量拉取文件进excel文档
    css 选择器/table属性/type 属性
    表单
    html table
    html超文本标记语言
    mysql数据库1
    mysql数据库
  • 原文地址:https://www.cnblogs.com/menkeyi/p/7064593.html
Copyright © 2011-2022 走看看