Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH] controller: fix bug to add vf comps on same core
@ 2019-02-04  3:10 ogawa.yasufumi
  0 siblings, 0 replies; only message in thread
From: ogawa.yasufumi @ 2019-02-04  3:10 UTC (permalink / raw)
  To: spp, ferruh.yigit, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@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@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-04  3:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04  3:10 [spp] [PATCH] controller: fix bug to add vf comps on same core ogawa.yasufumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).