summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2010-08-20 01:24:59 +0000
committerTarmac <>2010-08-20 01:24:59 +0000
commitcfe3b2a6dd73e56652f99a573c1bb0abe5a648d4 (patch)
treee2d169de490742905798f87c47202b59c3c6e0d7 /bin
parent49ef2b293429c9f9b3d7444402e3f7d3d0570d48 (diff)
parente5a448a616173cd391aaf458f5e0e5ff94a42c89 (diff)
Check exit codes when spawning processes by default
Also pass --fail to curl so that it sets exit code when download fails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-import-canonical-imagestore6
-rwxr-xr-xbin/nova-manage3
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/nova-import-canonical-imagestore b/bin/nova-import-canonical-imagestore
index e6931d9db..2bc61cf0c 100755
--- a/bin/nova-import-canonical-imagestore
+++ b/bin/nova-import-canonical-imagestore
@@ -56,21 +56,21 @@ def download(img):
for f in img['files']:
if f['kind'] == 'kernel':
dest = os.path.join(tempdir, 'kernel')
- subprocess.call(['curl', f['url'], '-o', dest])
+ subprocess.call(['curl', '--fail', f['url'], '-o', dest])
kernel_id = image.Image.add(dest,
description='kernel/' + img['title'], kernel=True)
for f in img['files']:
if f['kind'] == 'ramdisk':
dest = os.path.join(tempdir, 'ramdisk')
- subprocess.call(['curl', f['url'], '-o', dest])
+ subprocess.call(['curl', '--fail', f['url'], '-o', dest])
ramdisk_id = image.Image.add(dest,
description='ramdisk/' + img['title'], ramdisk=True)
for f in img['files']:
if f['kind'] == 'image':
dest = os.path.join(tempdir, 'image')
- subprocess.call(['curl', f['url'], '-o', dest])
+ subprocess.call(['curl', '--fail', f['url'], '-o', dest])
ramdisk_id = image.Image.add(dest,
description=img['title'], kernel=kernel_id, ramdisk=ramdisk_id)
diff --git a/bin/nova-manage b/bin/nova-manage
index 33141a49e..145294d3d 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -56,7 +56,8 @@ class VpnCommands(object):
vpn = self._vpn_for(project.id)
if vpn:
command = "ping -c1 -w1 %s > /dev/null; echo $?"
- out, _err = utils.execute(command % vpn['private_dns_name'])
+ out, _err = utils.execute( command % vpn['private_dns_name'],
+ check_exit_code=False)
if out.strip() == '0':
net = 'up'
else: