- 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:
parent
828bba4cbb
commit
15c55ee57e
@ -51,6 +51,8 @@ Index: cloudinit/distros/opensuse.py
|
|||||||
+ dest = route.get('destination') or route.get('network')
|
+ dest = route.get('destination') or route.get('network')
|
||||||
+ if not dest or dest in default_nets:
|
+ if not dest or dest in default_nets:
|
||||||
+ dest = 'default'
|
+ dest = 'default'
|
||||||
|
+ if not has_default_route:
|
||||||
|
+ has_default_route = True
|
||||||
+ if dest != 'default':
|
+ if dest != 'default':
|
||||||
+ netmask = route.get('netmask')
|
+ netmask = route.get('netmask')
|
||||||
+ if netmask:
|
+ if netmask:
|
||||||
@ -61,6 +63,12 @@ Index: cloudinit/distros/opensuse.py
|
|||||||
+ 'Skipping route; has no prefix "%s"', dest
|
+ 'Skipping route; has no prefix "%s"', dest
|
||||||
+ )
|
+ )
|
||||||
+ continue
|
+ continue
|
||||||
|
+ gateway = route.get('gateway')
|
||||||
|
+ if not gateway:
|
||||||
|
+ LOG.warning(
|
||||||
|
+ 'Missing gateway for "%s", skipping', dest
|
||||||
|
+ )
|
||||||
|
+ continue
|
||||||
+ if (
|
+ if (
|
||||||
+ dest == 'default' and
|
+ dest == 'default' and
|
||||||
+ has_default_route and
|
+ has_default_route and
|
||||||
@ -74,14 +82,6 @@ Index: cloudinit/distros/opensuse.py
|
|||||||
+ if_name, dest_info
|
+ if_name, dest_info
|
||||||
+ )
|
+ )
|
||||||
+ continue
|
+ 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(
|
+ config_routes += ' '.join(
|
||||||
+ [dest, gateway, '-', '-\n']
|
+ [dest, gateway, '-', '-\n']
|
||||||
+ )
|
+ )
|
||||||
|
@ -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>
|
Mon Jan 4 19:52:33 UTC 2021 - Robert Schweikert <rjschwei@suse.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user