diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-02-26 14:21:40 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-02-26 14:21:40 -0500 |
commit | 0fa8bfa1104b18aaed8afb720cf0fa8ad8b3ffa2 (patch) | |
tree | ee75ee5a646c106f7496321df6cd6162b02d4e53 | |
parent | 5acc36948efd4d1dc3d6d33bf2fb67ac4ac80ef6 (diff) | |
download | vyos-cloud-init-0fa8bfa1104b18aaed8afb720cf0fa8ad8b3ffa2.tar.gz vyos-cloud-init-0fa8bfa1104b18aaed8afb720cf0fa8ad8b3ffa2.zip |
SmartOS: do not run on arm as dmidecode causes problems
See LP: #1243287 for more information, but the easiest thing to do
here is just not run smartos on arm.
LP: #1243287
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 6 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 6 |
3 files changed, 13 insertions, 0 deletions
@@ -31,6 +31,7 @@ - Add GCE datasource [Vaidas Jablonskis] - Add native Openstack datasource which reads openstack metadata rather than relying on EC2 data in openstack metadata service. + - SmartOS: disable running on arm systems due to bug (LP: #1243287) 0.7.4: - fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a partitioned block device with target filesystem on ephemeral0.1. diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 8d4a16e6..3c30541c 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -174,6 +174,12 @@ class DataSourceSmartOS(sources.DataSource): LOG.debug("Host does not appear to be on SmartOS") return False + uname_arch = os.uname()[4] + if uname_arch.startswith("arm") or uname_arch == "aarch64": + # Disabling because dmidcode in dmi_data() crashes kvm process + LOG.debug("Disabling SmartOS datasource on arm (LP: #1243287)") + return False + dmi_info = dmi_data() if dmi_info is False: LOG.debug("No dmidata utility found") diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index 11d9a264..8f9fa27d 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -158,6 +158,11 @@ class TestSmartOSDataSource(helpers.FilesystemMockingTestCase): def _dmi_data(): return dmi_data + def _os_uname(): + # LP: #1243287. tests assume this runs, but running test on + # arm would cause them all to fail. + return ('LINUX', 'NODENAME', 'RELEASE', 'VERSION', 'x86_64') + if sys_cfg is None: sys_cfg = {} @@ -168,6 +173,7 @@ class TestSmartOSDataSource(helpers.FilesystemMockingTestCase): self.apply_patches([(mod, 'LEGACY_USER_D', self.legacy_user_d)]) self.apply_patches([(mod, 'get_serial', _get_serial)]) self.apply_patches([(mod, 'dmi_data', _dmi_data)]) + self.apply_patches([(os, 'uname', _os_uname)]) dsrc = mod.DataSourceSmartOS(sys_cfg, distro=None, paths=self.paths) return dsrc |