From c2fa6e66a1d6652da4f0db271a639373ab10143f Mon Sep 17 00:00:00 2001 From: FFrog Date: Tue, 8 Mar 2022 10:48:07 +0800 Subject: [PATCH] Remove monotonic usage (cherry picked from commit 6b48cd3f90513bae59bd36cfb9a55954cd0651db) --- 0001-Remove-monotonic-usage.patch | 56 +++++++++++++++++++++++++++++++ openstack-nova.spec | 6 +++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 0001-Remove-monotonic-usage.patch diff --git a/0001-Remove-monotonic-usage.patch b/0001-Remove-monotonic-usage.patch new file mode 100644 index 0000000..707b73b --- /dev/null +++ b/0001-Remove-monotonic-usage.patch @@ -0,0 +1,56 @@ +From f40824a7fbac2a46cb195d3590738f8db64a58a6 Mon Sep 17 00:00:00 2001 +From: FFrog +Date: Tue, 8 Mar 2022 10:43:54 +0800 +Subject: [PATCH] Remove monotonic usage + +--- + lower-constraints.txt | 1 - + nova/service.py | 13 ------------- + 2 files changed, 14 deletions(-) + +diff --git a/lower-constraints.txt b/lower-constraints.txt +index 597a446..c77ec4d 100644 +--- a/lower-constraints.txt ++++ b/lower-constraints.txt +@@ -54,7 +54,6 @@ MarkupSafe==1.0 + mccabe==0.2.1 + microversion-parse==0.2.1 + mock==3.0.0 +-monotonic==1.4 + mox3==0.20.0 + msgpack==0.5.6 + msgpack-python==0.5.6 +diff --git a/nova/service.py b/nova/service.py +index 5079451..944c470 100644 +--- a/nova/service.py ++++ b/nova/service.py +@@ -94,17 +94,6 @@ def setup_profiler(binary, host): + LOG.info(_LI("OSProfiler is enabled.")) + + +-def assert_eventlet_uses_monotonic_clock(): +- from eventlet import hubs +- import monotonic +- +- hub = hubs.get_hub() +- if hub.clock is not monotonic.monotonic: +- raise RuntimeError( +- 'eventlet hub is not using a monotonic clock - ' +- 'periodic tasks will be affected by drifts of system time.') +- +- + class Service(service.Service): + """Service object for binaries running on hosts. + +@@ -165,8 +154,6 @@ class Service(service.Service): + # outside of oslo.db. + context.CELL_CACHE = {} + +- assert_eventlet_uses_monotonic_clock() +- + verstr = version.version_string_with_package() + LOG.info(_LI('Starting %(topic)s node (version %(version)s)'), + {'topic': self.topic, 'version': verstr}) +-- +2.23.0 + diff --git a/openstack-nova.spec b/openstack-nova.spec index 9f34b51..ea07880 100644 --- a/openstack-nova.spec +++ b/openstack-nova.spec @@ -15,7 +15,7 @@ Name: openstack-nova # Liberty semver reset # https://review.openstack.org/#/q/I6a35fa0dda798fad93b804d00a46af80f08d475c,n,z Version: 20.6.1 -Release: 5 +Release: 6 Summary: OpenStack Compute (nova) License: ASL 2.0 @@ -49,6 +49,7 @@ Source40: nova_migration-rootwrap.conf Source41: nova_migration-rootwrap_cold_migration Patch1: Fixes-aarch64-incorrect-cpu-model.patch +Patch2: 0001-Remove-monotonic-usage.patch BuildArch: noarch BuildRequires: openstack-macros @@ -731,6 +732,9 @@ exit 0 %endif %changelog +* Tue Mar 08 2022 lijiawei - 20.6.1-6 +- Remove monotonic usage + * Tue Jan 25 2022 wangxiyuan - 20.6.1-5 - Add osprofiler requires -- Gitee