Add a test opcode that sleeps for a given duration
[ganeti-local] / daemons / ganeti-noded
index 30f3b54..f344474 100755 (executable)
@@ -476,6 +476,16 @@ class ServerObject(pb.Avatar):
     hr = backend.HooksRunner()
     return hr.RunHooks(hpath, phase, env)
 
+  # test -----------------------
+
+  @staticmethod
+  def perspective_test_delay(params):
+    """Run test delay.
+
+    """
+    duration = params[0]
+    return utils.TestDelay(duration)
+
 
 class MyRealm:
   """Simple realm that forwards all requests to a ServerObject.
@@ -519,6 +529,7 @@ def main():
 
   """
   options, args = ParseOptions()
+  utils.debug = options.debug
   for fname in (constants.SSL_CERT_FILE,):
     if not os.path.isfile(fname):
       print "config %s not there, will not run." % fname