diff --git a/0001-downgrade-the-version-of-qemu-from-4.2.0-to-4.1.0.patch b/0001-downgrade-the-version-of-qemu-from-4.2.0-to-4.1.0.patch deleted file mode 100644 index 62e4decfe7d848d5b284bd42dde79248b369e3b1..0000000000000000000000000000000000000000 --- a/0001-downgrade-the-version-of-qemu-from-4.2.0-to-4.1.0.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 61fdc7d0caa978864e196a48d06ff262f7c78dc9 Mon Sep 17 00:00:00 2001 -From: FFrog -Date: Thu, 9 Sep 2021 19:35:41 +0800 -Subject: [PATCH] downgrade the version of qemu from 4.2.0 to 4.1.0 - ---- - nova/virt/libvirt/driver.py | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py -index 8ee8757..e447b85 100644 ---- a/nova/virt/libvirt/driver.py -+++ b/nova/virt/libvirt/driver.py -@@ -213,7 +213,7 @@ patch_tpool_proxy() - # - # DO NOT FORGET to update this document when touching any versions below! - MIN_LIBVIRT_VERSION = (6, 0, 0) --MIN_QEMU_VERSION = (4, 2, 0) -+MIN_QEMU_VERSION = (4, 1, 0) - NEXT_MIN_LIBVIRT_VERSION = (7, 0, 0) - NEXT_MIN_QEMU_VERSION = (5, 2, 0) - -@@ -234,6 +234,10 @@ VGPU_RESOURCE_SEMAPHORE = 'vgpu_resources' - - LIBVIRT_PERF_EVENT_PREFIX = 'VIR_PERF_PARAM_' - -+# -blockdev support (replacing -drive) -+MIN_LIBVIRT_BLOCKDEV = (6, 0, 0) -+MIN_QEMU_BLOCKDEV = (4, 2, 0) -+ - # VDPA interface support - MIN_LIBVIRT_VDPA = (6, 9, 0) - MIN_QEMU_VDPA = (5, 1, 0) -@@ -2092,7 +2096,23 @@ class LibvirtDriver(driver.ComputeDriver): - guest.delete_configuration(support_uefi) - - try: -- dev.copy(conf.to_xml(), reuse_ext=True) -+ # NOTE(lyarwood): Use virDomainBlockCopy from libvirt >= 6.0.0 -+ # and QEMU >= 4.2.0 with -blockdev domains allowing QEMU to -+ # copy to remote disks. -+ if self._host.has_min_version(lv_ver=MIN_LIBVIRT_BLOCKDEV, -+ hv_ver=MIN_QEMU_BLOCKDEV): -+ dev.copy(conf.to_xml(), reuse_ext=True) -+ else: -+ # TODO(lyarwood): Remove the following use of -+ # virDomainBlockRebase once MIN_LIBVIRT_VERSION hits >= -+ # 6.0.0 and MIN_QEMU_VERSION hits >= 4.2.0. -+ # Start copy with VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT flag to -+ # allow writing to existing external volume file. Use -+ # VIR_DOMAIN_BLOCK_REBASE_COPY_DEV if it's a block device -+ # to make sure XML is generated correctly (bug 1691195) -+ copy_dev = conf.source_type == 'block' -+ dev.rebase(conf.source_path, copy=True, reuse_ext=True, -+ copy_dev=copy_dev) - - while not dev.is_job_complete(): - time.sleep(0.5) --- -2.27.0 - diff --git a/Fixes-aarch64-incorrect-cpu-model.patch b/Fixes-aarch64-incorrect-cpu-model.patch new file mode 100644 index 0000000000000000000000000000000000000000..bad68dbf929675df766e9a1a733014160159e32d --- /dev/null +++ b/Fixes-aarch64-incorrect-cpu-model.patch @@ -0,0 +1,93 @@ +diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py +index f51463f..94d9982 100644 +--- a/nova/virt/libvirt/driver.py ++++ b/nova/virt/libvirt/driver.py +@@ -789,12 +789,6 @@ class LibvirtDriver(driver.ComputeDriver): + cpu = vconfig.LibvirtConfigGuestCPU() + for model in models: + cpu.model = self._get_cpu_model_mapping(model) +- if not cpu.model: +- msg = (_("Configured CPU model: %(model)s is not correct, " +- "or your host CPU arch does not suuport this " +- "model. Please correct your config and try " +- "again.") % {'model': model}) +- raise exception.InvalidCPUInfo(msg) + try: + self._compare_cpu(cpu, self._get_cpu_info(), None) + except exception.InvalidCPUInfo as e: +@@ -4323,11 +4317,27 @@ class LibvirtDriver(driver.ComputeDriver): + :return: Case-sensitive CPU model name, or None(Only when configured + CPU model name not correct) + """ ++ cpu_info = self._get_cpu_info() ++ if cpu_info['arch'] not in (fields.Architecture.I686, ++ fields.Architecture.X86_64, ++ fields.Architecture.PPC64, ++ fields.Architecture.PPC64LE, ++ fields.Architecture.PPC): ++ return model ++ + if not self.cpu_models_mapping: + cpu_models = self._host.get_cpu_model_names() + for cpu_model in cpu_models: + self.cpu_models_mapping[cpu_model.lower()] = cpu_model +- return self.cpu_models_mapping.get(model.lower(), None) ++ ++ if model.lower() not in self.cpu_models_mapping: ++ msg = (_("Configured CPU model: %(model)s is not correct, " ++ "or your host CPU arch does not support this " ++ "model. Please correct your config and try " ++ "again.") % {'model': model}) ++ raise exception.InvalidCPUInfo(msg) ++ ++ return self.cpu_models_mapping.get(model.lower()) + + def _get_guest_cpu_model_config(self, flavor=None): + mode = CONF.libvirt.cpu_mode +@@ -4338,8 +4348,8 @@ class LibvirtDriver(driver.ComputeDriver): + + if (CONF.libvirt.virt_type == "kvm" or + CONF.libvirt.virt_type == "qemu"): ++ caps = self._host.get_capabilities() + if mode is None: +- caps = self._host.get_capabilities() + # AArch64 lacks 'host-model' support because neither libvirt + # nor QEMU are able to tell what the host CPU model exactly is. + # And there is no CPU description code for ARM(64) at this +@@ -4358,6 +4368,12 @@ class LibvirtDriver(driver.ComputeDriver): + mode = "host-model" + if mode == "none": + return vconfig.LibvirtConfigGuestCPU() ++ # On AArch64 platform the return of _get_cpu_model_mapping will not ++ # return the default CPU model. ++ if mode == "custom": ++ if arch == fields.Architecture.AARCH64: ++ if not models: ++ models = ['max'] + else: + if mode is None or mode == "none": + return None +@@ -10618,6 +10634,10 @@ class LibvirtDriver(driver.ComputeDriver): + else: + models = [self._get_cpu_model_mapping(model) + for model in CONF.libvirt.cpu_models] ++ # Aarch64 platform doesn't return the default CPU models ++ if caps.host.cpu.arch == fields.Architecture.AARCH64: ++ if not models: ++ models = ['max'] + # For custom mode, iterate through cpu models + for model in models: + caps.host.cpu.model = model +diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py +index 0c04833..5809b1c 100644 +--- a/nova/virt/libvirt/utils.py ++++ b/nova/virt/libvirt/utils.py +@@ -537,6 +537,8 @@ def get_cpu_model_from_arch(arch): + mode = 'qemu32' + elif arch == obj_fields.Architecture.PPC64LE: + mode = 'POWER8' ++ elif arch == obj_fields.Architecture.AARCH64: ++ mode = 'max' + return mode + + diff --git a/Fixes-ignore-device-already-in-the-process-of-unplug-errors.patch b/Fixes-ignore-device-already-in-the-process-of-unplug-errors.patch new file mode 100644 index 0000000000000000000000000000000000000000..62531e6dd52e3ac9f036ae6f984e01973ac4e99f --- /dev/null +++ b/Fixes-ignore-device-already-in-the-process-of-unplug-errors.patch @@ -0,0 +1,38 @@ +diff --git a/nova/virt/libvirt/guest.py b/nova/virt/libvirt/guest.py +index a7fbc50..3d74f6a 100644 +--- a/nova/virt/libvirt/guest.py ++++ b/nova/virt/libvirt/guest.py +@@ -410,7 +410,6 @@ + LOG.debug('Successfully detached device %s from guest. ' + 'Persistent? %s. Live? %s', + device, persistent, live) +- + except libvirt.libvirtError as ex: + with excutils.save_and_reraise_exception(reraise=False) as ctx: + errcode = ex.get_error_code() +@@ -429,6 +428,17 @@ + # detach fails because the device is not found + raise exception.DeviceNotFound( + device=alternative_device_name) ++ # NOTE(lyarwood): https://bugzilla.redhat.com/1878659 ++ # Ignore this known QEMU bug for the time being ++ # allowing our retry logic to fire again and hopefully ++ # see that the device has been removed asynchronously ++ # by QEMU in the meantime when the next call to detach ++ # raises VIR_ERR_DEVICE_MISSING. ++ if 'already in the process of unplug' in errmsg: ++ LOG.debug('Ignoring QEMU rejecting our request to ' ++ 'detach as it is caused by a previous ' ++ 'request still being in progress.') ++ return + # TODO(lyarwood): Remove libvirt.VIR_ERR_INVALID_ARG once + # MIN_LIBVIRT_VERSION is >= 4.1.0 + elif errcode == libvirt.VIR_ERR_INVALID_ARG: +@@ -438,6 +448,7 @@ + # detach fails because the device is not found + raise exception.DeviceNotFound( + device=alternative_device_name) ++ + # Re-raise the original exception if we're not raising + # DeviceNotFound instead. This will avoid logging of a + # "Original exception being dropped" traceback. diff --git a/nova-23.0.1.tar.gz b/nova-20.6.1.tar.gz similarity index 50% rename from nova-23.0.1.tar.gz rename to nova-20.6.1.tar.gz index 1b1df218d93e76142c2a92585e3c8f59f3f912d6..42b4373d23cdc3ee529fd58a11a590c679cb2ef0 100644 Binary files a/nova-23.0.1.tar.gz and b/nova-20.6.1.tar.gz differ diff --git a/openstack-nova.spec b/openstack-nova.spec index f9227475f7d84da5aa198e8ff020104c47749d76..2c990e515b57187fca388d14c06b4bcf8087641f 100644 --- a/openstack-nova.spec +++ b/openstack-nova.spec @@ -1,7 +1,5 @@ %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %global with_doc 0 -%global qemu_version 3.1.0 -%global libvirt_version 5.0.0 %global common_desc \ OpenStack Compute (codename Nova) is open source software designed to \ @@ -16,17 +14,14 @@ standard hardware configurations and seven major hypervisors. Name: openstack-nova # Liberty semver reset # https://review.openstack.org/#/q/I6a35fa0dda798fad93b804d00a46af80f08d475c,n,z -Version: 23.0.1 -Release: 5 +Version: 20.6.1 +Release: 6 Summary: OpenStack Compute (nova) License: ASL 2.0 URL: http://openstack.org/projects/compute/ Source0: https://tarballs.openstack.org/nova/nova-%{upstream_version}.tar.gz -Patch0: 0001-downgrade-the-version-of-qemu-from-4.2.0-to-4.1.0.patch - - Source1: nova-dist.conf Source6: nova.logrotate @@ -53,6 +48,7 @@ Source39: nova_migration_authorized_keys Source40: nova_migration-rootwrap.conf Source41: nova_migration-rootwrap_cold_migration +Patch1: Fixes-aarch64-incorrect-cpu-model.patch BuildArch: noarch BuildRequires: openstack-macros @@ -66,7 +62,7 @@ BuildRequires: python3-netaddr BuildRequires: python3-pbr BuildRequires: python3-six BuildRequires: python3-oslo-i18n -BuildRequires: python3-cryptography >= 2.1 +BuildRequires: python3-cryptography BuildRequires: python3-oslo-policy # Required for unit tests BuildRequires: python3-barbicanclient @@ -113,10 +109,10 @@ Requires: python3-nova = %{version}-%{release} Requires(pre): shadow-utils BuildRequires: systemd # Required to build nova.conf.sample -BuildRequires: python3-castellan >= 0.16.0 +BuildRequires: python3-castellan BuildRequires: python3-glanceclient BuildRequires: python3-keystonemiddleware -BuildRequires: python3-microversion-parse >= 0.2.1 +BuildRequires: python3-microversion-parse BuildRequires: python3-os-brick BuildRequires: python3-oslo-db BuildRequires: python3-oslo-reports @@ -127,7 +123,7 @@ BuildRequires: python3-paramiko BuildRequires: python3-babel BuildRequires: python3-lxml -BuildRequires: python3-websockify >= 0.9.0 +BuildRequires: python3-websockify # remove old service subpackage @@ -154,18 +150,18 @@ Requires: /usr/bin/virsh Requires: openssh-clients Requires: rsync Requires: lvm2 -Requires: python3-cinderclient >= 3.3.0 +Requires: python3-cinderclient Requires: genisoimage -Requires(pre): qemu >= %{qemu_version} -Requires(pre): qemu-block-rbd >= %{qemu_version} -Requires(pre): qemu-block-ssh >= %{qemu_version} -Requires(pre): python3-libvirt >= %{libvirt_version} -Requires(pre): libvirt-daemon-driver-nodedev >= %{libvirt_version} -Requires(pre): libvirt-daemon-driver-nwfilter >= %{libvirt_version} -Requires(pre): libvirt-daemon-driver-secret >= %{libvirt_version} -Requires(pre): libvirt-daemon-driver-qemu >= %{libvirt_version} -Requires(pre): libvirt-daemon-driver-storage-core >= %{libvirt_version} +Requires(pre): qemu +Requires(pre): qemu-block-rbd +Requires(pre): qemu-block-ssh +Requires(pre): python3-libvirt +Requires(pre): libvirt-daemon-driver-nodedev +Requires(pre): libvirt-daemon-driver-nwfilter +Requires(pre): libvirt-daemon-driver-secret +Requires(pre): libvirt-daemon-driver-qemu +Requires(pre): libvirt-daemon-driver-storage-core Requires: sg3_utils Requires: sysfsutils @@ -197,7 +193,7 @@ to run Virtual Machines in the cloud. Summary: OpenStack Nova API services Requires: openstack-nova-common = %{version}-%{release} -Requires: python3-cinderclient >= 3.3.0 +Requires: python3-cinderclient %description api %{common_desc} @@ -220,7 +216,7 @@ Summary: OpenStack Nova noVNC proxy service Requires: openstack-nova-common = %{version}-%{release} Requires: novnc -Requires: python3-websockify >= 0.9.0 +Requires: python3-websockify %description novncproxy @@ -233,7 +229,7 @@ VNC traffic over browser websockets connections. Summary: OpenStack Nova Spice HTML5 console access service Requires: openstack-nova-common = %{version}-%{release} -Requires: python3-websockify >= 0.9.0 +Requires: python3-websockify %description spicehtml5proxy %{common_desc} @@ -245,7 +241,7 @@ spice HTML5 console access service to Virtual Machines. Summary: OpenStack Nova serial console access service Requires: openstack-nova-common = %{version}-%{release} -Requires: python3-websockify >= 0.9.0 +Requires: python3-websockify %description serialproxy %{common_desc} @@ -272,74 +268,74 @@ Requires: openssl Requires: openssh Requires: sudo -Requires: python3-paramiko >= 2.7.1 -Requires: python3-eventlet >= 0.26.1 -Requires: python3-iso8601 >= 0.1.11 -Requires: python3-netaddr >= 0.7.18 +Requires: python3-paramiko +Requires: python3-eventlet +Requires: python3-iso8601 +Requires: python3-netaddr Requires: python3-boto -Requires: python3-stevedore >= 1.20.0 -Requires: python3-sqlalchemy >= 1.2.19 -Requires: python3-alembic >= 0.8.0 -Requires: python3-routes >= 2.3.1 -Requires: python3-webob >= 1.8.2 -Requires: python3-castellan >= 0.16.0 -Requires: python3-cryptography >= 2.7 -Requires: python3-cursive >= 0.2.1 -Requires: python3-dataclasses >= 0.7 +Requires: python3-stevedore +Requires: python3-sqlalchemy +Requires: python3-alembic +Requires: python3-routes +Requires: python3-webob +Requires: python3-castellan +Requires: python3-cryptography +Requires: python3-cursive Requires: python3-glanceclient -Requires: python3-greenlet >= 0.4.13 -Requires: python3-keystonemiddleware >= 4.20.0 -Requires: python3-keystoneauth1 >= 3.16.0 -Requires: python3-jinja2 >= 2.10 -Requires: python3-jsonschema >= 3.2.0 -Requires: python3-microversion-parse >= 0.2.1 -Requires: python3-neutronclient >= 6.7.0 -Requires: python3-novaclient >= 2.30.1 -Requires: python3-openstacksdk >= 0.35.0 -Requires: python3-os-brick >= 4.2.0 -Requires: python3-os-resource-classes >= 0.4.0 -Requires: python3-os-traits >= 2.5.0 -Requires: python3-oslo-cache >= 1.26.0 -Requires: python3-oslo-concurrency >= 4.3.0 -Requires: python3-oslo-config >= 6.8.0 -Requires: python3-oslo-context >= 3.1.1 -Requires: python3-oslo-db >= 4.44.0 -Requires: python3-oslo-i18n >= 5.0.1 -Requires: python3-oslo-log >= 4.4.0 -Requires: python3-oslo-messaging >= 10.3.0 -Requires: python3-oslo-middleware >= 3.31.0 -Requires: python3-oslo-policy >= 3.6.0 -Requires: python3-oslo-privsep >= 2.4.0 -Requires: python3-oslo-reports >= 1.18.0 -Requires: python3-oslo-rootwrap >= 5.8.0 -Requires: python3-oslo-serialization >= 4.0.1 -Requires: python3-oslo-service >= 2.4.0 -Requires: python3-oslo-upgradecheck >= 1.3.0 -Requires: python3-oslo-utils >= 4.7.0 -Requires: python3-oslo-versionedobjects >= 1.35.0 -Requires: python3-os-vif >= 1.14.0 -Requires: python3-oslo-vmware >= 1.16.0 -Requires: python3-pbr >= 5.5.0 -Requires: python3-prettytable >= 0.7.1 -Requires: python3-psutil >= 3.2.2 -Requires: python3-requests >= 2.23.0 -Requires: python3-rfc3986 >= 1.2.0 -Requires: python3-taskflow >= 3.8.0 -Requires: python3-tooz >= 1.58.0 -Requires: python3-os-service-types >= 1.7.0 -Requires: python3-dateutil >= 2.6.0 -Requires: python3-futurist >= 1.8.0 - -Requires: python3-decorator >= 4.1.0 -Requires: python3-lxml >= 4.2.3 +Requires: python3-greenlet +Requires: python3-keystonemiddleware +Requires: python3-keystoneauth1 +Requires: python3-jinja2 +Requires: python3-jsonschema +Requires: python3-microversion-parse +Requires: python3-neutronclient +Requires: python3-novaclient +Requires: python3-openstacksdk +Requires: python3-os-brick +Requires: python3-os-resource-classes +Requires: python3-os-traits +Requires: python3-oslo-cache +Requires: python3-oslo-concurrency +Requires: python3-oslo-config +Requires: python3-oslo-context +Requires: python3-oslo-db +Requires: python3-oslo-i18n +Requires: python3-oslo-log +Requires: python3-oslo-messaging +Requires: python3-oslo-middleware +Requires: python3-oslo-policy +Requires: python3-oslo-privsep +Requires: python3-oslo-reports +Requires: python3-oslo-rootwrap +Requires: python3-oslo-serialization +Requires: python3-oslo-service +Requires: python3-oslo-upgradecheck +Requires: python3-oslo-utils +Requires: python3-oslo-versionedobjects +Requires: python3-os-vif +Requires: python3-oslo-vmware +Requires: python3-pbr +Requires: python3-prettytable +Requires: python3-psutil +Requires: python3-requests +Requires: python3-rfc3986 +Requires: python3-taskflow +Requires: python3-tooz +Requires: python3-os-service-types +Requires: python3-dateutil +Requires: python3-futurist +Requires: python3-osprofiler +Requires: python3-decorator +Requires: python3-lxml Requires: python3-ldap Requires: python3-memcached Requires: python3-sqlalchemy-migrate -Requires: python3-paste >= 2.0.2 -Requires: python3-paste-deploy >= 1.5.0 -Requires: python3-netifaces >= 0.10.4 -Requires: python3-retrying >= 1.3.3 -Requires: python3-yaml >= 5.1 +Requires: python3-paste +Requires: python3-paste-deploy +Requires: python3-netifaces +Requires: python3-retrying +Requires: python3-yaml +Requires: python3-monotonic %description -n python3-nova %{common_desc} @@ -377,7 +373,7 @@ BuildRequires: python3-oslo-config BuildRequires: python3-oslo-log BuildRequires: python3-oslo-messaging BuildRequires: python3-oslo-utils -BuildRequires: python3-rfc3986 >= 1.1.0 +BuildRequires: python3-rfc3986 BuildRequires: python3-routes BuildRequires: python3-sphinx BuildRequires: python3-sphinxcontrib-actdiag @@ -656,6 +652,10 @@ exit 0 %{_bindir}/nova-rootwrap %{_bindir}/nova-rootwrap-daemon %{_bindir}/nova-status +%{_bindir}/nova-console +%{_bindir}/nova-dhcpbridge +%{_bindir}/nova-xvpvncproxy + %if 0%{?with_doc} %{_mandir}/man1/nova*.1.gz @@ -673,6 +673,7 @@ exit 0 %{_bindir}/nova-compute %{_unitdir}/openstack-nova-compute.service %{_datarootdir}/nova/rootwrap/compute.filters +%{_datarootdir}/nova/rootwrap/network.filters %files scheduler %{_bindir}/nova-scheduler @@ -682,6 +683,7 @@ exit 0 %{_bindir}/nova-api* %{_bindir}/nova-metadata-wsgi %{_unitdir}/openstack-nova-*api.service +%{_datarootdir}/nova/rootwrap/api-metadata.filters %files conductor %{_bindir}/nova-conductor @@ -729,24 +731,21 @@ exit 0 %endif %changelog -* Thu Sep 09 2021 ffrog - 23.0.1-5 -- Fix the bugs about downgrading the version requirement of qemu from 4.2.0 to 4.1.0 - -* Tue Sep 07 2021 ffrog - 23.0.1-4 -- Downgrade the version requirement of qemu from 4.2.0 to 4.1.0 +* Fri Apr 22 2022 yangjunjie - 23.0.1-6 +- Ignore device already in the process of unplug errors. -* Tue Aug 24 2021 huangtianhua - 23.0.1-3 -- Fix requires errors +* Tue Jan 25 2022 wangxiyuan - 20.6.1-5 +- Add osprofiler requires -* Tue Aug 24 2021 wangxiyuan - 23.0.1-2 -- Drop lxc related requires. +* Mon Nov 29 2021 huangtianhua - 20.6.1-4 +- Adds patch to make nova-compute work on aarch64 -* Fri Jul 23 2021 liksh 23.0.1-1 -- Update to 23.0.1 +* Tue Nov 23 2021 zhangy1317 - 20.6.1-3 +- Fix install issue -* Sat Feb 20 2021 wangxiyuan -- Fix require issue +* Fri Nov 19 2021 huangtianhua - 20.6.1-2 +- 20.6.1 doesn't require python-dataclasses, removes it. -* Fri Jan 15 2021 joec88 -- openEuler build version +* Fri Nov 05 2021 wangxiyuan - 20.6.1-1 +- Support OpenStack Train release