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

View File

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