Merge ~rjschwei/cloud-init:dmidecodeAARCH64 into cloud-init:master

Proposed by Robert Schweikert
Status: Merged
Merged at revision: 3416e2ee7f65defdb15aab861a85767d13e8c34c
Proposed branch: ~rjschwei/cloud-init:dmidecodeAARCH64
Merge into: cloud-init:master
Diff against target: 27 lines (+3/-2)
2 files modified
cloudinit/util.py (+2/-1)
tests/unittests/test_util.py (+1/-1)
Reviewer Review Type Date Requested Status
Scott Moser Needs Information
Review via email: mp+309628@code.launchpad.net

Description of the change

aarch64 supports dmidecode

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

We were specifically not booting on arm because of
 bug https://bugs.launchpad.net/qemu/+bug/1243287

thats what the original checks came to fix. We're sure that that is ok for aarch64?

review: Needs Information
Revision history for this message
Robert Schweikert (rjschwei) wrote :

On 10/31/2016 03:32 PM, Scott Moser wrote:
> Review: Needs Information
>
> We were specifically not booting on arm because of
> bug https://bugs.launchpad.net/qemu/+bug/1243287
>
> thats what the original checks came to fix. We're sure that that is ok for aarch64?
>

Yes, the guys working on ARM for SLES filed a bug about this and I did
verify on an aarch64 system. With SLES 12 SP2 installed I was able to
have dmidecode output.

Thus demidecode is available and I would think it will trickle into all
distros.

Later,
Robert

--
Robert Schweikert MAY THE SOURCE BE WITH YOU
Public Cloud Architect LINUX
<email address hidden>
IRC: robjo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/util.py b/cloudinit/util.py
2index 4b3fd0c..9a3d3cd 100644
3--- a/cloudinit/util.py
4+++ b/cloudinit/util.py
5@@ -2342,7 +2342,8 @@ def read_dmi_data(key):
6 # running dmidecode can be problematic on some arches (LP: #1243287)
7 uname_arch = os.uname()[4]
8 if not (uname_arch == "x86_64" or
9- (uname_arch.startswith("i") and uname_arch[2:] == "86")):
10+ (uname_arch.startswith("i") and uname_arch[2:] == "86") or
11+ uname_arch == 'aarch64'):
12 LOG.debug("dmidata is not supported on %s", uname_arch)
13 return None
14
15diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
16index 881509a..f6a8ab7 100644
17--- a/tests/unittests/test_util.py
18+++ b/tests/unittests/test_util.py
19@@ -386,7 +386,7 @@ class TestReadDMIData(helpers.FilesystemMockingTestCase):
20 dmi_name = 'use-dmidecode'
21 self._configure_dmidecode_return(dmi_name, dmi_val)
22
23- expected = {'armel': None, 'aarch64': None, 'x86_64': dmi_val}
24+ expected = {'armel': None, 'aarch64': dmi_val, 'x86_64': dmi_val}
25 found = {}
26 # we do not run the 'dmi-decode' binary on some arches
27 # verify that anything requested that is not in the sysfs dir

Subscribers

People subscribed via source and target branches