Fix bug 2216 to remove hardcoded numa affinity in VIO 57/12957/4
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 13 Feb 2023 16:48:32 +0000 (17:48 +0100)
committeraticig <gulsum.atici@canonical.com>
Wed, 15 Feb 2023 06:32:54 +0000 (07:32 +0100)
Change-Id: I0912c2841e7c5c1febe056ba092afedaea77f6a1
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
RO-VIM-openstack/osm_rovim_openstack/tests/test_vimconn_openstack.py
RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
releasenotes/notes/fix_bug_2216-b03687f2d9d422fa.yaml [new file with mode: 0644]
tox.ini

index 1de45fd..ba3cb34 100644 (file)
@@ -6739,7 +6739,6 @@ class TestNewFlavor(unittest.TestCase):
         numa_nodes = 0
         extra_specs = {"hw:numa_nodes": "0"}
         expected_extra_spec = {
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
             "vmware:latency_sensitivity_level": "high",
             "hw:numa_nodes": "0",
         }
@@ -6771,7 +6770,6 @@ class TestNewFlavor(unittest.TestCase):
         expected_extra_spec = {
             "vmware:latency_sensitivity_level": "high",
             "hw:numa_nodes": "None",
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
         }
         self.vimconn.process_vio_numa_nodes(numa_nodes, extra_specs)
         self.assertDictEqual(extra_specs, expected_extra_spec)
index 959839f..21b5b26 100644 (file)
@@ -1402,10 +1402,6 @@ class vimconnector(vimconn.VimConnector):
             extra_specs     (dict):        Extra specs dict to be updated
 
         """
-        # If there is not any numa, numas_nodes equals to 0.
-        if not numa_nodes:
-            extra_specs["vmware:extra_config"] = '{"numa.nodeAffinity":"0"}'
-
         # If there are several numas, we do not define specific affinity.
         extra_specs["vmware:latency_sensitivity_level"] = "high"
 
diff --git a/releasenotes/notes/fix_bug_2216-b03687f2d9d422fa.yaml b/releasenotes/notes/fix_bug_2216-b03687f2d9d422fa.yaml
new file mode 100644 (file)
index 0000000..46094ba
--- /dev/null
@@ -0,0 +1,28 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+fixes:
+  - |
+    Fix Bug 2216 All deployments with EPA in VIO land in NUMA node 0
+    This fix removes the hardcoded decision that makes all deployments
+    withe EPA land in NUMA node 0.
+    The fix removes the extra_spec "vmware:extra_config" that was previously
+    set to '{"numa.nodeAffinity":"0"}'.
+    It maintains the extra_spec "vmware:latency_sensitivity_level", set to "high"
+    for deployments with EPA.
+
+
diff --git a/tox.ini b/tox.ini
index 42dfdc4..be461e5 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -72,7 +72,7 @@ deps =  {[testenv]deps}
         -r{toxinidir}/requirements-dev.txt
         -r{toxinidir}/requirements-test.txt
 skip_install = true
-whitelist_externals = sh
+allowlist_externals = sh
 commands =
         sh -c 'rm -f nosetests.xml'
         coverage erase