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

转载于:https://www.cnblogs.com/menkeyi/p/7064593.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值