incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1294415 - in /incubator/tashi/branches/stroucki-tashi11: ./ src/tashi/nodemanager/vmcontrol/qemu.py
Date Tue, 28 Feb 2012 00:30:12 GMT
Author: stroucki
Date: Tue Feb 28 00:30:11 2012
New Revision: 1294415

URL: http://svn.apache.org/viewvc?rev=1294415&view=rev
Log:
qemu: fix semantic error to fetch a specified virtual nic

Modified:
    incubator/tashi/branches/stroucki-tashi11/   (props changed)
    incubator/tashi/branches/stroucki-tashi11/src/tashi/nodemanager/vmcontrol/qemu.py

Propchange: incubator/tashi/branches/stroucki-tashi11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 00:30:11 2012
@@ -6,3 +6,4 @@
 /incubator/tashi/branches/stroucki-irpbugs:1245857-1292894
 /incubator/tashi/branches/stroucki-slotsbug:1244839-1245041
 /incubator/tashi/branches/zoni-dev/trunk:1034098-1177646
+/incubator/tashi/trunk:1294311-1294413

Modified: incubator/tashi/branches/stroucki-tashi11/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-tashi11/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1294415&r1=1294414&r2=1294415&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-tashi11/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/branches/stroucki-tashi11/src/tashi/nodemanager/vmcontrol/qemu.py Tue
Feb 28 00:30:11 2012
@@ -132,7 +132,10 @@ class Qemu(VmControlInterface):
 	def __getHostPids(self):
 		"""Utility function to get a list of system PIDs that match the QEMU_BIN specified (/proc/nnn/exe)"""
 		pids = []
-		real_bin = os.readlink(self.QEMU_BIN)
+		real_bin = self.QEMU_BIN
+		while os.path.islink(real_bin):
+			real_bin = os.readlink(self.QEMU_BIN)
+
 		for f in os.listdir("/proc"):
 			try:
 				bin = os.readlink("/proc/%s/exe" % (f))
@@ -504,11 +507,11 @@ class Qemu(VmControlInterface):
 		nicNetworks = {}
 		for i in range(0, len(instance.nics)):
 			# Don't allow more than one interface per vlan
+			nic = instance.nics[i]
 			if nicNetworks.has_key(nic.network):
 				continue
 			nicNetworks[nic.network] = True
 
-			nic = instance.nics[i]
 			nicString = nicString + "-net nic,macaddr=%s,model=%s,vlan=%d -net tap,ifname=%s%d.%d,vlan=%d,script=/etc/qemu-ifup.%d
" % (nic.mac, nicModel, nic.network, self.ifPrefix, instance.id, i, nic.network, nic.network)
 
 		#  ACPI



Mime
View raw message