diff options
author | Charalampos Kominos <Charalampos.Kominos@enea.com> | 2018-03-13 17:33:21 +0100 |
---|---|---|
committer | Charalampos Kominos <Charalampos.Kominos@enea.com> | 2018-03-26 12:54:03 +0200 |
commit | 075143e95d5b42d615ab7c81446095746e1f0064 (patch) | |
tree | 8d4cccf09d19c86a9912e0ddcd4b37c1f687a6d7 /patches | |
parent | 5f808291d18c27a2c9bbf6b0b5094af2fa660334 (diff) |
[p/openstack.nova] Allow creation of pty on aarch64
Armband uses openstack packages from Ubuntu. Those packages
are configured to work with other packages from UCA repos. Since
ARMband uses newer versions of certain packages than those in UCA
(libvirt) we can allow different config without breaking anything.
JIRA: ARMBAND-352
Change-Id: I8f8947c3fca3b5239edb5089d3b54d0d159b4dc8
Signed-off-by: Charalampos Kominos <charalampos.kominos@enea.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch | 90 |
1 files changed, 89 insertions, 1 deletions
diff --git a/patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch index c1f1b03e..ecf5c6ba 100644 --- a/patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch +++ b/patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch @@ -85,7 +85,7 @@ new file mode 100644 index 00000000..36ddf72b --- /dev/null +++ b/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff -@@ -0,0 +1,76 @@ +@@ -0,0 +1,163 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +Date: Thu, 24 Aug 2017 10:57:28 +0200 +Subject: [PATCH] libvirt: AArch64: ACPI depends on AAVMF @@ -162,6 +162,94 @@ index 00000000..36ddf72b + elif CONF.spice.enabled: + video.type = 'qxl' + if image_meta.properties.get('hw_video_model'): ++--- ++ ++From ac6d3cd85ffe94115f15134406ba0d366e938764 Mon Sep 17 00:00:00 2001 ++From: Charalampos Kominos <Charalampos.Kominos@enea.com> ++Date: Tue, 13 Mar 2018 17:02:56 +0100 ++ ++Subject: [PATCH] openstack:nova: Allow nova to create a pty device for aarch64VM ++Armband uses openstack packages from canonical. Those packages ++are configured to work with other packages from UCA repos. Since ++ARMband uses newer versions of certain packages than those in UCA ++(libvirt) we can force different config without breaking anything. ++ ++JIRA: ARMBAND-352 ++ ++Signed-off-by: Charalampos Kominos <charalampos.kominos@enea.com> ++--- ++ ++--- a/nova/virt/libvirt/driver.py +++++ b/nova/virt/libvirt/driver.py ++@@ -4615,13 +4615,11 @@ ++ self._is_s390x_guest(image_meta)): ++ self._create_consoles_s390x(guest_cfg, instance, ++ flavor, image_meta) ++- elif (virt_type in ("qemu", "kvm") and ++- self._is_arm_guest(image_meta)): ++- # NOTE(jamespage): libvirt 2.5.0 as shipped in Ubuntu zesty ++- # and the Pike UCA needs to be configured ++- # for compatibility on arm64. ++- self._create_consoles_arm(guest_cfg, instance, ++- flavor, image_meta) +++ +++ #ARMband: Canonical applies a patch to align with libvirt 2.5.0 in UCA repos +++ # which breaks the console on aarch64. Since ARMband uses a newer +++ # we can safely revert that chagne libvirt version +++ ++ elif virt_type in ("qemu", "kvm"): ++ self._create_consoles_qemu_kvm(guest_cfg, instance, ++ flavor, image_meta) ++@@ -4630,12 +4628,6 @@ ++ s390x_archs = (fields.Architecture.S390, fields.Architecture.S390X) ++ return libvirt_utils.get_arch(image_meta) in s390x_archs ++ ++- def _is_arm_guest(self, image_meta): ++- arm_archs = (fields.Architecture.AARCH64, ++- fields.Architecture.ARMV7B, ++- fields.Architecture.ARMV7) ++- return libvirt_utils.get_arch(image_meta) in arm_archs ++- ++ def _create_consoles_qemu_kvm(self, guest_cfg, instance, flavor, ++ image_meta): ++ char_dev_cls = vconfig.LibvirtConfigGuestSerial ++@@ -4665,25 +4657,6 @@ ++ "sclplm") ++ self._create_pty_device(guest_cfg, char_dev_cls, "sclp", log_path) ++ ++- def _create_consoles_arm(self, guest_cfg, instance, flavor, image_meta): ++- char_dev_cls = vconfig.LibvirtConfigGuestConsole ++- log_path = self._get_console_log_path(instance) ++- if CONF.serial_console.enabled: ++- if not self._serial_ports_already_defined(instance): ++- num_ports = hardware.get_number_of_serial_ports(flavor, ++- image_meta) ++- self._check_number_of_serial_console(num_ports) ++- self._create_serial_consoles(guest_cfg, num_ports, ++- char_dev_cls, log_path) ++- else: ++- # NOTE(jamespage): Force creation of file device for compatibility ++- # with aarch64 + libvirt 2.5.0 ++- self._create_file_device(guest_cfg, instance, char_dev_cls, ++- force=True) ++- # NOTE(jamespage): Skip creation of pty devices; they only work with ++- # the virtio driver which does not capture early ++- # boot on aarch64 ++- ++ def _create_pty_device(self, guest_cfg, char_dev_cls, target_type=None, ++ log_path=None): ++ def _create_base_dev(): ++@@ -4721,8 +4721,8 @@ ++ guest_cfg.add_device(_create_base_dev()) ++ ++ def _create_file_device(self, guest_cfg, instance, char_dev_cls, ++- target_type=None, force=False): ++- if self._is_virtlogd_available() and not force: +++ target_type=None): +++ if self._is_virtlogd_available(): ++ return ++ ++ consolelog = char_dev_cls() diff --git a/mcp/salt-formulas/armband/init.sls b/mcp/salt-formulas/armband/init.sls new file mode 100644 index 00000000..8a8cf2ab |