aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch
blob: 01cbdf830805e03b7652106db5ecf74524340b11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
Date: Wed, 24 Feb 2016 20:07:06 +0100
Subject: [PATCH] Make qemu-kvm architecture aware

---
 deployment/puppet/openstack/manifests/compute.pp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/deployment/puppet/openstack/manifests/compute.pp b/deployment/puppet/openstack/manifests/compute.pp
index b2339bc..ca1b2c4 100644
--- a/deployment/puppet/openstack/manifests/compute.pp
+++ b/deployment/puppet/openstack/manifests/compute.pp
@@ -169,10 +169,15 @@ class openstack::compute (
         before  => Augeas['libvirt-conf'],
       }
 
+      # Guard against some exotic distros with their `uname -m`
+      $arch = $::architecture ? {
+        /(arm64|aarch64)/ => 'aarch64',
+        default           => 'x86_64',
+      }
       # From legacy libvirt.pp
       exec { 'symlink-qemu-kvm':
-        command => '/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64',
-        creates => '/usr/bin/qemu-system-x86_64',
+        command => "/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-${arch}",
+        creates => "/usr/bin/qemu-system-${arch}",
       }
 
       package { 'avahi':