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

  • 相关阅读:
    TP5.1 遇见问题整理
    PDO 基础
    php7 连接 mysql 的两种方式
    [php] 添加接口访问日志(文件)
    curl 向远程服务器传输file文件
    VBoxManage
    linux 系统下安装多个php版本
    vim中文乱码问题
    vim 翻页命令
    php list()函数
  • 原文地址:https://www.cnblogs.com/menkeyi/p/7064593.html
Copyright © 2011-2022 走看看