Merge "Revert "[p/openstack.nova] Allow creation of pty on aarch64""
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 5 Apr 2018 20:40:15 +0000 (20:40 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 5 Apr 2018 20:40:15 +0000 (20:40 +0000)
1  2 
patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch

@@@ -56,10 -56,10 +56,10 @@@ index 4f3760f6..115a56c1 10075
   salt -C 'I@mongodb:server and *01*' state.sls mongodb || true
   wait_for 10 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'"
  diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha
 -index 9fc30bbf..998fc6b4 100755
 +index 4c8cbcf8..1cf54240 100755
  --- a/mcp/config/states/openstack_noha
  +++ b/mcp/config/states/openstack_noha
 -@@ -52,6 +52,8 @@ salt -I 'ceilometer:agent' state.sls ceilometer
 +@@ -53,6 +53,8 @@ salt -I 'ceilometer:agent' state.sls ceilometer
  
   salt -I 'horizon:server' state.sls horizon
  
@@@ -69,7 -69,7 +69,7 @@@
   salt -I 'horizon:server' file.symlink \
     /var/lib/openstack-dashboard/static \
  diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane
 -index 80c0c87e..144245f9 100755
 +index c391cfe6..02a813c9 100755
  --- a/mcp/config/states/virtual_control_plane
  +++ b/mcp/config/states/virtual_control_plane
  @@ -27,6 +27,7 @@ if [ "${ERASE_ENV}" -eq 1 ]; then
@@@ -85,7 -85,7 +85,7 @@@ new file mode 10064
  index 00000000..36ddf72b
  --- /dev/null
  +++ b/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff
- @@ -0,0 +1,163 @@
+ @@ -0,0 +1,76 @@
  +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
  +Date: Thu, 24 Aug 2017 10:57:28 +0200
  +Subject: [PATCH] libvirt: AArch64: ACPI depends on AAVMF
  +         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