From 5925cf676469412e6f27565707b69208ffd975f8 Mon Sep 17 00:00:00 2001 From: Gallen Date: Tue, 14 May 2019 16:32:31 +0800 Subject: [PATCH] fix a bug when decoding image name_owner_type in taskmgr --- src/master/taskmgr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/master/taskmgr.py b/src/master/taskmgr.py index 65a93b9..19f00a7 100644 --- a/src/master/taskmgr.py +++ b/src/master/taskmgr.py @@ -687,9 +687,9 @@ class TaskMgr(threading.Thread): username = username, vnode = VNode( image = Image( - name = json_task['image'].split('_')[0], #json_task['cluster']['image']['name'], - type = image_dict[json_task['image'].split('_')[2]], #json_task['cluster']['image']['type'], - owner = username if not json_task['image'].split('_')[1] else json_task['image'].split('_')[1]), #json_task['cluster']['image']['owner']), + name = '_'.join(json_task['image'].split('_')[:-2]), #json_task['cluster']['image']['name'], + type = image_dict[json_task['image'].split('_')[-1]], #json_task['cluster']['image']['type'], + owner = username if not json_task['image'].split('_')[-2] else json_task['image'].split('_')[-2]), #json_task['cluster']['image']['owner']), instance = Instance( cpu = int(json_task['cpuSetting']), memory = int(json_task['memorySetting']),