log.info('ceph-fuse is mounted on %s', mountpoint)
+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()
+ while time.time() - reboot_start_time < timeout:
+ time.sleep(interval)
+ if node.is_online or node.reconnect():
+ return
+ raise RuntimeError(
+ "{host} did not come up after reboot within {time}s".format(
+ host=node.hostname, time=timeout))
+
+
def reconnect(ctx, timeout, remotes=None):
"""
Connect to all the machines in ctx.cluster.
update_devstack_config_files(devstack_node, secret_uuid)
set_apache_servername(devstack_node)
# Rebooting is the most-often-used method of restarting devstack services
- reboot(devstack_node)
+ misc.reboot(devstack_node)
start_devstack(devstack_node)
restart_apache(devstack_node)
"ServerName {name}".format(name=hostname))
-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()
- while time.time() - reboot_start_time < timeout:
- time.sleep(interval)
- if node.is_online or node.reconnect():
- return
- raise RuntimeError(
- "{host} did not come up after reboot within {time}s".format(
- host=node.hostname, time=timeout))
-
-
def start_devstack(devstack_node):
log.info("Patching devstack start script...")
# This causes screen to start headless - otherwise rejoin-stack.sh fails