Browse Source

Increased wait time after libvirt is started

Junaid Ali 2 years ago
parent
commit
50e520dce7
2 changed files with 6 additions and 17 deletions
  1. 6
    16
      hooks/pg_gw_utils.py
  2. 0
    1
      templates/kilo/ifcs.conf

+ 6
- 16
hooks/pg_gw_utils.py View File

@@ -285,22 +285,12 @@ def get_gw_interfaces():
285 285
     Gateway node can have multiple interfaces. This function parses json
286 286
     provided in config to get all gateway interfaces for this node.
287 287
     '''
288
-    node_interfaces = []
289
-    try:
290
-        all_interfaces = json.loads(config('external-interfaces'))
291
-    except ValueError:
292
-        raise ValueError("Invalid json provided for gateway interfaces")
293
-    hostname = get_unit_hostname()
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
288
+    interface = config('external-interfaces')
289
+    if not interface_exists(interface):
290
+        log('Provided gateway interface %s does not exist'
291
+            % interface)
292
+        raise ValueError('Provided gateway interface does not exist')
293
+    return interface
304 294
 
305 295
 
306 296
 def ensure_mtu():

+ 0
- 1
templates/kilo/ifcs.conf View File

@@ -4,4 +4,3 @@
4 4
 {{ dev }} = access_phys
5 5
 {% endfor -%}
6 6
 {% endif -%}
7
-

Loading…
Cancel
Save