summaryrefslogtreecommitdiffstats
path: root/patches/fuel-library/multiarch-fuel/0001-Make-qemu-kvm-architecture-aware.patch
blob: c5d3479add9478c70ca3ef9fff6ad3ae7b16d18b (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
31
32
33
34
35
36
37
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Enea AB, Cavium and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Date: Wed, 24 Feb 2016 20:07:06 +0100
Subject: [PATCH] Make qemu-kvm architecture aware

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

diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
index 3fcfb51..c53409c 100644
--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
@@ -167,9 +167,14 @@ class openstack_tasks::roles::compute {
   case $::osfamily {
     'RedHat': {
       # From legacy libvirt.pp
+      # Guard against some exotic distros with their `uname -m`
+      $arch = $::architecture ? {
+        /(arm64|aarch64)/ => 'aarch64',
+        default           => 'x86_64',
+      }
       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':