next up previous contents
Next: Virtual Network Up: Neutron Previous: 重設 subnet pools   Contents

q-router 問題解決

  1. 載入管理者環境變變數。
    [root@controller ~]# . admin.token
    
  2. 問題:ip netns 列出 namspace,只有 qdhcp,沒有 qrouter。
    [root@ip110 ~]# ip netns list
    qdhcp-6809ccd8-9959-4294-aede-0261ec25c159 (id: 1)
    qdhcp-1ca17030-4dec-4e35-be69-725fb35d2b86 (id: 0)
    
  3. 查詢 neutron 相關的服務狀態,發現 neutron-linuxbridge-agent 無法啟動。
    [root@ip110 ~]# systemctl status neutron-linuxbridge-agent.service 
    ● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge Agent
       Loaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled;
     vendor preset: disabled)
       Active: failed (Result: start-limit) since Wed 2018-12-12 17:00:33 CST; 10s ago
      Process: 156682 ExecStart=/usr/bin/neutron-linuxbridge-agent --config-file 
    /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf 
    --config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini --config-dir 
    /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-linuxbridge-agent 
    --log-file /var/log/neutron/linuxbridge-agent.log (code=exited, status=1/FAILURE)
      Process: 156675 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)
     Main PID: 156682 (code=exited, status=1/FAILURE)
    
    Dec 12 17:00:32 ip110 systemd[1]: Unit neutron-linuxbridge-agent.service entered failed state.
    Dec 12 17:00:32 ip110 systemd[1]: neutron-linuxbridge-agent.service failed.
    Dec 12 17:00:33 ip110 systemd[1]: neutron-linuxbridge-agent.service holdoff time over, scheduling restart.
    Dec 12 17:00:33 ip110 systemd[1]: start request repeated too quickly for neutron-linuxbridge-agent.service
    Dec 12 17:00:33 ip110 systemd[1]: Failed to start OpenStack Neutron Linux Bridge Agent.
    Dec 12 17:00:33 ip110 systemd[1]: Unit neutron-linuxbridge-agent.service entered failed state.
    Dec 12 17:00:33 ip110 systemd[1]: neutron-linuxbridge-agent.service failed.
    
  4. 解決方式:降低 neutron 相關套件版本為 12.0.3。
    [root@ip110 ~]# yum downgrade python-neutron openstack-neutron-*
    [root@ip110 ~]# rpm -qa | grep neutron
    openstack-neutron-12.0.3-1.el7.noarch
    python-neutron-12.0.3-1.el7.noarch
    python2-neutronclient-6.7.0-1.el7.noarch
    openstack-neutron-common-12.0.3-1.el7.noarch
    python2-neutron-lib-1.13.0-1.el7.noarch
    openstack-neutron-linuxbridge-12.0.3-1.el7.noarch
    openstack-neutron-ml2-12.0.3-1.el7.noarch
    
  5. 編輯 /usr/lib/python2.7/site-packages/tenacity/__init__.py,如下註解 elif tornado... (無效再改回)。
    [root@ip110 ~]# vim /usr/lib/python2.7/site-packages/tenacity/__init__.py
    [root@ip110 ~]# grep 'tornado.gen' -A5 -B3 /usr/lib/python2.7/site-packages/tenacity/__init__.py
            def wrap(f):
                if asyncio and asyncio.iscoroutinefunction(f):
                    r = AsyncRetrying(*dargs, **dkw)
                #elif tornado and tornado.gen.is_coroutine_function(f):
                    r = TornadoRetrying(*dargs, **dkw)
                else:
                    r = Retrying(*dargs, **dkw)
    
                return r.wraps(f)
    
  6. 再重啟 neutron-linuxbridge-agent 服務,正常啟動。
    [root@ip110 ~]# systemctl restart neutron-linuxbridge-agent.service 
    [root@ip110 ~]# systemctl status neutron-linuxbridge-agent.service 
    ● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge Agent
       Loaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2018-12-12 17:22:00 CST; 16min ago
      Process: 159291 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)
     Main PID: 159298 (neutron-linuxbr)
        Tasks: 5
       CGroup: /system.slice/neutron-linuxbridge-agent.service
               ├─159298 /usr/bin/python2 /usr/bin/neutron-linuxbridge-agent --config-file /usr/share/neutron/neutron-dist.conf...
               ├─159320 sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
               └─159321 /usr/bin/python2 /usr/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
    
    Dec 12 17:21:59 ip110 systemd[1]: Starting OpenStack Neutron Linux Bridge Agent...
    Dec 12 17:21:59 ip110 neutron-enable-bridge-firewall.sh[159291]: net.bridge.bridge-nf-call-iptables = 1
    Dec 12 17:21:59 ip110 neutron-enable-bridge-firewall.sh[159291]: net.bridge.bridge-nf-call-ip6tables = 1
    Dec 12 17:22:00 ip110 systemd[1]: Started OpenStack Neutron Linux Bridge Agent.
    Dec 12 17:22:02 ip110 sudo[159320]:  neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap-daemo...p.conf
    Hint: Some lines were ellipsized, use -l to show in full.
    
  7. ip netns 列出 namspace,已出現 qrouter。
    [root@ip110 ~]# ip netns list
    qrouter-6c759b42-53f7-4ca7-bd8f-a861870b0f8c (id: 2)
    qdhcp-6809ccd8-9959-4294-aede-0261ec25c159 (id: 1)
    qdhcp-1ca17030-4dec-4e35-be69-725fb35d2b86 (id: 0)
    


De-Yu Wang 2018-12-12