incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r960738 - in /incubator/tashi: site/xdocs/documentation-single.xml trunk/src/tashi/clustermanager/clustermanagerservice.py trunk/src/tashi/clustermanager/data/sql.py trunk/src/tashi/nodemanager/vmcontrol/xenpv.py
Date Tue, 06 Jul 2010 00:42:56 GMT
Author: stroucki
Date: Tue Jul  6 00:42:56 2010
New Revision: 960738

URL: http://svn.apache.org/viewvc?rev=960738&view=rev
Log:
Merge branch 'master' of ssh://yogi.pdl.cmu.edu/h/stroucki/git/tashi

Conflicts:
	trunk/src/tashi/nodemanager/vmcontrol/xenpv.py

Modified:
    incubator/tashi/site/xdocs/documentation-single.xml
    incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py
    incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py

Modified: incubator/tashi/site/xdocs/documentation-single.xml
URL: http://svn.apache.org/viewvc/incubator/tashi/site/xdocs/documentation-single.xml?rev=960738&r1=960737&r2=960738&view=diff
==============================================================================
--- incubator/tashi/site/xdocs/documentation-single.xml (original)
+++ incubator/tashi/site/xdocs/documentation-single.xml Tue Jul  6 00:42:56 2010
@@ -87,7 +87,15 @@ In [3]: data.baseDataObject.save()
 
 In [4]:
 </pre></div>
-<p>If you were using MySQL (or sqlite), you'd have to populate a row in the database
with columns named "id", "name", "state", and "up".</p>
+<p>If you were using MySQL (or sqlite), you'd have to populate the
+relevant tables in the database.</p>
+<div class="lit"><pre>
+clustermanager:/opt/tashi/bin# sqlite3 /var/tmp/cm_sqlite.dat
+SQLite version 3.5.9
+Enter ".help" for instructions
+sqlite> insert into networks values (272, 'default');
+sqlite> insert into hosts (name) values ('firsthost');
+</pre></div>
 <p>Then you may either create a host lock or quit the CM and restart it to force the
creation of host locks.</p>
 <div class="lit"><pre>
 In [4]: import threading
@@ -121,8 +129,8 @@ mryan3@firsthost:~/scratch/tashi$ ./bin/
 <p>Have your networking environment set up, so that the virtual machines
 may be attached to the proper virtual bridges.</p>
 
-<p>Virtual disks are attached using <pre>blktap</pre>, so make sure that
-the proper blktap module is loaded, and <pre>blktapctrl</pre> is running
+<p>In Xen 3, virtual disks are attached using <tt>blktap</tt>, so make
sure that
+the proper blktap module is loaded, and <tt>blktapctrl</tt> is running
 properly.</p>
 
 <p>Place a disk image in /dfs (or wherever you configured it to be).</p>

Modified: incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py?rev=960738&r1=960737&r2=960738&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py (original)
+++ incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py Tue Jul  6 00:42:56
2010
@@ -351,6 +351,8 @@ class ClusterManagerService(object):
 				oldHost.cores = host.cores
 				oldHost.up = True
 				oldHost.decayed = False
+
+# compare whether CM / NM versions are acceptable
 				if (host.version != version and not self.allowMismatchedVersions):
 					oldHost.state = HostState.VersionMismatch
 				if (host.version == version and oldHost.state == HostState.VersionMismatch):

Modified: incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py?rev=960738&r1=960737&r2=960738&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py (original)
+++ incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py Tue Jul  6 00:42:56 2010
@@ -201,7 +201,7 @@ class SQL(DataInterface):
 		return hosts
 	
 	def getHost(self, id):
-		cur = self.executeStatement("SELECT * FROM hosts WHERE id = %d" % (id))
+		cur = self.executeStatement("SELECT * FROM hosts WHERE id = %d" % (int(id)))
 		r = cur.fetchone()
 		if (r == None):
 			raise TashiException(d={'errno':Errors.NoSuchHostId,'msg':"No such hostId - %s" % (id)})

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py?rev=960738&r1=960737&r2=960738&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py Tue Jul  6 00:42:56 2010
@@ -244,10 +244,10 @@ shadow_memory=8
 '''
 			diskconfig = '''
 disk=['%s:%s,ioemu:%s,w']
-'''(disk0, image, diskU)
+'''%(disk0, image, diskU)
 			netconfig = '''
 vif = [ 'type=ioemu,bridge=%s,mac=%s' ]
-'''(bridge, macAddr)
+'''%(bridge, macAddr)
 
 		else:
 			raise Exception, "Unknown vmType in hints: %s"%vmType
@@ -256,22 +256,22 @@ vif = [ 'type=ioemu,bridge=%s,mac=%s' ]
 		if diskconfig is None:
 			diskconfig = '''
 disk = ['%s:%s,%s,w']
-'''(disk0, image, diskU)
+'''%(disk0, image, diskU)
 
 		if netconfig is None:
 			netconfig = '''
 vif = [ 'bridge=%s,mac=%s' ]
-'''(bridge, macAddr)
+'''%(bridge, macAddr)
 
 		if memconfig is None:
 			memconfig = '''
 memory=%i
-'''(memory)
+'''%(memory)
 
 		if cpuconfig is None:
 			cpuconfig = '''
 vcpus=%i
-'''(cores)
+'''%(cores)
 
 		if extraconfig is None:
 			extraconfig = '''
@@ -333,7 +333,7 @@ extra='xencons=tty'
 				if disktype == 'qcow':
 					cmd = '/usr/lib/xen-default/bin/qcow-create 0 %s %s' % (newdisk, imageLocal)
 				elif disktype == 'vhd':
-					cmd = '/usr/lib/xen-default/bin/vhd-tool create 0 %s %s' % (newdisk, imageLocal)
+					cmd = '/usr/lib/xen-default/bin/vhd-util snapshot -n %s -p %s' % (newdisk, imageLocal)
 				else:
 					raise Exception, "Unknown disktype in configuration: %s"%disktype
 
@@ -499,7 +499,7 @@ extra='xencons=tty'
 					shell = True,
 					stdout = subprocess.PIPE)
 
-		for line in infopipe.stdout.readline():
+		for line in infopipe.stdout.readlines():
 
 			if line.startswith("total_memory"):
 				host.memory = int((line.split(':'))[1])



Mime
View raw message