Você precisa alterar o /etc/nova/nova-compute.conf em vez do nova.conf. Geralmente existe um valor virt-type = kvm
Ubuntu Trusty 14.04.2 LTS no controlador MAAS e usando o Juju, o Dashboard e o console juju-gui.
Não importa o que eu tente, não consigo criar uma instância. Parece que eu tenho um agendador de novas e quatro hipervisores disponíveis, mas talvez o agendador não possa ser alcançado. A imagem foi baixada de Imagens em nuvem: trusty-server-cloudimg-amd64- disk1.img Como esta é uma nuvem completamente privada, não estou usando nenhum dos serviços relacionados ao Neutron, pelo que vale a pena.
me@controller:~$ nova service-list
+----------------+----------------------+----------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----------------+----------------------+----------+---------+-------+----------------------------+-----------------+
| nova-cert | juju-machine-3-lxc-1 | internal | enabled | up | 2015-09-23T20:09:35.000000 | - |
| nova-conductor | juju-machine-3-lxc-1 | internal | enabled | up | 2015-09-23T20:09:36.000000 | - |
| nova-scheduler | juju-machine-3-lxc-1 | internal | enabled | up | 2015-09-23T20:09:35.000000 | - |
| nova-compute | psi | nova | enabled | up | 2015-09-23T20:09:31.000000 | - |
| nova-compute | gamma | nova | enabled | up | 2015-09-23T20:09:35.000000 | - |
| nova-compute | delta | nova | enabled | up | 2015-09-23T20:09:38.000000 | - |
| nova-network | psi | internal | enabled | up | 2015-09-23T20:09:33.000000 | - |
| nova-network | gamma | internal | enabled | up | 2015-09-23T20:09:36.000000 | - |
| nova-network | delta | internal | enabled | up | 2015-09-23T20:09:38.000000 | - |
| nova-compute | chi | nova | enabled | up | 2015-09-23T20:09:29.000000 | - |
| nova-network | chi | internal | enabled | up | 2015-09-23T20:09:29.000000 | - |
+----------------+----------------------+----------+---------+-------+----------------------------+-----------------+
.
me@controller:~$ nova host-list
+----------------------+-----------+----------+
| host_name | service | zone |
+----------------------+-----------+----------+
| juju-machine-3-lxc-1 | cert | internal |
| juju-machine-3-lxc-1 | conductor | internal |
| juju-machine-3-lxc-1 | scheduler | internal |
| psi | compute | nova |
| gamma | compute | nova |
| delta | compute | nova |
| psi | network | internal |
| gamma | network | internal |
| delta | network | internal |
| chi | compute | nova |
| chi | network | internal |
+----------------------+-----------+----------+
.
me@controller:~$ nova hypervisor-list
+----+---------------------+
| ID | Hypervisor hostname |
+----+---------------------+
| 1 | psi.maas |
| 2 | gamma.maas |
| 3 | delta.maas |
| 4 | chi.maas |
+----+---------------------+
.
me@controller:~$ nova hypervisor-stats
+----------------------+-------+
| Property | Value |
+----------------------+-------+
| count | 4 |
| current_workload | 0 |
| disk_available_least | 312 |
| free_disk_gb | 365 |
| free_ram_mb | 9818 |
| local_gb | 365 |
| local_gb_used | 0 |
| memory_mb | 11866 |
| memory_mb_used | 2048 |
| running_vms | 0 |
| vcpus | 8 |
| vcpus_used | 0 |
+----------------------+-------+
.
me@controller:~$ glance image-show a21494c2-781d-4c55-a540-205bd5fb95c1
+-------------------------+--------------------------------------+
| Property | Value |
+-------------------------+--------------------------------------+
| Property 'architecture' | x86_64 |
| Property 'description' | trusty amd64 x86_64 |
| checksum | b5166b7ad4daea665e5d30bd5080f7fd |
| container_format | bare |
| created_at | 2015-09-23T19:15:14.000000 |
| deleted | False |
| disk_format | qcow2 |
| id | a21494c2-781d-4c55-a540-205bd5fb95c1 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | trusty-amd64-x86_64 |
| owner | 76f1f9f5be51439ab09252c9f2dfa443 |
| protected | False |
| size | 258540032 |
| status | active |
| updated_at | 2015-09-23T19:22:06.000000 |
+-------------------------+--------------------------------------+
No painel, a mensagem de erro é:
Error: Failed to perform requested operation on instance "small-1", the instance has an error status: Please try again later [Error: No valid host was found. Exceeded max scheduling attempts 3 for instance fb050155-be21-4dcc-89f2-0730e5dfc5db. Last exception: [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2235, in _do].
Tentando rever o status desse novo condutor:
me@controller:~$ juju status nova-cloud-controller
environment: private
machines:
"3":
agent-state: started
agent-version: 1.24.5
dns-name: delta.maas
instance-id: /MAAS/api/1.0/nodes/node-1884bef4-609f-11e5-aa64-001d097b3221/
series: trusty
containers:
3/lxc/1:
agent-state: started
agent-version: 1.24.5
dns-name: 10.100.100.56
instance-id: juju-machine-3-lxc-1
series: trusty
hardware: arch=amd64
hardware: arch=amd64 cpu-cores=2 mem=4096M
services:
nova-cloud-controller:
charm: cs:trusty/nova-cloud-controller-60
can-upgrade-to: cs:trusty/nova-cloud-controller-62
exposed: false
service-status:
current: unknown
since: 22 Sep 2015 10:55:37-07:00
relations:
amqp:
- rabbitmq-server
cinder-volume-service:
- cinder
cloud-compute:
- nova-compute
cluster:
- nova-cloud-controller
identity-service:
- keystone
image-service:
- glance
shared-db:
- mysql
units:
nova-cloud-controller/0:
workload-status:
current: unknown
since: 22 Sep 2015 10:55:37-07:00
agent-status:
current: idle
since: 23 Sep 2015 11:53:14-07:00
version: 1.24.5
agent-state: started
agent-version: 1.24.5
machine: 3/lxc/1
open-ports:
- 3333/tcp
- 8773/tcp
- 8774/tcp
public-address: 10.100.100.56
networks:
maas-eth0:
provider-id: maas-eth0
cidr: 10.100.100.0/24
No que é suposto ser o nó nova-scheduler:
ubuntu@machine3: sudo cat /var/log/nova/nova-compute.log
2015-09-22 17:49:34.045 43291 ERROR oslo_messaging._drivers.impl_rabbit [req-9acbcd62-a66b-4b9f-a7bc-9253c6d26d9d - - - - -] AMQP server on 127.0.0.1:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 2 seconds.
2015-09-22 17:57:20.144 66453 WARNING nova.conductor.api [req-37c37533-4c68-42d2-9444-ba5fc4ae1666 - - - - -] Timed out waiting for nova-conductor. Is it running? Or did this service start before nova-conductor? Reattempting establishment of nova-conductor connection...
2015-09-22 18:01:26.145 76457 WARNING nova.virt.libvirt.driver [req-f8bc084a-d627-4463-91c2-521b421e075f - - - - -] Cannot update service status on host "delta" since it is not registered.
2015-09-22 18:01:27.002 76457 WARNING nova.compute.resource_tracker [req-f8bc084a-d627-4463-91c2-521b421e075f - - - - -] No compute node record for delta:delta.maas
2015-09-22 18:01:27.913 76457 INFO oslo_messaging._drivers.impl_rabbit [req-f8bc084a-d627-4463-91c2-521b421e075f - - - - -] Connecting to AMQP server on 10.100.100.58:5672
Eu tentei mudar o tipo virt para qemu no Dashboard, mas essa configuração não parece estar indo para os arquivos /etc/nova/nova.conf nos quatro hipervisores. Eu o defino manualmente nos quatro hypervisors via ssh, mas ele volta para o layout anterior, que não inclui a linha após [libvirt]:
virt-type = qemu
Você precisa alterar o /etc/nova/nova-compute.conf em vez do nova.conf. Geralmente existe um valor virt-type = kvm