forked from pool/cloud-init
Accepting request 746646 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/746646 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=64
This commit is contained in:
commit
6dbf527a2c
@ -1,6 +1,14 @@
|
||||
--- cloudinit/distros/opensuse.py.orig
|
||||
+++ cloudinit/distros/opensuse.py
|
||||
@@ -172,7 +172,48 @@ class Distro(distros.Distro):
|
||||
@@ -11,6 +11,7 @@
|
||||
from cloudinit import distros
|
||||
|
||||
from cloudinit.distros.parsers.hostname import HostnameConf
|
||||
+from cloudinit.net.network_state import mask_to_net_prefix
|
||||
|
||||
from cloudinit import helpers
|
||||
from cloudinit import log as logging
|
||||
@@ -172,7 +173,47 @@ class Distro(distros.Distro):
|
||||
util.write_file(out_fn, str(conf), 0o644)
|
||||
|
||||
def _write_network_config(self, netconfig):
|
||||
@ -29,20 +37,19 @@
|
||||
+ dest = route.get('network')
|
||||
+ if dest in default_nets:
|
||||
+ dest = 'default'
|
||||
+ gateway = route.get('gateway')
|
||||
+ config_routes += ' '.join([dest, gateway])
|
||||
+ if dest != 'default':
|
||||
+ config_routes += ' ' + route.get('netmask', '')
|
||||
+ else:
|
||||
+ config_routes += ' -'
|
||||
+ config_routes += ' -'
|
||||
+ config_routes += '\n'
|
||||
+ prefix = mask_to_net_prefix(route.get('netmask'))
|
||||
+ dest += '/' + str(prefix)
|
||||
+ gateway = route.get('gateway')
|
||||
+ config_routes += ' '.join(
|
||||
+ [dest, gateway, '-', '-\n']
|
||||
+ )
|
||||
+ if not config_routes:
|
||||
+ dest = 'default'
|
||||
+ gateway = subnet.get('gateway')
|
||||
+ if gateway:
|
||||
+ config_routes += ' '.join(
|
||||
+ [dest, gateway, '-', '-', '\n']
|
||||
+ [dest, gateway, '-', '-\n']
|
||||
+ )
|
||||
+ if config_routes:
|
||||
+ route_file = '/etc/sysconfig/network/ifroute-%s' % if_name
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 6 14:43:54 UTC 2019 - Petr Pavlu <petr.pavlu@suse.com>
|
||||
|
||||
- Update cloud-init-write-routes.patch (bsc#1155376)
|
||||
+ Write a route's destination network in CIDR notation instead of using the
|
||||
netmask. This provides support for correctly recording IPv6 routes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 22 19:57:22 UTC 2019 - Robert Schweikert <rjschwei@suse.com>
|
||||
|
||||
|
@ -49,7 +49,7 @@ Patch50: cloud-init-noresolv-merge-no-dns-data.diff
|
||||
Patch51: cloud-init-after-wicked.patch
|
||||
# FIXME (lp#1849296)
|
||||
Patch52: cloud-init-break-resolv-symlink.patch
|
||||
# FIXME (lp#1849378)
|
||||
# FIXME (lp#1849378) expected in 19.3
|
||||
Patch53: cloud-init-renderer-detect.patch
|
||||
|
||||
BuildRequires: fdupes
|
||||
|
Loading…
Reference in New Issue
Block a user