SHA256
1
0
forked from pool/cloud-init

- Update cloud-init-write-routes.patch (bsc#1180176)

+ Follow up to previous changes. Fix order of operations
    error to make gateway comparison between subnet configuration and
    route configuration valuable rather than self-comparing.

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=181
This commit is contained in:
Robert Schweikert 2021-01-04 22:34:44 +00:00 committed by Git OBS Bridge
parent 828bba4cbb
commit 15c55ee57e
2 changed files with 16 additions and 8 deletions

View File

@ -51,6 +51,8 @@ Index: cloudinit/distros/opensuse.py
+ dest = route.get('destination') or route.get('network')
+ if not dest or dest in default_nets:
+ dest = 'default'
+ if not has_default_route:
+ has_default_route = True
+ if dest != 'default':
+ netmask = route.get('netmask')
+ if netmask:
@ -61,6 +63,12 @@ Index: cloudinit/distros/opensuse.py
+ 'Skipping route; has no prefix "%s"', dest
+ )
+ continue
+ gateway = route.get('gateway')
+ if not gateway:
+ LOG.warning(
+ 'Missing gateway for "%s", skipping', dest
+ )
+ continue
+ if (
+ dest == 'default' and
+ has_default_route and
@ -74,14 +82,6 @@ Index: cloudinit/distros/opensuse.py
+ if_name, dest_info
+ )
+ continue
+ if dest == 'default' and not has_default_route:
+ has_default_route = True
+ gateway = route.get('gateway')
+ if not gateway:
+ LOG.warning(
+ 'Missing gateway for "%s", skipping', dest
+ )
+ continue
+ config_routes += ' '.join(
+ [dest, gateway, '-', '-\n']
+ )

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jan 4 22:27:22 UTC 2021 - Robert Schweikert <rjschwei@suse.com>
- Update cloud-init-write-routes.patch (bsc#1180176)
+ Follow up to previous changes. Fix order of operations
error to make gateway comparison between subnet configuration and
route configuration valuable rather than self-comparing.
-------------------------------------------------------------------
Mon Jan 4 19:52:33 UTC 2021 - Robert Schweikert <rjschwei@suse.com>