diff --git a/cloud-init-write-routes.patch b/cloud-init-write-routes.patch index 348d606..92573e8 100644 --- a/cloud-init-write-routes.patch +++ b/cloud-init-write-routes.patch @@ -8,7 +8,7 @@ from cloudinit import helpers from cloudinit import log as logging -@@ -172,7 +173,47 @@ class Distro(distros.Distro): +@@ -172,7 +173,53 @@ class Distro(distros.Distro): util.write_file(out_fn, str(conf), 0o644) def _write_network_config(self, netconfig): @@ -34,12 +34,18 @@ + for subnet in subnets: + routes = subnet.get('routes', []) + for route in routes: -+ dest = route.get('network') ++ dest = route.get('destination') + if dest in default_nets: + dest = 'default' + if dest != 'default': -+ prefix = mask_to_net_prefix(route.get('netmask')) -+ dest += '/' + str(prefix) ++ netmask = route.get('genmask') ++ if netmask: ++ prefix = mask_to_net_prefix(netmask) ++ dest += '/' + str(prefix) ++ if '/' not in dest: ++ LOG.warning( ++ 'Route destination has no prefix "%s"', dest ++ ) + gateway = route.get('gateway') + config_routes += ' '.join( + [dest, gateway, '-', '-\n'] diff --git a/cloud-init.changes b/cloud-init.changes index 30d104a..dfbf5f0 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 12 19:30:42 UTC 2020 - Robert Schweikert + +- Update cloud-init-write-routes.patch (bsc#1163178) + + Entries in the routes definition have changed causing a traceback + during rout config file writing. This patch update addresses the + issue by extracting the new entries properly. + ------------------------------------------------------------------- Fri Jan 17 18:55:41 UTC 2020 - Robert Schweikert