Increased wait time after libvirt is started

This commit is contained in:
Junaid Ali 2016-06-09 22:34:55 +05:00
commit cc85394f86
2 changed files with 7 additions and 18 deletions

View File

@ -92,7 +92,7 @@ def configure_pg_sources():
sources.truncate() sources.truncate()
sources.close() sources.close()
except IOError: except IOError:
raise IOError('Unable to access /etc/apt/sources.list') log('Unable to update /etc/apt/sources.list')
def determine_packages(): def determine_packages():
@ -285,22 +285,12 @@ def get_gw_interfaces():
Gateway node can have multiple interfaces. This function parses json Gateway node can have multiple interfaces. This function parses json
provided in config to get all gateway interfaces for this node. provided in config to get all gateway interfaces for this node.
''' '''
node_interfaces = [] interface = config('external-interfaces')
try: if not interface_exists(interface):
all_interfaces = json.loads(config('external-interfaces')) log('Provided gateway interface %s does not exist'
except ValueError: % interface)
raise ValueError("Invalid json provided for gateway interfaces") raise ValueError('Provided gateway interface does not exist')
hostname = get_unit_hostname() return interface
if hostname in all_interfaces:
node_interfaces = all_interfaces[hostname].split(',')
elif 'DEFAULT' in all_interfaces:
node_interfaces = all_interfaces['DEFAULT'].split(',')
for interface in node_interfaces:
if not interface_exists(interface):
log('Provided gateway interface %s does not exist'
% interface)
raise ValueError('Provided gateway interface does not exist')
return node_interfaces
def ensure_mtu(): def ensure_mtu():

View File

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