XenAPI: use dom0's hostname for nova-compute
When the virt dirver is xenapi, we should explicitly specify host with dom0's hostname for nova-compute. The host field should be same as neutron-openvswitch-agent-xenapi. In order to use dom0's hostname, we need pull the bootstrap_xenapi to before running nova config tasks. The dom0's hostname will be included in the XenAPI facts. Change-Id: Ibfc964bbd6c569062ad33c1399f9a4612baf5b92 blueprint: xenserver-support
This commit is contained in:
parent
2c13a5f258
commit
3b89a7d466
@ -48,8 +48,3 @@
|
|||||||
|
|
||||||
- include: bootstrap_service.yml
|
- include: bootstrap_service.yml
|
||||||
when: database.changed or use_preconfigured_databases | bool
|
when: database.changed or use_preconfigured_databases | bool
|
||||||
|
|
||||||
- include: bootstrap_xenapi.yml
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
- nova_compute_virt_type == "xenapi"
|
|
||||||
|
@ -55,6 +55,13 @@
|
|||||||
notify:
|
notify:
|
||||||
- "Restart {{ item.key }} container"
|
- "Restart {{ item.key }} container"
|
||||||
|
|
||||||
|
- name: Set XenAPI facts
|
||||||
|
set_fact:
|
||||||
|
xenapi_facts: "{{ lookup('file', xenapi_facts_root + '/' + inventory_hostname + '/' + xenapi_facts_file) | from_json }}"
|
||||||
|
when:
|
||||||
|
- nova_compute_virt_type == 'xenapi'
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
|
||||||
- name: Copying over nova.conf
|
- name: Copying over nova.conf
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
- include: register.yml
|
- include: register.yml
|
||||||
when: inventory_hostname in groups['nova-api']
|
when: inventory_hostname in groups['nova-api']
|
||||||
|
|
||||||
|
- include: bootstrap_xenapi.yml
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
- nova_compute_virt_type == "xenapi"
|
||||||
|
|
||||||
- include: config.yml
|
- include: config.yml
|
||||||
|
|
||||||
- include: config-nova-fake.yml
|
- include: config-nova-fake.yml
|
||||||
|
@ -35,6 +35,9 @@ compute_driver = fake.FakeDriver
|
|||||||
compute_driver = vmwareapi.VMwareVCDriver
|
compute_driver = vmwareapi.VMwareVCDriver
|
||||||
{% elif nova_compute_virt_type == 'xenapi' %}
|
{% elif nova_compute_virt_type == 'xenapi' %}
|
||||||
compute_driver = xenapi.XenAPIDriver
|
compute_driver = xenapi.XenAPIDriver
|
||||||
|
{% if service_name == 'nova-compute' %}
|
||||||
|
host = xenapi_facts['dom0_hostname']
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
compute_driver = libvirt.LibvirtDriver
|
compute_driver = libvirt.LibvirtDriver
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user