Browse Source

Increased wait time after libvirt is started

Junaid Ali 2 years ago
parent
commit
cc85394f86
2 changed files with 7 additions and 18 deletions
  1. 7
    17
      hooks/pg_gw_utils.py
  2. 0
    1
      templates/kilo/ifcs.conf

+ 7
- 17
hooks/pg_gw_utils.py View File

@@ -92,7 +92,7 @@ def configure_pg_sources():
92 92
             sources.truncate()
93 93
         sources.close()
94 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
 
98 98
 def determine_packages():
@@ -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