Instalação incompleta de Neutron de Juju

2

Instalamos o Openstack em nós distribuídos usando o Juju + MAAS. Tudo parece bem, mas o Neutron cli não responde.

user@controller:~$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
user@controller:~$
user@controller:~$ neutron --version
2.3.4
user@controller:~$
user@controller:~$ neutron net-list
Connection to neutron failed: (504, 'Gateway Timeout')
user@controller:~$

Se pressionarmos CRTL + C, obteremos:

user@controller:~$ neutron net-list
^CTraceback (most recent call last):
 File "/usr/bin/neutron", line 10, in <module>
   sys.exit(main())
<snip>
File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 239, in authenticate
   content_type="application/json")
 File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 146, in _cs_request
   resp, body = self.request(*args, **kargs)
 File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1569, in request
   (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
 File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1316, in _request
   (response, content) = self._conn_request(conn, request_uri, method, body, headers)
 File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1251, in _conn_request
   conn.connect()
 File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 900, in connect
   self.sock.connect((self.host, self.port) + sa[2:])
 File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 424, in connect
   self.__negotiatehttp(destpair[0], destpair[1])
 File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 374, in __negotiatehttp
   resp = self.recv(1)
KeyboardInterrupt

Em termos de conectividade, todos os serviços estão na mesma LAN e podemos fazer ping / ssh em todos os nós. Alguns logs de solução de problemas:

ubuntu@juju-machine-13-lxc-4:~$ cat /var/log/neutron/server.log | grep WARNING
<snip>
2015-05-12 04:21:47.680 32427 WARNING neutron.openstack.common.db.sqlalchemy.session [-] This application has not enabled MySQL traditional mode, which means silent data corruption may occur. Please encourage the application developers to enable this mode.
2015-05-12 04:21:48.386 32427 WARNING neutron.api.extensions [req-42b7d5c5-813d-470d-9a06-21e675c78ae5 None] Extension allowed-address-pairs not supported by any of loaded plugins
2015-05-12 04:21:48.398 32427 WARNING neutron.api.extensions [req-42b7d5c5-813d-470d-9a06-21e675c78ae5 None] Extension flavor not supported by any of loaded plugins
2015-05-12 04:21:48.415 32427 WARNING neutron.api.extensions [req-42b7d5c5-813d-470d-9a06-21e675c78ae5 None] Extension port-security not supported by any of loaded plugins
2015-05-12 04:21:48.419 32427 WARNING neutron.api.extensions [req-42b7d5c5-813d-470d-9a06-21e675c78ae5 None] Extension routed-service-insertion not supported by any of loaded plugins
2015-05-12 04:21:48.420 32427 WARNING neutron.api.extensions [req-42b7d5c5-813d-470d-9a06-21e675c78ae5 None] Extension router-service-type not supported by any of loaded plugins
2015-05-12 04:21:48.424 32427 WARNING neutron.api.extensions [req-42b7d5c5-813d-470d-9a06-21e675c78ae5 None] Extension security-group not supported by any of loaded plugins
2015-05-12 04:21:48.461 32427 WARNING keystoneclient.middleware.auth_token [-] Configuring auth_uri to point to the public identity endpoint is required; clients may not be able to authenticate against an admin endpoint

Configuração do Neutron:

ubuntu@juju-machine-13-lxc-4:~$ sudo cat /etc/neutron/neutron.conf
# icehouse
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
## Restart trigger None
###############################################################################
<snip>
[keystone_authtoken]
signing_dir = /var/cache/neutron
service_protocol = http
service_host = 10.0.0.21
service_port = 5000
auth_host = 10.0.0.21
auth_port = 35357
auth_protocol =  http
admin_tenant_name = services
admin_user = quantum
admin_password = GY4BYj8M5Rx3FymxkJzMmbHcnVBTsxMG35nBJpN8VRcx3zxMbx6F4tBNbL4jTwyP
[database]
connection = mysql://neutron:[email protected]/neutron
max_pool_size = 256

Notamos que não temos auth_uri em api-paste.ini

ubuntu@juju-machine-13-lxc-4:~$ sudo cat /etc/neutron/api-paste.ini
<snip>
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

Então adicionamos ao api-paste.ini o seguinte, que limpou o aviso auth_uri.

auth_host = 10.0.0.21
auth_uri = http://10.0.0.21:5000/v2.0
admin_tenant_name = services
admin_user = quantum
admin_password = GY4BYj8M5Rx3FymxkJzMmbHcnVBTsxMG35nBJpN8VRcx3zxMbx6F4tBNbL4jTwyP

No Horizon, inicialmente, tivemos os seguintes agentes de rede:

  • Abra o agente vSwitch

Executamos o seguinte no nó da rede:

ubuntu@juju-machine-13-lxc-4:~$ sudo apt-get install neutron-server neutron-dhcp-agent neutron-plugin-openvswitch-agent neutron-l3-agent
Reading package lists… Done
<snip>

Que adicionou alguns agentes de rede:

  • Abra o agente vSwitch
  • Agente de metadados
  • Agente DHCP

Mas isso não esclareceu os outros avisos e ainda não vemos agente L3 nem podemos executar comandos Neutron cli. Alguma pista?

ubuntu@juju-machine-13-lxc-4:~$ dpkg -l | grep neutron
ii  neutron-common                   1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - common
ii  neutron-dhcp-agent               1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - DHCP agent
ii  neutron-l3-agent                 1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - l3 agent
ii  neutron-metadata-agent           1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - metadata agent
ii  neutron-plugin-ml2               1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - ML2 plugin
ii  neutron-plugin-openvswitch-agent 1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - Open vSwitch plugin agent
ii  neutron-server                   1:2014.1.4-0ubuntu2              all          Neutron is a virtual network service for Openstack - server
ii  python-neutron                   1:2014.1.4-0ubuntu2              all          Neutron is a virutal network service for Openstack - Python library
ii  python-neutronclient             1:2.3.4-0ubuntu1                 all          client - Neutron is a virtual network service for Openstack
ubuntu@juju-machine-13-lxc-4:~$

Obtemos o mesmo resultado com diferentes combinações de charme:

  • charme de gateway quântico e configuração de network-manager como Neutron quando executando o controlador de nova-nuvem-charme neutrron-api e

  • encadeamentos de neutron-openvswitch com e sem gerenciador de rede como o Neutron ao executar o charme nova-cloud-controller

Obrigado

    
por Nicolas Leiva 12.05.2015 / 17:42

0 respostas