Use py3 for CentOS
Unfortunatelly CentOS 7 do not have libvirt and guestfs libraries for py3, so isntead of symlinking them, we have to install devel package and build inside venv. Change-Id: Ie678e44c2369347cf0816cbcc4269de8eba7b963
This commit is contained in:
parent
1de7b24e70
commit
e72835e5ac
@ -61,6 +61,21 @@
|
|||||||
value: "{{ nova_venv_tag }}"
|
value: "{{ nova_venv_tag }}"
|
||||||
when: nova_install_method == 'source'
|
when: nova_install_method == 'source'
|
||||||
|
|
||||||
|
# NOTE(noonedeadpunk): This task can't be done in python_venv_build role
|
||||||
|
# because installation from file/url can't be used with constraints.
|
||||||
|
# Here we install packages which are missing in disto, so can't be
|
||||||
|
# symlinked inside venv.
|
||||||
|
- name: Install kvm pip packages
|
||||||
|
pip:
|
||||||
|
name: "{{ nova_compute_kvm_pip_packages }}"
|
||||||
|
virtualenv: "{{ nova_bin | dirname }}"
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- nova_install_method == 'source'
|
||||||
|
- nova_services['nova-compute']['group'] in group_names
|
||||||
|
- ansible_os_family | lower == 'redhat'
|
||||||
|
- ansible_distribution_major_version|int <= 7
|
||||||
|
|
||||||
- include_tasks: "consoles/nova_console_{{ nova_console_type }}_install.yml"
|
- include_tasks: "consoles/nova_console_{{ nova_console_type }}_install.yml"
|
||||||
when:
|
when:
|
||||||
- "nova_services['nova-novncproxy']['group'] in group_names or
|
- "nova_services['nova-novncproxy']['group'] in group_names or
|
||||||
|
@ -62,15 +62,22 @@ nova_compute_kvm_distro_packages:
|
|||||||
- libvirt-daemon-kvm
|
- libvirt-daemon-kvm
|
||||||
- "qemu-kvm{% if ansible_distribution_major_version|int <= 7 %}-ev{% endif %}"
|
- "qemu-kvm{% if ansible_distribution_major_version|int <= 7 %}-ev{% endif %}"
|
||||||
- libvirt-client
|
- libvirt-client
|
||||||
- libvirt-python
|
- "{{ (ansible_distribution_major_version|int <= 7) | ternary('libvirt-devel', 'python3-libvirt') }}"
|
||||||
- nfs-utils
|
- nfs-utils
|
||||||
- python-libguestfs
|
- "{{ (ansible_distribution_major_version|int <= 7) | ternary('libguestfs-devel', 'python3-libguestfs') }}"
|
||||||
- "qemu-img{% if ansible_distribution_major_version|int <= 7 %}-ev{% endif %}"
|
- "qemu-img{% if ansible_distribution_major_version|int <= 7 %}-ev{% endif %}"
|
||||||
- "{{ (ansible_architecture == 'aarch64') | ternary('AAVMF', 'OVMF') }}"
|
- "{{ (ansible_architecture == 'aarch64') | ternary('AAVMF', 'OVMF') }}"
|
||||||
|
|
||||||
nova_compute_kvm_packages_to_symlink:
|
nova_compute_kvm_packages_to_symlink: |-
|
||||||
- "{% if ansible_distribution_major_version|int <= 7 %}libvirt-python{% else %}python2-libvirt{% endif %}"
|
{% set packages = [] %}
|
||||||
- "python{% if ansible_distribution_major_version|int > 7 %}2{% endif %}-libguestfs"
|
{% if ansible_distribution_major_version|int > 7 %}
|
||||||
|
{% set _ = packages.extend(['python3-libvirt', 'python3-libguestfs']) %}
|
||||||
|
{% endif %}
|
||||||
|
{{ packages }}
|
||||||
|
|
||||||
|
nova_compute_kvm_pip_packages:
|
||||||
|
- http://download.libguestfs.org/python/guestfs-1.40.2.tar.gz
|
||||||
|
- libvirt-python
|
||||||
|
|
||||||
nova_compute_ksm_packages:
|
nova_compute_ksm_packages:
|
||||||
- ksmtuned
|
- ksmtuned
|
||||||
|
Loading…
Reference in New Issue
Block a user