From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id 49555559A for ; Mon, 4 Feb 2019 04:13:30 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x143DSgM030577; Mon, 4 Feb 2019 12:13:28 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id CDF61638B20; Mon, 4 Feb 2019 12:13:28 +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 B6D73638A97; Mon, 4 Feb 2019 12:13:28 +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:11:15 +0900 Message-Id: <1549249879-31580-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549249879-31580-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1549249879-31580-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 1/5] 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:13:30 -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