Files
devstack-gate/slave_scripts/ping.py
James E. Blair 7874c0cec0 Add bare metal deployment scripts.
Add ping.py so we can test when a host is up.  ping -c 2 -w 90 will
almost do the right thing, but will exit on a icmp host unreachable.
We need to continue to wait.  ping.py just waits for an answer to a
ping.

Parallelize building the compute nodes (but not the head node).

Kill ping process in ping.py.

Copy PIP cache to host before running.

Add syslog artifacts.
Remove known_host weirdness, depend on .ssh/config instead.

Change-Id: I65a12074cf80feb3ae69d15c81ba32a81566b22a
2011-10-19 20:59:08 -04:00

12 lines
228 B
Python
Executable File

#!/usr/bin/env python
import sys
from subprocess import *
p = Popen(["ping", sys.argv[1]], stdout=PIPE)
while True:
line = p.stdout.readline().strip()
if 'bytes from' in line:
p.terminate()
sys.exit(0)