From a789e8bf574973259c0461b99fb9a486abed6e23 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Wed, 20 Aug 2014 17:29:27 +0200 Subject: [PATCH] Fix a bug that would add updated control ip address instead of replace --- systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py index cd474c0fb91..96cf26dbacd 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py @@ -16,5 +16,8 @@ def merge(dbag, ip): ip['network'] = str(ipo.network) + '/' + str(ipo.prefixlen) if 'nw_type' not in ip.keys(): ip['nw_type'] = 'public' - dbag.setdefault('eth' + str(ip['nic_dev_id']), []).append( ip ) + if ip['nw_type'] == 'control': + dbag['eth' + str(ip['nic_dev_id'])] = [ ip ] + else: + dbag.setdefault('eth' + str(ip['nic_dev_id']), []).append( ip ) return dbag