diff options
| author | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-02-10 11:39:24 +0900 |
|---|---|---|
| committer | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-02-10 11:39:24 +0900 |
| commit | 2b7e2e8c1479fd2931ad6d99a9c1865976e44c21 (patch) | |
| tree | 302c0bf498dfc6881579153de6c8e547096c7a5d /bin/stack | |
| parent | 09f2c4729456443c4874a8cadc53299817d6371a (diff) | |
| parent | 035136525ef7944d3da4dcf8a4b0d28840bdfae3 (diff) | |
1. Merged to rev654(?)
2. Fixed bug continuous request.
if user continuouslly send live-migration request to same host,
concurrent request to iptables occurs, and iptables complains.
This version add retry for this issue.
NOTE: Dont use this version b/c cannot ping to instances.
we know fixing linux_net.py works well for this issue,
but hopefully rev655 change correct this..
Diffstat (limited to 'bin/stack')
| -rwxr-xr-x | bin/stack | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -22,6 +22,7 @@ import eventlet eventlet.monkey_patch() +import json import os import pprint import sys @@ -38,7 +39,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) import gflags -from nova import utils FLAGS = gflags.FLAGS @@ -106,8 +106,12 @@ def do_request(controller, method, params=None): 'X-OpenStack-Project': FLAGS.project} req = urllib2.Request(url, data, headers) - resp = urllib2.urlopen(req) - return utils.loads(resp.read()) + try: + resp = urllib2.urlopen(req) + except urllib2.HTTPError, e: + print e.read() + sys.exit(1) + return json.loads(resp.read()) if __name__ == '__main__': |
