]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add documentation to reboot()
authorZack Cerza <zack@cerza.org>
Wed, 12 Feb 2014 16:53:01 +0000 (10:53 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 20 Feb 2014 23:46:08 +0000 (17:46 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/task/devstack.py

index 6d8575bf3f7ff458717fce06fa4dd00caabff272..07a7961e56f3554164f8c084e3a90d9efe008823 100644 (file)
@@ -257,6 +257,18 @@ def set_apache_servername(node):
 
 
 def reboot(node, timeout=300, interval=30):
+    """
+    Reboots a given system, then waits for it to come back up and
+    re-establishes the ssh connection.
+
+    :param node: The teuthology.orchestra.remote.Remote object of the node
+    :param timeout: The amount of time, in seconds, after which to give up
+                    waiting for the node to return
+    :param interval: The amount of time, in seconds, to wait between attempts
+                     to re-establish with the node. This should not be set to
+                     less than maybe 10, to make sure the node actually goes
+                     down first.
+    """
     log.info("Rebooting {host}...".format(host=node.hostname))
     node.run(args=['sudo', 'shutdown', '-r', 'now'])
     reboot_start_time = time.time()