From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 133165589 for ; Mon, 4 Feb 2019 04:12:52 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x143Coj4023136; Mon, 4 Feb 2019 12:12:50 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id BB3F0638A8D; Mon, 4 Feb 2019 12:12:50 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id A40B2638A69; Mon, 4 Feb 2019 12:12:50 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Mon, 4 Feb 2019 12:10:39 +0900 Message-Id: <1549249839-31517-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 X-TM-AS-MML: disable Subject: [spp] [PATCH] controller: fix bug to add vf comps on same core X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:12:53 -0000 From: Yasufumi Ogawa 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 --- 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