summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunaid Ali <junaidali@plumgrid.com>2016-06-09 22:34:55 +0500
committerJunaid Ali <junaidali@plumgrid.com>2016-06-09 22:34:55 +0500
commitcc85394f86d7c9400359de12482ecf14129ebc9c (patch)
tree0c6cfcb125070d7e4527fd69a7c647e56ede4ff7
parent4999e4d5f3a356f271b15b5983a51a914dca22d3 (diff)
parent09d7746a022f921715532e0e417e852c30426361 (diff)
Increased wait time after libvirt is started
-rw-r--r--hooks/pg_gw_utils.py24
-rw-r--r--templates/kilo/ifcs.conf1
2 files changed, 7 insertions, 18 deletions
diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py
index 98ad4a4..5f216ee 100644
--- a/hooks/pg_gw_utils.py
+++ b/hooks/pg_gw_utils.py
@@ -92,7 +92,7 @@ def configure_pg_sources():
92 sources.truncate() 92 sources.truncate()
93 sources.close() 93 sources.close()
94 except IOError: 94 except IOError:
95 raise IOError('Unable to access /etc/apt/sources.list') 95 log('Unable to update /etc/apt/sources.list')
96 96
97 97
98def determine_packages(): 98def determine_packages():
@@ -285,22 +285,12 @@ def get_gw_interfaces():
285 Gateway node can have multiple interfaces. This function parses json 285 Gateway node can have multiple interfaces. This function parses json
286 provided in config to get all gateway interfaces for this node. 286 provided in config to get all gateway interfaces for this node.
287 ''' 287 '''
288 node_interfaces = [] 288 interface = config('external-interfaces')
289 try: 289 if not interface_exists(interface):
290 all_interfaces = json.loads(config('external-interfaces')) 290 log('Provided gateway interface %s does not exist'
291 except ValueError: 291 % interface)
292 raise ValueError("Invalid json provided for gateway interfaces") 292 raise ValueError('Provided gateway interface does not exist')
293 hostname = get_unit_hostname() 293 return interface
294 if hostname in all_interfaces:
295 node_interfaces = all_interfaces[hostname].split(',')
296 elif 'DEFAULT' in all_interfaces:
297 node_interfaces = all_interfaces['DEFAULT'].split(',')
298 for interface in node_interfaces:
299 if not interface_exists(interface):
300 log('Provided gateway interface %s does not exist'
301 % interface)
302 raise ValueError('Provided gateway interface does not exist')
303 return node_interfaces
304 294
305 295
306def ensure_mtu(): 296def ensure_mtu():
diff --git a/templates/kilo/ifcs.conf b/templates/kilo/ifcs.conf
index e7535cb..88c7091 100644
--- a/templates/kilo/ifcs.conf
+++ b/templates/kilo/ifcs.conf
@@ -4,4 +4,3 @@
4{{ dev }} = access_phys 4{{ dev }} = access_phys
5{% endfor -%} 5{% endfor -%}
6{% endif -%} 6{% endif -%}
7