Added files for automatic deployment.
[armband.git] / patches / fuel-library / 0003-Make-qemu-kvm-architecture-aware.patch
1 From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
2 Date: Wed, 24 Feb 2016 20:07:06 +0100
3 Subject: [PATCH] Make qemu-kvm architecture aware
4
5 ---
6  deployment/puppet/openstack/manifests/compute.pp | 9 +++++++--
7  1 file changed, 7 insertions(+), 2 deletions(-)
8
9 diff --git a/deployment/puppet/openstack/manifests/compute.pp b/deployment/puppet/openstack/manifests/compute.pp
10 index b2339bc..ca1b2c4 100644
11 --- a/deployment/puppet/openstack/manifests/compute.pp
12 +++ b/deployment/puppet/openstack/manifests/compute.pp
13 @@ -169,10 +169,15 @@ class openstack::compute (
14          before  => Augeas['libvirt-conf'],
15        }
16  
17 +      # Guard against some exotic distros with their `uname -m`
18 +      $arch = $::architecture ? {
19 +        /(arm64|aarch64)/ => 'aarch64',
20 +        default           => 'x86_64',
21 +      }
22        # From legacy libvirt.pp
23        exec { 'symlink-qemu-kvm':
24 -        command => '/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64',
25 -        creates => '/usr/bin/qemu-system-x86_64',
26 +        command => "/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-${arch}",
27 +        creates => "/usr/bin/qemu-system-${arch}",
28        }
29  
30        package { 'avahi':