Skip to content

Commit 01acd3d

Browse files
spark404wilderrodrigues
authored andcommitted
VR interfaces need the proper network type in ips
1 parent 4632936 commit 01acd3d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def process(self):
8686
def add_netstats(self, address):
8787
# add in the network stats iptables rules
8888
dev = "eth%s" % address['nic_dev_id']
89-
if address["nw_type"] == "public_ip":
89+
if address["nw_type"] == "public":
9090
self.fw.append(["", "front", "-A FORWARD -j NETWORK_STATS"])
9191
self.fw.append(["", "front", "-A INPUT -j NETWORK_STATS"])
9292
self.fw.append(["", "front", "-A OUTPUT -j NETWORK_STATS"])

systemvm/patches/debian/config/opt/cloud/bin/merge.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,15 @@ def processCL(self, dbag):
141141
# "eth0ip": "192.168.56.32",
142142
# "eth0mask": "255.255.255.0",
143143
self.newData = []
144-
self.processCLItem('0')
145-
self.processCLItem('1')
146-
self.processCLItem('2')
144+
if (self.qFile.data['cmd_line']['type'] == "router"):
145+
self.processCLItem('0', "guest")
146+
self.processCLItem('1', "control")
147+
self.processCLItem('2', "public")
148+
elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"):
149+
self.processCLItem('0', "control")
147150
return cs_cmdline.merge(dbag, self.qFile.data)
148151

149-
def processCLItem(self, num):
152+
def processCLItem(self, num, nw_type):
150153
key = 'eth' + num + 'ip'
151154
dp = {}
152155
if(key in self.qFile.data['cmd_line']):
@@ -160,7 +163,7 @@ def processCLItem(self, num):
160163
else:
161164
dp['gateway'] = 'None'
162165
dp['nic_dev_id'] = num
163-
dp['nw_type'] = 'control'
166+
dp['nw_type'] = nw_type
164167
qf = loadQueueFile()
165168
qf.load({ 'ip_address' : [ dp ], 'type' : 'ips'})
166169

0 commit comments

Comments
 (0)