From 0983ed29bb5545c7f1118448d41d7fd4fff3cba1 Mon Sep 17 00:00:00 2001 From: "lip.z" Date: Sat, 2 Aug 2014 20:18:06 +0800 Subject: [PATCH 1/3] fix Singleton.__call__ error fix Singleton.__call__ error --- mininet/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/log.py b/mininet/log.py index 09a664a..5f96569 100644 --- a/mininet/log.py +++ b/mininet/log.py @@ -69,7 +69,7 @@ class Singleton( type ): def __call__( cls, *args, **kw ): if cls.instance is None: cls.instance = super( Singleton, cls ).__call__( *args, **kw ) - return cls.instance + return cls.instance class MininetLogger( Logger, object ): From 161e7997fa8e172205473aab893cd34ac5a7b0f2 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Wed, 13 Aug 2014 19:49:08 -0700 Subject: [PATCH 2/3] Fixing Node.monitor() to read entire prompt marker. Applying @cdburkard fix to #322 --- mininet/node.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mininet/node.py b/mininet/node.py index d5b3036..a69eda6 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -261,6 +261,9 @@ class Node( object ): # Look for PID marker = chr( 1 ) + r'\d+\r\n' if findPid and chr( 1 ) in data: + # Marker can be read in chunks; continue until all of it is read + while not re.findall( marker, data ): + data += self.read( 1024 ) markers = re.findall( marker, data ) if markers: self.lastPid = int( markers[ 0 ][ 1: ] ) From 1285fb22dc83410a051eb0bfdd221f65464974b3 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 14 Aug 2014 15:38:31 -0700 Subject: [PATCH 3/3] updaing build.py to use 12.04.5 and extract kernel using noload --- util/vm/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/vm/build.py b/util/vm/build.py index ad454f0..a921aaa 100755 --- a/util/vm/build.py +++ b/util/vm/build.py @@ -61,10 +61,10 @@ Prompt = '\$ ' # Shell prompt that pexpect will wait for isoURLs = { 'precise32server': 'http://mirrors.kernel.org/ubuntu-releases/12.04/' - 'ubuntu-12.04.3-server-i386.iso', + 'ubuntu-12.04.5-server-i386.iso', 'precise64server': 'http://mirrors.kernel.org/ubuntu-releases/12.04/' - 'ubuntu-12.04.3-server-amd64.iso', + 'ubuntu-12.04.5-server-amd64.iso', 'quantal32server': 'http://mirrors.kernel.org/ubuntu-releases/12.10/' 'ubuntu-12.10-server-i386.iso', @@ -238,7 +238,7 @@ def extractKernel( image, flavor, imageDir=VMImageDir ): # Assume kernel is in partition 1/boot/vmlinuz*generic for now part = nbd + 'p1' mnt = mkdtemp() - srun( 'mount -o ro %s %s' % ( part, mnt ) ) + srun( 'mount -o ro,noload %s %s' % ( part, mnt ) ) kernsrc = glob( '%s/boot/vmlinuz*generic' % mnt )[ 0 ] initrdsrc = glob( '%s/boot/initrd*generic' % mnt )[ 0 ] srun( 'cp %s %s' % ( initrdsrc, initrd ) )