From 3885acaf7a1eb9509c0cc3b12a9c54a259c973f5 Mon Sep 17 00:00:00 2001 From: Dan Crosta Date: Fri, 3 Feb 2012 18:21:20 -0500 Subject: python-2.4-compatible version of python version detection --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 4349159786f..504fd9d89b9 100644 --- a/SConstruct +++ b/SConstruct @@ -827,7 +827,7 @@ def smoke_python_name(): for binary in binaries: try: # py-2.4 compatible replacement for shell backticks - output = subprocess.Popen([binary, '--version'], stdout=subprocess.PIPE).communicate()[0] + output = subprocess.Popen([binary, '-V'], stdout=subprocess.PIPE).communicate()[0] match = version.search(output) if match and float(match.group(1)) >= 2.5: return binary -- cgit v1.2.1 From 2d4f7f4c88b0bce3e96f1098b6d2eecce448388e Mon Sep 17 00:00:00 2001 From: Dan Crosta Date: Fri, 3 Feb 2012 18:39:54 -0500 Subject: correct version number comparison --- SConstruct | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index 504fd9d89b9..55d234343fc 100644 --- a/SConstruct +++ b/SConstruct @@ -823,17 +823,19 @@ def smoke_python_name(): # which we assume to be installed. import subprocess version = re.compile(r'[Pp]ython ([\d\.]+)', re.MULTILINE) - binaries = ['python', 'python2.5', 'python2.6', 'python2.7', 'python25', 'python26', 'python27'] + binaries = ['python2.5', 'python2.6', 'python2.7', 'python25', 'python26', 'python27', 'python'] for binary in binaries: try: # py-2.4 compatible replacement for shell backticks - output = subprocess.Popen([binary, '-V'], stdout=subprocess.PIPE).communicate()[0] - match = version.search(output) - if match and float(match.group(1)) >= 2.5: - return binary + out, err = subprocess.Popen([binary, '-V'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + for stream in (out, err): + match = version.search(stream) + if match: + versiontuple = tuple(map(int, match.group(1).split('.'))) + if versiontuple >= (2, 5): + return binary except: pass - # if that all fails, fall back to "python" return "python" -- cgit v1.2.1 From 9ee926acf4519ada709a0729c9780da98d0748f6 Mon Sep 17 00:00:00 2001 From: gregs Date: Fri, 7 Oct 2011 12:44:36 -0400 Subject: buildbot primary can change after reconfig replReads.js --- jstests/slowNightly/replReads.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jstests/slowNightly/replReads.js b/jstests/slowNightly/replReads.js index 4fe91305738..3744738c4a4 100644 --- a/jstests/slowNightly/replReads.js +++ b/jstests/slowNightly/replReads.js @@ -43,6 +43,8 @@ function testReadLoadBalancing(numReplicas) { assert.soon( function(){ return secondaries[i].getDB("test").foo.count() > 0; } ) secondaries[i].getDB('test').setProfilingLevel(2) } + // Primary may change with reconfig + primary.getDB('test').setProfilingLevel(2) for (var i = 0; i < secondaries.length * 10; i++) { conn = new Mongo(s._mongos[0].host) @@ -81,7 +83,10 @@ function testReadLoadBalancing(numReplicas) { return false; } , "one slave not ok" , 180000 , 5000 ); - + + // Secondaries may change here + secondaries = s._rs[0].test.liveNodes.slaves + for (var i = 0; i < secondaries.length * 10; i++) { conn = new Mongo(s._mongos[0].host) conn.setSlaveOk() @@ -95,7 +100,7 @@ function testReadLoadBalancing(numReplicas) { } counts = counts.sort(); - assert.eq( 20 , counts[1] - counts[0] , "counts wrong: " + tojson( counts ) ); + assert.eq( 20 , Math.abs( counts[1] - counts[0] ), "counts wrong: " + tojson( counts ) ); s.stop() } -- cgit v1.2.1 From 5c71438495f75c3de4a2f8f8eeb16f226c2f9563 Mon Sep 17 00:00:00 2001 From: Greg Studer Date: Fri, 16 Dec 2011 09:48:38 -0500 Subject: buildbot replReads.js hidden nodes now correctly updated in mongos, should disappear from config --- jstests/slowNightly/replReads.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jstests/slowNightly/replReads.js b/jstests/slowNightly/replReads.js index 3744738c4a4..dadc2c6cac7 100644 --- a/jstests/slowNightly/replReads.js +++ b/jstests/slowNightly/replReads.js @@ -77,9 +77,14 @@ function testReadLoadBalancing(numReplicas) { var x = rsStats(); printjson(x); var numOk = 0; + // Now wait until the host disappears, since now we actually update our + // replica sets via isMaster in mongos + if( x.hosts.length == rs.conf()["members"].length - 1 ) return true + /* for ( var i=0; i Date: Tue, 24 Jan 2012 01:00:02 -0500 Subject: fix segfault in mongos with some replica set changes --- client/dbclient_rs.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/dbclient_rs.cpp b/client/dbclient_rs.cpp index dccaf571a4f..0189700db02 100644 --- a/client/dbclient_rs.cpp +++ b/client/dbclient_rs.cpp @@ -446,8 +446,6 @@ namespace mongo { } catch( DBException& e ){ warning() << "cannot connect to new host " << *i << " to replica set " << this->_name << causedBy( e ) << endl; - delete newConn; - newConn = NULL; } _nodes.push_back( Node( h , newConn ) ); @@ -458,6 +456,7 @@ namespace mongo { bool ReplicaSetMonitor::_checkConnection( DBClientConnection * c , string& maybePrimary , bool verbose , int nodesOffset ) { + assert( c ); scoped_lock lk( _checkConnectionLock ); bool isMaster = false; bool changed = false; -- cgit v1.2.1 From 0bd2737e381f9bb24e6ddf856c9c5db641c4c4b8 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Wed, 25 Jan 2012 23:35:00 -0500 Subject: try to make chmod work --- jstests/sharding/sharding_with_keyfile.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jstests/sharding/sharding_with_keyfile.js b/jstests/sharding/sharding_with_keyfile.js index 94aea571258..bd8d03892f2 100644 --- a/jstests/sharding/sharding_with_keyfile.js +++ b/jstests/sharding/sharding_with_keyfile.js @@ -1,9 +1,15 @@ // Tests sharding with a key file -var st = new ShardingTest({ name : jsTestName(), +myTestName = "sharding_with_keyfile" + +keyFile = "jstests/sharding/" + myTestName + ".key"; + +run( "chmod" , "600" , keyFile ); + +var st = new ShardingTest({ name : myTestName , shards : 2, mongos : 1, - keyFile : keyFile = "jstests/sharding/" + jsTestName() + ".key" }) + keyFile : keyFile }) // Make sure all our instances got the key var configs = st._configDB.split(",") -- cgit v1.2.1 From 4ef4f1904c55448bb2e197d0dca06b543b1e0a57 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Sat, 4 Feb 2012 01:13:58 -0500 Subject: fix mode --- jstests/sharding/sharding_with_keyfile.key | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 jstests/sharding/sharding_with_keyfile.key diff --git a/jstests/sharding/sharding_with_keyfile.key b/jstests/sharding/sharding_with_keyfile.key old mode 100755 new mode 100644 -- cgit v1.2.1 From e74f5546d554f8de441b62f264c73ea86913c4f8 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Mon, 6 Feb 2012 00:20:39 -0500 Subject: fix --use-system-snappy SERVER-4634 --- third_party/snappy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/snappy.py b/third_party/snappy.py index e53ee632bbd..e9881106c87 100644 --- a/third_party/snappy.py +++ b/third_party/snappy.py @@ -11,4 +11,4 @@ def configure( env , fileLists , options ): fileLists["serverOnlyFiles"] += [ myenv.Object(f) for f in files ] def configureSystem( env , fileLists , options ): - configure( env , fileLists , options ) + env.Append( LIBS=[ "snappy" ] ) -- cgit v1.2.1