[spp] [PATCH 1/5] controller: fix bug to add vf comps on same core
ogawa.yasufumi at lab.ntt.co.jp
ogawa.yasufumi at lab.ntt.co.jp
Mon Feb 4 04:11:15 CET 2019
From: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
SPP CLI is terminated if several components are assigned on the same
core because it try to find non-existent ID from list of unused cores
and failed to an error unexpectedly.
This patch is to add checking the required ID exists in the list before
to avoid not found error.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
---
src/controller/commands/vf.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/controller/commands/vf.py b/src/controller/commands/vf.py
index e715a17..7518c04 100644
--- a/src/controller/commands/vf.py
+++ b/src/controller/commands/vf.py
@@ -250,7 +250,8 @@ class SppVf(object):
print("Succeeded to start component '%s' on core:%d"
% (req_params['name'], req_params['core']))
self.worker_names.append(req_params['name'])
- self.unused_core_ids.remove(req_params['core'])
+ if req_params['core'] in self.unused_core_ids:
+ self.unused_core_ids.remove(req_params['core'])
elif res.status_code in error_codes:
pass
else:
--
2.7.4
More information about the spp
mailing list