SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-trigger-udev.patch
Robert Schweikert 5fb133e521 - Update to version 19.1 (bsc#1136440)
+ Remove, included upstream
    - fix-default-systemd-unit-dir.patch
    - cloud-init-sysconf-ethsetup.patch
    - cloud-init-handle-def-route-set.patch
    - cloud-init-no-empty-resolv.patch
    - cloud-init-proper-ipv6-varname.patch
  + Forward port
    - cloud-init-trigger-udev.patch
  + Add cloud-init-detect-nova.diff (bsc#1136440)
  + Modify cloud-init-python2-sigpipe.patch, import signal and constants
  + Update spec to account for new location of bash completion
  + freebsd: add chpasswd pkg in the image [Gonéri Le Bouder]
  + tests: add Eoan release [Paride Legovini]
  + cc_mounts: check if mount -a on no-change fstab path
    [Jason Zions (MSFT)] (LP: #1825596)
  + replace remaining occurrences of LOG.warn [Daniel Watkins]
  + DataSourceAzure: Adjust timeout for polling IMDS [Anh Vo]
  + Azure: Changes to the Hyper-V KVP Reporter [Anh Vo]
  + git tests: no longer show warning about safe yaml.
  + tools/read-version: handle errors [Chad Miller]
  + net/sysconfig: only indicate available on known sysconfig distros
    (LP: #1819994)
  + packages: update rpm specs for new bash completion path
    [Daniel Watkins] (LP: #1825444)
  + test_azure: mock util.SeLinuxGuard where needed
    [Jason Zions (MSFT)] (LP: #1825253)
  + setup.py: install bash completion script in new location [Daniel Watkins]
  + mount_cb: do not pass sync and rw options to mount
    [Gonéri Le Bouder] (LP: #1645824)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=138
2019-06-09 11:04:38 +00:00

37 lines
1.7 KiB
Diff

--- cloudinit/distros/opensuse.py.orig
+++ cloudinit/distros/opensuse.py
@@ -38,6 +38,8 @@ class Distro(distros.Distro):
'sysconfig': {
'control': 'etc/sysconfig/network/config',
'iface_templates': '%(base)s/network/ifcfg-%(name)s',
+ 'netrules_path': (
+ 'etc/udev/rules.d/85-persistent-net-cloud-init.rules'),
'route_templates': {
'ipv4': '%(base)s/network/ifroute-%(name)s',
'ipv6': '%(base)s/network/ifroute-%(name)s',
--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -8,6 +8,7 @@ import six
from cloudinit.distros.parsers import networkmanager_conf
from cloudinit.distros.parsers import resolv_conf
from cloudinit import log as logging
+from cloudinit import net
from cloudinit import util
from configobj import ConfigObj
@@ -699,6 +700,14 @@ class Renderer(renderer.Renderer):
if nm_conf_content:
util.write_file(nm_conf_path, nm_conf_content, file_mode)
if self.netrules_path:
+ # When many interfaces are present it can happen that we get here
+ # before they are all setup. Settle if that is the case.
+ for iface in network_state.iter_interfaces(
+ renderer.filter_by_physical):
+ path = net.sys_dev_path(str(iface))
+ if not os.path.exists(path):
+ util.udevadm_settle(path, 5)
+ break
netrules_content = self._render_persistent_net(network_state)
netrules_path = util.target_path(target, self.netrules_path)
util.write_file(netrules_path, netrules_content, file_mode)