Index: fedd/federation/access.py
===================================================================
--- fedd/federation/access.py	(revision 5ae3857d794c318c83d4c8aadae1660dcec2aa11)
+++ fedd/federation/access.py	(revision fd556d1ae147804253b4b3c1c6e89d10300f650a)
@@ -1353,8 +1353,11 @@
 	self.generate_ns2(topo, expfile, 
 		"/proj/%s/software/%s/" % (proj, ename), master)
-	starter = self.start_segment(keyfile=self.ssh_privkey_file, debug=self.create_debug)
-	starter(self, ename, proj, user, expfile, tmpdir)
-
-	return { 'allocID': req['allocID'] }
+	starter = self.start_segment(keyfile=self.ssh_privkey_file, 
+		debug=self.create_debug)
+	rv = starter(self, ename, proj, user, expfile, tmpdir)
+	if rv:
+	    return { 'allocID': req['allocID'] }
+	else:
+	    raise service_error(service_error.federant, "Swapin failed")
 
     def TerminateSegment(self, req, fid):
@@ -1392,6 +1395,6 @@
 	    raise service_error(service_error.internal, 
 		    "Can't find experiment name for %s" % aid)
-	stopper = self.stop_segment(keyfile=self.ssh_privkey_file, debug=self.create_debug)
+	stopper = self.stop_segment(keyfile=self.ssh_privkey_file,
+		debug=self.create_debug)
 	stopper(self, user, proj, ename)
-	print { 'allocID': req['allocID'] }
 	return { 'allocID': req['allocID'] }
Index: fedd/federation/experiment_control.py
===================================================================
--- fedd/federation/experiment_control.py	(revision 5ae3857d794c318c83d4c8aadae1660dcec2aa11)
+++ fedd/federation/experiment_control.py	(revision fd556d1ae147804253b4b3c1c6e89d10300f650a)
@@ -2143,5 +2143,5 @@
 
     class new_start_segment:
-	def __init__(self, debug=False, log=None, cert_file=None,
+	def __init__(self, debug=False, log=None, testbed="", cert_file=None,
 		cert_pwd=None, trusted_certs=None, caller=None):
 	    self.log = log
@@ -2151,4 +2151,5 @@
 	    self.trusted_certs = None
 	    self.caller = caller
+	    self.testbed = testbed
 
 	def __call__(self, uri, aid, topo, master, attrs=None):
@@ -2163,14 +2164,17 @@
 		req['fedAttr'] = attrs
 
-	    print req
-	    r = self.caller(uri, req, self.cert_file, self.cert_pwd,
-		    self.trusted_certs)
-	    print r
-	    return True
+	    try:
+		r = self.caller(uri, req, self.cert_file, self.cert_pwd,
+			self.trusted_certs)
+		return True
+	    except service_error, e:
+		self.log.error("Start segment failed on %s: %s" % \
+			(self.testbed, e))
+		return False
 
 
 
     class new_terminate_segment:
-	def __init__(self, debug=False, log=None, cert_file=None,
+	def __init__(self, debug=False, log=None, testbed="", cert_file=None,
 		cert_pwd=None, trusted_certs=None, caller=None):
 	    self.log = log
@@ -2180,4 +2184,5 @@
 	    self.trusted_certs = None
 	    self.caller = caller
+	    self.testbed = testbed
 
 	def __call__(self, uri, aid ):
@@ -2186,7 +2191,12 @@
 		    'allocID': aid , 
 		}
-	    r = self.caller(uri, req, self.cert_file, self.cert_pwd,
-		    self.trusted_certs)
-	    return True
+	    try:
+		r = self.caller(uri, req, self.cert_file, self.cert_pwd,
+			self.trusted_certs)
+		return True
+	    except service_error, e:
+		self.log.error("Terminate segment failed on %s: %s" % \
+			(self.testbed, e))
+		return False
 
 
@@ -2224,5 +2234,6 @@
             t  = self.pooled_thread(\
                     target=self.new_start_segment(log=log, debug=self.debug,
-			cert_file=self.cert_file, cert_pwd=self.cert_pwd,
+			testbed=tb, cert_file=self.cert_file,
+			cert_pwd=self.cert_pwd,
 			trusted_certs=self.trusted_certs,
 			caller=self.call_StartSegment), 
@@ -2251,6 +2262,6 @@
 		    "No alloc id for testbed %s !?" % master)
             starter = self.new_start_segment(log=log, debug=self.debug,
-		    cert_file=self.cert_file, cert_pwd=self.cert_pwd,
-		    trusted_certs=self.trusted_certs,
+		    testbed=master, cert_file=self.cert_file,
+		    cert_pwd=self.cert_pwd, trusted_certs=self.trusted_certs,
 		    caller=self.call_StartSegment)
 	    if not starter(uri, aid, topo[master], True, attrs):
@@ -2267,4 +2278,5 @@
                     t  = self.pooled_thread(\
                             target=self.stop_segment(log=log,
+				testbed=tb,
                                 keyfile=self.ssh_privkey_file,
                                 debug=self.debug), 
@@ -3358,4 +3370,5 @@
                     t  = self.pooled_thread(\
                             target=self.new_terminate_segment(log=dealloc_log,
+				testbed=tb,
 				cert_file=self.cert_file, 
 				cert_pwd=self.cert_pwd,
