- Update to version 21.2 (bsc#1186004)

+ Remove patches included upstream:
    - cloud-init-azure-def-usr-pass.patch
    - cloud-init-after-kvp.diff
    - cloud-init-recognize-hpc.patch
    - use_arroba_to_include_sudoers_directory-bsc_1181283.patch
    - cloud-init-bonding-opts.patch
    - cloud-init-log-file-mode.patch
    - cloud-init-no-pwd-in-log.patch
    - 0001-templater-drop-Jinja-Python-2-compatibility-shim.patch
  + Remove cloud-init-sle12-compat.patch, version in SLE 12 is frozen to 20.2
  + Remove cloud-init-tests-set-exec.patch no longer needed 
  + Forward port:
    - cloud-init-write-routes.patch
    - cloud-init-break-resolv-symlink.patch
    - cloud-init-sysconf-path.patch
    - cloud-init-no-tempnet-oci.patch
  +  Add \r\n check for SSH keys in Azure (#889)
  +  Revert "Add support to resize rootfs if using LVM (#721)" (#887)
     (LP: #1922742)
  +  Add Vultaire as contributor (#881) [Paul Goins]
  +  Azure: adding support for consuming userdata from IMDS (#884) [Anh Vo]
  +  test_upgrade: modify test_upgrade_package to run for more sources (#883)
  +  Fix chef module run failure when chef_license is set (#868) [Ben Hughes]
  +  Azure: Retry net metadata during nic attach for non-timeout errs (#878)
     [aswinrajamannar]
  +  Azure: Retrieve username and hostname from IMDS (#865) [Thomas Stringer]
  +  Azure: eject the provisioning iso before reporting ready (#861) [Anh Vo]
  +  Use `partprobe` to re-read partition table if available (#856)
     [Nicolas Bock] (LP: #1920939)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=189
This commit is contained in:
Robert Schweikert 2021-08-19 12:25:42 +00:00 committed by Git OBS Bridge
parent bf3841c6e3
commit 3aeb460fd5
18 changed files with 583 additions and 504 deletions

View File

@ -1,49 +0,0 @@
From f23a4c4262ac11cd75c99fcbfbfe453f4e115f18 Mon Sep 17 00:00:00 2001
From: Daniel Watkins <oddbloke@ubuntu.com>
Date: Thu, 14 May 2020 23:22:27 -0400
Subject: [PATCH] templater: drop Jinja Python 2 compatibility shim (#353)
---
cloudinit/helpers.py | 4 ----
cloudinit/templater.py | 4 ----
2 files changed, 8 deletions(-)
diff --git a/cloudinit/helpers.py b/cloudinit/helpers.py
index 7d2a330582..9752ad2831 100644
--- a/cloudinit/helpers.py
+++ b/cloudinit/helpers.py
@@ -451,8 +451,4 @@ def stringify(self, header=None):
contents = '\n'.join([header, contents, ''])
return contents
-
-def identity(object):
- return object
-
# vi: ts=4 expandtab
diff --git a/cloudinit/templater.py b/cloudinit/templater.py
index e47cdedaf7..a00ade200c 100644
--- a/cloudinit/templater.py
+++ b/cloudinit/templater.py
@@ -21,13 +21,10 @@
CHEETAH_AVAILABLE = False
try:
- from jinja2.runtime import implements_to_string
from jinja2 import Template as JTemplate
from jinja2 import DebugUndefined as JUndefined
JINJA_AVAILABLE = True
except (ImportError, AttributeError):
- from cloudinit.helpers import identity
- implements_to_string = identity
JINJA_AVAILABLE = False
JUndefined = object
@@ -42,7 +39,6 @@
MISSING_JINJA_PREFIX = u'CI_MISSING_JINJA_VAR/'
-@implements_to_string # Needed for python2.7. Otherwise cached super.__str__
class UndefinedJinjaVariable(JUndefined):
"""Class used to represent any undefined jinja template variable."""

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6729e9093f8252bff44a94ddc814256da6143456929b6731e9b74642cd57e971
size 1117084

3
cloud-init-21.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b40862791eed9644fe735c886a7b4ed78ea4f298def295d82ac45c01278980c7
size 1278878

View File

@ -1,12 +0,0 @@
diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl
index ff9c644d..7166f640 100644
--- a/systemd/cloud-init-local.service.tmpl
+++ b/systemd/cloud-init-local.service.tmpl
@@ -5,6 +5,7 @@ Description=Initial cloud-init job (pre-networking)
DefaultDependencies=no
{% endif %}
Wants=network-pre.target
+After=hv_kvp_daemon.service
After=systemd-remount-fs.service
Before=NetworkManager.service
Before=network-pre.target

View File

@ -1,11 +0,0 @@
--- cloudinit/sources/DataSourceAzure.py.orig
+++ cloudinit/sources/DataSourceAzure.py
@@ -1206,7 +1206,7 @@ def read_azure_ovf(contents):
if password:
defuser['lock_passwd'] = False
if DEF_PASSWD_REDACTION != password:
- defuser['passwd'] = encrypt_pass(password)
+ defuser['passwd'] = cfg['password'] = encrypt_pass(password)
if defuser:
cfg['system_info'] = {'default_user': defuser}

View File

@ -1,70 +0,0 @@
--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -300,7 +300,8 @@ class Renderer(renderer.Renderer):
}
# If these keys exist, then their values will be used to form
- # a BONDING_OPTS grouping; otherwise no grouping will be set.
+ # a BONDING_OPTS / BONDING_MODULE_OPTS grouping; otherwise no
+ # grouping will be set.
bond_tpl_opts = tuple([
('bond_mode', "mode=%s"),
('bond_xmit_hash_policy', "xmit_hash_policy=%s"),
@@ -593,7 +594,7 @@ class Renderer(renderer.Renderer):
route_cfg[new_key] = route[old_key]
@classmethod
- def _render_bonding_opts(cls, iface_cfg, iface):
+ def _render_bonding_opts(cls, iface_cfg, iface, flavor):
bond_opts = []
for (bond_key, value_tpl) in cls.bond_tpl_opts:
# Seems like either dash or underscore is possible?
@@ -606,7 +607,18 @@ class Renderer(renderer.Renderer):
bond_opts.append(value_tpl % (bond_value))
break
if bond_opts:
- iface_cfg['BONDING_OPTS'] = " ".join(bond_opts)
+ # suse uses the sysconfig support which requires
+ # BONDING_MODULE_OPTS see
+ # https://www.kernel.org/doc/Documentation/networking/bonding.txt
+ # 3.1 Configuration with Sysconfig Support
+ if flavor == 'suse':
+ iface_cfg['BONDING_MODULE_OPTS'] = " ".join(bond_opts)
+ # rhel uses initscript support and thus requires BONDING_OPTS
+ # this is also the old default see
+ # https://www.kernel.org/doc/Documentation/networking/bonding.txt
+ # 3.2 Configuration with Initscripts Support
+ else:
+ iface_cfg['BONDING_OPTS'] = " ".join(bond_opts)
@classmethod
def _render_physical_interfaces(
@@ -634,7 +646,7 @@ class Renderer(renderer.Renderer):
for iface in network_state.iter_interfaces(bond_filter):
iface_name = iface['name']
iface_cfg = iface_contents[iface_name]
- cls._render_bonding_opts(iface_cfg, iface)
+ cls._render_bonding_opts(iface_cfg, iface, flavor)
# Ensure that the master interface (and any of its children)
# are actually marked as being bond types...
--- tests/unittests/test_net.py.orig
+++ tests/unittests/test_net.py
@@ -1528,7 +1528,7 @@ pre-down route del -net 10.0.0.0/8 gw 11
'expected_sysconfig_opensuse': {
'ifcfg-bond0': textwrap.dedent("""\
BONDING_MASTER=yes
- BONDING_OPTS="mode=active-backup """
+ BONDING_MODULE_OPTS="mode=active-backup """
"""xmit_hash_policy=layer3+4 """
"""miimon=100"
BONDING_SLAVE_0=eth1
@@ -2114,7 +2114,7 @@ iface bond0 inet6 static
'expected_sysconfig_opensuse': {
'ifcfg-bond0': textwrap.dedent("""\
BONDING_MASTER=yes
- BONDING_OPTS="mode=active-backup xmit_hash_policy=layer3+4 """
+ BONDING_MODULE_OPTS="mode=active-backup xmit_hash_policy=layer3+4 """
"""miimon=100 num_grat_arp=5 """
"""downdelay=10 updelay=20 """
"""fail_over_mac=active """

View File

@ -1,6 +1,6 @@
--- cloudinit/net/sysconfig.py.orig --- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py +++ cloudinit/net/sysconfig.py
@@ -705,6 +705,11 @@ class Renderer(renderer.Renderer): @@ -918,6 +918,11 @@ class Renderer(renderer.Renderer):
resolv_content = self._render_dns(network_state, resolv_content = self._render_dns(network_state,
existing_dns_path=dns_path) existing_dns_path=dns_path)
if resolv_content: if resolv_content:
@ -11,4 +11,4 @@
+ os.unlink(dns_path) + os.unlink(dns_path)
util.write_file(dns_path, resolv_content, file_mode) util.write_file(dns_path, resolv_content, file_mode)
if self.networkmanager_conf_path: if self.networkmanager_conf_path:
nm_conf_path = util.target_path(target, nm_conf_path = subp.target_path(target,

View File

@ -1,11 +0,0 @@
--- cloudinit/stages.py.orig
+++ cloudinit/stages.py
@@ -148,7 +148,7 @@ class Init(object):
util.ensure_dirs(self._initial_subdirs())
log_file = util.get_cfg_option_str(self.cfg, 'def_log_file')
if log_file:
- util.ensure_file(log_file)
+ util.ensure_file(log_file, mode=0o640)
perms = self.cfg.get('syslog_fix_perms')
if not perms:
perms = {}

View File

@ -1,64 +0,0 @@
--- cloudinit/config/cc_set_passwords.py.orig
+++ cloudinit/config/cc_set_passwords.py
@@ -213,7 +213,9 @@ def handle(_name, cfg, cloud, log, args)
if len(randlist):
blurb = ("Set the following 'random' passwords\n",
'\n'.join(randlist))
- sys.stderr.write("%s\n%s\n" % blurb)
+ util.multi_log(
+ "%s\n%s\n" % blurb, stderr=False
+ )
if expire:
expired_users = []
--- cloudinit/config/tests/test_set_passwords.py.orig
+++ cloudinit/config/tests/test_set_passwords.py
@@ -129,27 +129,27 @@ class TestSetPasswordsHandle(CiTestCase)
mock.call(['pw', 'usermod', 'ubuntu', '-p', '01-Jan-1970'])],
m_subp.call_args_list)
- @mock.patch(MODPATH + "util.is_BSD")
- @mock.patch(MODPATH + "util.subp")
- def test_handle_on_chpasswd_list_creates_random_passwords(self, m_subp,
- m_is_bsd):
- """handle parses command set random passwords."""
- m_is_bsd.return_value = False
- cloud = self.tmp_cloud(distro='ubuntu')
- valid_random_pwds = [
- 'root:R',
- 'ubuntu:RANDOM']
- cfg = {'chpasswd': {'expire': 'false', 'list': valid_random_pwds}}
- with mock.patch(MODPATH + 'util.subp') as m_subp:
- setpass.handle(
- 'IGNORED', cfg=cfg, cloud=cloud, log=self.logger, args=[])
- self.assertIn(
- 'DEBUG: Handling input for chpasswd as list.',
- self.logs.getvalue())
- self.assertNotEqual(
- [mock.call(['chpasswd'],
- '\n'.join(valid_random_pwds) + '\n')],
- m_subp.call_args_list)
+# @mock.patch(MODPATH + "util.is_BSD")
+# @mock.patch(MODPATH + "util.subp")
+# def test_handle_on_chpasswd_list_creates_random_passwords(self, m_subp,
+# m_is_bsd):
+# """handle parses command set random passwords."""
+# m_is_bsd.return_value = False
+# cloud = self.tmp_cloud(distro='ubuntu')
+# valid_random_pwds = [
+# 'root:R',
+# 'ubuntu:RANDOM']
+# cfg = {'chpasswd': {'expire': 'false', 'list': valid_random_pwds}}
+# with mock.patch(MODPATH + 'util.subp') as m_subp:
+# setpass.handle(
+# 'IGNORED', cfg=cfg, cloud=cloud, log=self.logger, args=[])
+# self.assertIn(
+# 'DEBUG: Handling input for chpasswd as list.',
+# self.logs.getvalue())
+# self.assertNotEqual(
+# [mock.call(['chpasswd'],
+# '\n'.join(valid_random_pwds) + '\n')],
+# m_subp.call_args_list)
# vi: ts=4 expandtab

View File

@ -1,25 +1,26 @@
--- cloudinit/sources/DataSourceOracle.py.orig --- cloudinit/sources/DataSourceOracle.py.orig
+++ cloudinit/sources/DataSourceOracle.py +++ cloudinit/sources/DataSourceOracle.py
@@ -189,11 +189,17 @@ class DataSourceOracle(sources.DataSourc @@ -133,8 +133,11 @@ class DataSourceOracle(sources.DataSourc
BUILTIN_DS_CONFIG["configure_secondary_nics"]
)
network_context = noop()
- if not _is_iscsi_root():
- network_context = dhcp.EphemeralDHCPv4(net.find_fallback_nic())
+ # SUSE images are built with iSCSI setup. The detection of the
+ # configured network for iscsi boot is distribution dependent.
+ # There's no implementation for openSUSE/SLE yet.
+ #if not _is_iscsi_root():
+ # network_context = dhcp.EphemeralDHCPv4(net.find_fallback_nic())
with network_context:
fetched_metadata = read_opc_metadata(
fetch_vnics_data=fetch_vnics_data
--- cloudinit/sources/tests/test_oracle.py.orig
+++ cloudinit/sources/tests/test_oracle.py
@@ -666,6 +666,7 @@ class TestNonIscsiRoot_GetDataBehaviour:
def test_read_opc_metadata_called_with_ephemeral_dhcp(
self, m_find_fallback_nic, m_EphemeralDHCPv4, oracle_ds
):
+ return
in_context_manager = False
# network may be configured if iscsi root. If that is the case def enter_context_manager():
# then read_initramfs_config will return non-None.
- if _is_iscsi_root():
- data = self.crawl_metadata()
- else:
- with dhcp.EphemeralDHCPv4(net.find_fallback_nic()):
- data = self.crawl_metadata()
+ #if _is_iscsi_root():
+ # data = self.crawl_metadata()
+ #else:
+ # with dhcp.EphemeralDHCPv4(net.find_fallback_nic()):
+ # data = self.crawl_metadata()
+ #
+ # The detection of the configured network for iscsi boot is
+ # distribution dependent and of course only implemented for
+ # Debian/Ubuntu. We know the network is up as we are booting from
+ # iscsi. Skip the BS and just read the damn data
+ data = self.crawl_metadata()
self._crawled_metadata = data
vdata = data['2013-10-17']

View File

@ -1,13 +0,0 @@
--- cloudinit/util.py.orig
+++ cloudinit/util.py
@@ -656,7 +656,9 @@ def system_info():
elif linux_dist == 'redhat':
var = 'rhel'
elif linux_dist in (
- 'opensuse', 'opensuse-tumbleweed', 'opensuse-leap', 'sles'):
+ 'opensuse', 'opensuse-tumbleweed', 'opensuse-leap',
+ 'sles', 'sle_hpc'
+ ):
var = 'suse'
else:
var = 'linux'

View File

@ -1,134 +0,0 @@
--- setup.py.orig
+++ setup.py
@@ -101,10 +101,10 @@ def render_tmpl(template, mode=None):
bname = os.path.basename(template).rstrip(tmpl_ext)
fpath = os.path.join(tmpd, bname)
if VARIANT:
- subprocess.run([sys.executable, './tools/render-cloudcfg', '--variant',
+ subprocess.call([sys.executable, './tools/render-cloudcfg', '--variant',
VARIANT, template, fpath])
else:
- subprocess.run(
+ subprocess.call(
[sys.executable, './tools/render-cloudcfg', template, fpath])
if mode:
os.chmod(fpath, mode)
--- tests/unittests/test_datasource/test_altcloud.py.orig
+++ tests/unittests/test_datasource/test_altcloud.py
@@ -276,43 +276,43 @@ class TestUserDataRhevm(CiTestCase):
'cloudinit.sources.DataSourceAltCloud.util.mount_cb',
'm_mount_cb')
- def test_mount_cb_fails(self):
- '''Test user_data_rhevm() where mount_cb fails.'''
-
- self.m_mount_cb.side_effect = util.MountFailedError("Failed Mount")
- dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
- self.assertEqual(False, dsrc.user_data_rhevm())
-
- def test_modprobe_fails(self):
- '''Test user_data_rhevm() where modprobe fails.'''
-
- self.m_modprobe_floppy.side_effect = util.ProcessExecutionError(
- "Failed modprobe")
- dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
- self.assertEqual(False, dsrc.user_data_rhevm())
-
- def test_no_modprobe_cmd(self):
- '''Test user_data_rhevm() with no modprobe command.'''
-
- self.m_modprobe_floppy.side_effect = util.ProcessExecutionError(
- "No such file or dir")
- dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
- self.assertEqual(False, dsrc.user_data_rhevm())
-
- def test_udevadm_fails(self):
- '''Test user_data_rhevm() where udevadm fails.'''
-
- self.m_udevadm_settle.side_effect = util.ProcessExecutionError(
- "Failed settle.")
- dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
- self.assertEqual(False, dsrc.user_data_rhevm())
-
- def test_no_udevadm_cmd(self):
- '''Test user_data_rhevm() with no udevadm command.'''
-
- self.m_udevadm_settle.side_effect = OSError("No such file or dir")
- dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
- self.assertEqual(False, dsrc.user_data_rhevm())
+# def test_mount_cb_fails(self):
+# '''Test user_data_rhevm() where mount_cb fails.'''
+#
+# self.m_mount_cb.side_effect = util.MountFailedError("Failed Mount")
+# dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
+# self.assertEqual(False, dsrc.user_data_rhevm())
+
+# def test_modprobe_fails(self):
+# '''Test user_data_rhevm() where modprobe fails.'''
+#
+# self.m_modprobe_floppy.side_effect = util.ProcessExecutionError(
+# "Failed modprobe")
+# dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
+# self.assertEqual(False, dsrc.user_data_rhevm())
+
+# def test_no_modprobe_cmd(self):
+# '''Test user_data_rhevm() with no modprobe command.'''
+#
+# self.m_modprobe_floppy.side_effect = util.ProcessExecutionError(
+# "No such file or dir")
+# dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
+# self.assertEqual(False, dsrc.user_data_rhevm())
+
+# def test_udevadm_fails(self):
+# '''Test user_data_rhevm() where udevadm fails.'''
+#
+# self.m_udevadm_settle.side_effect = util.ProcessExecutionError(
+# "Failed settle.")
+# dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
+# self.assertEqual(False, dsrc.user_data_rhevm())
+
+# def test_no_udevadm_cmd(self):
+# '''Test user_data_rhevm() with no udevadm command.'''
+#
+# self.m_udevadm_settle.side_effect = OSError("No such file or dir")
+# dsrc = dsac.DataSourceAltCloud({}, None, self.paths)
+# self.assertEqual(False, dsrc.user_data_rhevm())
class TestUserDataVsphere(CiTestCase):
--- cloudinit/sources/tests/test_oracle.py.orig
+++ cloudinit/sources/tests/test_oracle.py
@@ -484,12 +484,12 @@ class TestNetworkConfigFromOpcImds(test_
self.add_patch(DS_PATH + '.get_interfaces_by_mac',
'm_get_interfaces_by_mac')
- def test_failure_to_readurl(self):
- # readurl failures should just bubble out to the caller
- self.m_readurl.side_effect = Exception('oh no')
- with self.assertRaises(Exception) as excinfo:
- oracle._add_network_config_from_opc_imds({})
- self.assertEqual(str(excinfo.exception), 'oh no')
+# def test_failure_to_readurl(self):
+# # readurl failures should just bubble out to the caller
+# self.m_readurl.side_effect = Exception('oh no')
+# with self.assertRaises(Exception) as excinfo:
+# oracle._add_network_config_from_opc_imds({})
+# self.assertEqual(str(excinfo.exception), 'oh no')
def test_empty_response(self):
# empty response error should just bubble out to the caller
--- cloudinit/tests/test_conftest.py.orig
+++ cloudinit/tests/test_conftest.py
@@ -5,9 +5,9 @@ from cloudinit import util
class TestDisableSubpUsage:
- def test_using_subp_raises_assertion_error(self):
- with pytest.raises(AssertionError):
- util.subp(["some", "args"])
+# def test_using_subp_raises_assertion_error(self):
+# with pytest.raises(AssertionError):
+# util.subp(["some", "args"])
def test_typeerrors_on_incorrect_usage(self):
with pytest.raises(TypeError):

View File

@ -1,7 +1,7 @@
--- cloudinit/net/sysconfig.py.orig --- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py +++ cloudinit/net/sysconfig.py
@@ -891,9 +891,7 @@ def available_sysconfig(target=None): @@ -973,9 +973,7 @@ def available_sysconfig(target=None):
if not util.which(p, search=search, target=target): if not subp.which(p, search=search, target=target):
return False return False
- expected_paths = [ - expected_paths = [
@ -9,5 +9,5 @@
- 'etc/sysconfig/config'] - 'etc/sysconfig/config']
+ expected_paths = ['etc/sysconfig/network/scripts/functions.netconfig'] + expected_paths = ['etc/sysconfig/network/scripts/functions.netconfig']
for p in expected_paths: for p in expected_paths:
if os.path.isfile(util.target_path(target, p)): if os.path.isfile(subp.target_path(target, p)):
return True return True

View File

@ -1,20 +0,0 @@
--- Makefile.orig
+++ Makefile
@@ -11,7 +11,7 @@ PIP_INSTALL := pip install
ifeq ($(PYVER),python3)
pyflakes = pyflakes3
- unittests = unittest3
+ unittests = unittest
yaml = yaml
else
ifeq ($(PYVER),python2)
@@ -19,7 +19,7 @@ ifeq ($(PYVER),python2)
unittests = unittest
else
pyflakes = pyflakes pyflakes3
- unittests = unittest unittest3
+ unittests = unittest unittest
endif
endif

View File

@ -1,16 +1,27 @@
Index: cloudinit/distros/opensuse.py
===================================================================
--- cloudinit/distros/opensuse.py.orig --- cloudinit/distros/opensuse.py.orig
+++ cloudinit/distros/opensuse.py +++ cloudinit/distros/opensuse.py
@@ -11,6 +11,7 @@ @@ -8,9 +8,12 @@
#
# This file is part of cloud-init. See LICENSE file for license information.
+import logging
+
from cloudinit import distros from cloudinit import distros
from cloudinit.distros.parsers.hostname import HostnameConf from cloudinit.distros.parsers.hostname import HostnameConf
+from cloudinit.net.network_state import mask_to_net_prefix +from cloudinit.net.network_state import mask_to_net_prefix
from cloudinit import helpers from cloudinit import helpers
from cloudinit import log as logging from cloudinit import subp
@@ -174,7 +175,147 @@ class Distro(distros.Distro): @@ -19,6 +22,7 @@ from cloudinit import util
from cloudinit.distros import rhel_util as rhutil
from cloudinit.settings import PER_INSTANCE
+LOG = logging.getLogger(__name__)
class Distro(distros.Distro):
clock_conf_fn = '/etc/sysconfig/clock'
@@ -176,7 +180,147 @@ class Distro(distros.Distro):
util.write_file(out_fn, str(conf), 0o644) util.write_file(out_fn, str(conf), 0o644)
def _write_network_config(self, netconfig): def _write_network_config(self, netconfig):

View File

@ -1,8 +1,517 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 12 02:16:08 UTC 2021 - Fusion Future <qydwhotmail@gmail.com> Thu Aug 12 11:27:19 UTC 2021 - Robert Schweikert <rjschwei@suse.com>
- Add cloud-init-update-test-characters-in-substitution-unit-test.patch - Update to version 21.2 (bsc#1186004)
to fix unit test fail in TestGetPackageMirrorInfo::test_substitution. + Remove patches included upstream:
- cloud-init-azure-def-usr-pass.patch
- cloud-init-after-kvp.diff
- cloud-init-recognize-hpc.patch
- use_arroba_to_include_sudoers_directory-bsc_1181283.patch
- cloud-init-bonding-opts.patch
- cloud-init-log-file-mode.patch
- cloud-init-no-pwd-in-log.patch
- 0001-templater-drop-Jinja-Python-2-compatibility-shim.patch
+ Remove cloud-init-sle12-compat.patch, version in SLE 12 is frozen to 20.2
+ Remove cloud-init-tests-set-exec.patch no longer needed
+ Forward port:
- cloud-init-write-routes.patch
- cloud-init-break-resolv-symlink.patch
- cloud-init-sysconf-path.patch
- cloud-init-no-tempnet-oci.patch
+ Add \r\n check for SSH keys in Azure (#889)
+ Revert "Add support to resize rootfs if using LVM (#721)" (#887)
(LP: #1922742)
+ Add Vultaire as contributor (#881) [Paul Goins]
+ Azure: adding support for consuming userdata from IMDS (#884) [Anh Vo]
+ test_upgrade: modify test_upgrade_package to run for more sources (#883)
+ Fix chef module run failure when chef_license is set (#868) [Ben Hughes]
+ Azure: Retry net metadata during nic attach for non-timeout errs (#878)
[aswinrajamannar]
+ Azure: Retrieve username and hostname from IMDS (#865) [Thomas Stringer]
+ Azure: eject the provisioning iso before reporting ready (#861) [Anh Vo]
+ Use `partprobe` to re-read partition table if available (#856)
[Nicolas Bock] (LP: #1920939)
+ fix error on upgrade caused by new vendordata2 attributes (#869)
(LP: #1922739)
+ add prefer_fqdn_over_hostname config option (#859)
[hamalq] (LP: #1921004)
+ Emit dots on travis to avoid timeout (#867)
+ doc: Replace remaining references to user-scripts as a config module
(#866) [Ryan Harper]
+ azure: Removing ability to invoke walinuxagent (#799) [Anh Vo]
+ Add Vultr support (#827) [David Dymko]
+ Fix unpickle for source paths missing run_dir (#863)
[lucasmoura] (LP: #1899299)
+ sysconfig: use BONDING_MODULE_OPTS on SUSE (#831) [Jens Sandmann]
+ bringup_static_routes: fix gateway check (#850) [Petr Fedchenkov]
+ add hamalq user (#860) [hamalq]
+ Add support to resize rootfs if using LVM (#721)
[Eduardo Otubo] (LP: #1799953)
+ Fix mis-detecting network configuration in initramfs cmdline (#844)
(LP: #1919188)
+ tools/write-ssh-key-fingerprints: do not display empty header/footer
(#817) [dermotbradley]
+ Azure helper: Ensure Azure http handler sleeps between retries (#842)
[Johnson Shi]
+ Fix chef apt source example (#826) [timothegenzmer]
+ .travis.yml: generate an SSH key before running tests (#848)
+ write passwords only to serial console, lock down cloud-init-output.log
(#847) (LP: #1918303)
+ Fix apt default integration test (#845)
+ integration_tests: bump pycloudlib dependency (#846)
+ Fix stack trace if vendordata_raw contained an array (#837) [eb3095]
+ archlinux: Fix broken locale logic (#841)
[Kristian Klausen] (LP: #1402406)
+ Integration test for #783 (#832)
+ integration_tests: mount more paths IN_PLACE (#838)
+ Fix requiring device-number on EC2 derivatives (#836) (LP: #1917875)
+ Remove the vi comment from the part-handler example (#835)
+ net: exclude OVS internal interfaces in get_interfaces (#829)
(LP: #1912844)
+ tox.ini: pass OS_* environment variables to integration tests (#830)
+ integration_tests: add OpenStack as a platform (#804)
+ Add flexibility to IMDS api-version (#793) [Thomas Stringer]
+ Fix the TestApt tests using apt-key on Xenial and Hirsute (#823)
[Paride Legovini] (LP: #1916629)
+ doc: remove duplicate "it" from nocloud.rst (#825) [V.I. Wood]
+ archlinux: Use hostnamectl to set the transient hostname (#797)
[Kristian Klausen]
+ cc_keys_to_console.py: Add documentation for recently added config key
(#824) [dermotbradley]
+ Update cc_set_hostname documentation (#818) [Toshi Aoyama]
From 21.1
+ Azure: Support for VMs without ephemeral resource disks. (#800)
[Johnson Shi] (LP: #1901011)
+ cc_keys_to_console: add option to disable key emission (#811)
[Michael Hudson-Doyle] (LP: #1915460)
+ integration_tests: introduce lxd_use_exec mark (#802)
+ azure: case-insensitive UUID to avoid new IID during kernel upgrade
(#798) (LP: #1835584)
+ stale.yml: don't ask submitters to reopen PRs (#816)
+ integration_tests: fix use of SSH agent within tox (#815)
+ integration_tests: add UPGRADE CloudInitSource (#812)
+ integration_tests: use unique MAC addresses for tests (#813)
+ Update .gitignore (#814)
+ Port apt cloud_tests to integration tests (#808)
+ integration_tests: fix test_gh626 on LXD VMs (#809)
+ Fix attempting to decode binary data in test_seed_random_data test (#806)
+ Remove wait argument from tests with session_cloud calls (#805)
+ Datasource for UpCloud (#743) [Antti Myyrä]
+ test_gh668: fix failure on LXD VMs (#801)
+ openstack: read the dynamic metadata group vendor_data2.json (#777)
[Andrew Bogott] (LP: #1841104)
+ includedir in suoders can be prefixed by "arroba" (#783)
[Jordi Massaguer Pla]
+ [VMware] change default max wait time to 15s (#774) [xiaofengw-vmware]
+ Revert integration test associated with reverted #586 (#784)
+ Add jordimassaguerpla as contributor (#787) [Jordi Massaguer Pla]
+ Add Rick Harding to CLA signers (#792) [Rick Harding]
+ HACKING.rst: add clarifying note to LP CLA process section (#789)
+ Stop linting cloud_tests (#791)
+ cloud-tests: update cryptography requirement (#790) [Joshua Powers]
+ Remove 'remove-raise-on-failure' calls from integration_tests (#788)
+ Use more cloud defaults in integration tests (#757)
+ Adding self to cla signers (#776) [Andrew Bogott]
+ doc: avoid two warnings (#781) [Dan Kenigsberg]
+ Use proper spelling for Red Hat (#778) [Dan Kenigsberg]
+ Add antonyc to .github-cla-signers (#747) [Anton Chaporgin]
+ integration_tests: log image serial if available (#772)
+ [VMware] Support cloudinit raw data feature (#691) [xiaofengw-vmware]
+ net: Fix static routes to host in eni renderer (#668) [Pavel Abalikhin]
+ .travis.yml: don't run cloud_tests in CI (#756)
+ test_upgrade: add some missing commas (#769)
+ cc_seed_random: update documentation and fix integration test (#771)
(LP: #1911227)
+ Fix test gh-632 test to only run on NoCloud (#770) (LP: #1911230)
+ archlinux: fix package upgrade command handling (#768) [Bao Trinh]
+ integration_tests: add integration test for LP: #1910835 (#761)
+ Fix regression with handling of IMDS ssh keys (#760) [Thomas Stringer]
+ integration_tests: log cloud-init version in SUT (#758)
+ Add ajmyyra as contributor (#742) [Antti Myyrä]
+ net_convert: add some missing help text (#755)
+ Missing IPV6_AUTOCONF=no to render sysconfig dhcp6 stateful on RHEL
(#753) [Eduardo Otubo]
+ doc: document missing IPv6 subnet types (#744) [Antti Myyrä]
+ Add example configuration for datasource `AliYun` (#751) [Xiaoyu Zhong]
+ integration_tests: add SSH key selection settings (#754)
+ fix a typo in man page cloud-init.1 (#752) [Amy Chen]
+ network-config-format-v2.rst: add Netplan Passthrough section (#750)
+ stale: re-enable post holidays (#749)
+ integration_tests: port ca_certs tests from cloud_tests (#732)
+ Azure: Add telemetry for poll IMDS (#741) [Johnson Shi]
+ doc: move testing section from HACKING to its own doc (#739)
+ No longer allow integration test failures on travis (#738)
+ stale: fix error in definition (#740)
+ integration_tests: set log-cli-level to INFO by default (#737)
+ PULL_REQUEST_TEMPLATE.md: use backticks around commit message (#736)
+ stale: disable check for holiday break (#735)
+ integration_tests: log the path we collect logs into (#733)
+ .travis.yml: add (most) supported Python versions to CI (#734)
+ integration_tests: fix IN_PLACE CLOUD_INIT_SOURCE (#731)
+ cc_ca_certs: add RHEL support (#633) [cawamata]
+ Azure: only generate config for NICs with addresses (#709)
[Thomas Stringer]
+ doc: fix CloudStack configuration example (#707) [Olivier Lemasle]
+ integration_tests: restrict test_lxd_bridge appropriately (#730)
+ Add integration tests for CLI functionality (#729)
+ Integration test for gh-626 (#728)
+ Some test_upgrade fixes (#726)
+ Ensure overriding test vars with env vars works for booleans (#727)
+ integration_tests: port lxd_bridge test from cloud_tests (#718)
+ Integration test for gh-632. (#725)
+ Integration test for gh-671 (#724)
+ integration-requirements.txt: bump pycloudlib commit (#723)
+ Drop unnecessary shebang from cmd/main.py (#722) [Eduardo Otubo]
+ Integration test for LP: #1813396 and #669 (#719)
+ integration_tests: include timestamp in log output (#720)
+ integration_tests: add test for LP: #1898997 (#713)
+ Add integration test for power_state_change module (#717)
+ Update documentation for network-config-format-v2 (#701) [ggiesen]
+ sandbox CA Cert tests to not require ca-certificates (#715)
[Eduardo Otubo]
+ Add upgrade integration test (#693)
+ Integration test for 570 (#712)
+ Add ability to keep snapshotted images in integration tests (#711)
+ Integration test for pull #586 (#706)
+ integration_tests: introduce skipping of tests by OS (#702)
+ integration_tests: introduce IntegrationInstance.restart (#708)
+ Add lxd-vm to list of valid integration test platforms (#705)
+ Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL
(#685) [Eduardo Otubo]
+ Delete image snapshots created for integration tests (#682)
+ Parametrize ssh_keys_provided integration test (#700) [lucasmoura]
+ Drop use_sudo attribute on IntegrationInstance (#694) [lucasmoura]
+ cc_apt_configure: add riscv64 as a ports arch (#687)
[Dimitri John Ledkov]
+ cla: add xnox (#692) [Dimitri John Ledkov]
+ Collect logs from integration test runs (#675)
From 20.4.1
+ Revert "ssh_util: handle non-default AuthorizedKeysFile config (#586)"
From 20.4
+ tox: avoid tox testenv subsvars for xenial support (#684)
+ Ensure proper root permissions in integration tests (#664) [James Falcon]
+ LXD VM support in integration tests (#678) [James Falcon]
+ Integration test for fallocate falling back to dd (#681) [James Falcon]
+ .travis.yml: correctly integration test the built .deb (#683)
+ Ability to hot-attach NICs to preprovisioned VMs before reprovisioning
(#613) [aswinrajamannar]
+ Support configuring SSH host certificates. (#660) [Jonathan Lung]
+ add integration test for LP: #1900837 (#679)
+ cc_resizefs on FreeBSD: Fix _can_skip_ufs_resize (#655)
[Mina Galić] (LP: #1901958, #1901958)
+ DataSourceAzure: push dmesg log to KVP (#670) [Anh Vo]
+ Make mount in place for tests work (#667) [James Falcon]
+ integration_tests: restore emission of settings to log (#657)
+ DataSourceAzure: update password for defuser if exists (#671) [Anh Vo]
+ tox.ini: only select "ci" marked tests for CI runs (#677)
+ Azure helper: Increase Azure Endpoint HTTP retries (#619) [Johnson Shi]
+ DataSourceAzure: send failure signal on Azure datasource failure (#594)
[Johnson Shi]
+ test_persistence: simplify VersionIsPoppedFromState (#674)
+ only run a subset of integration tests in CI (#672)
+ cli: add + -system param to allow validating system user-data on a
machine (#575)
+ test_persistence: add VersionIsPoppedFromState test (#673)
+ introduce an upgrade framework and related testing (#659)
+ add + -no-tty option to gpg (#669) [Till Riedel] (LP: #1813396)
+ Pin pycloudlib to a working commit (#666) [James Falcon]
+ DataSourceOpenNebula: exclude SRANDOM from context output (#665)
+ cloud_tests: add hirsute release definition (#662)
+ split integration and cloud_tests requirements (#652)
+ faq.rst: add warning to answer that suggests running `clean` (#661)
+ Fix stacktrace in DataSourceRbxCloud if no metadata disk is found (#632)
[Scott Moser]
+ Make wakeonlan Network Config v2 setting actually work (#626)
[dermotbradley]
+ HACKING.md: unify network-refactoring namespace (#658) [Mina Galić]
+ replace usage of dmidecode with kenv on FreeBSD (#621) [Mina Galić]
+ Prevent timeout on travis integration tests. (#651) [James Falcon]
+ azure: enable pushing the log to KVP from the last pushed byte (#614)
[Moustafa Moustafa]
+ Fix launch_kwargs bug in integration tests (#654) [James Falcon]
+ split read_fs_info into linux & freebsd parts (#625) [Mina Galić]
+ PULL_REQUEST_TEMPLATE.md: expand commit message section (#642)
+ Make some language improvements in growpart documentation (#649)
[Shane Frasier]
+ Revert ".travis.yml: use a known-working version of lxd (#643)" (#650)
+ Fix not sourcing default 50-cloud-init ENI file on Debian (#598)
[WebSpider]
+ remove unnecessary reboot from gpart resize (#646) [Mina Galić]
+ cloudinit: move dmi functions out of util (#622) [Scott Moser]
+ integration_tests: various launch improvements (#638)
+ test_lp1886531: don't assume /etc/fstab exists (#639)
+ Remove Ubuntu restriction from PR template (#648) [James Falcon]
+ util: fix mounting of vfat on *BSD (#637) [Mina Galić]
+ conftest: improve docstring for disable_subp_usage (#644)
+ doc: add example query commands to debug Jinja templates (#645)
+ Correct documentation and testcase data for some user-data YAML (#618)
[dermotbradley]
+ Hetzner: Fix instance_id / SMBIOS serial comparison (#640)
[Markus Schade]
+ .travis.yml: use a known-working version of lxd (#643)
+ tools/build-on-freebsd: fix comment explaining purpose of the script
(#635) [Mina Galić]
+ Hetzner: initialize instance_id from system-serial-number (#630)
[Markus Schade] (LP: #1885527)
+ Explicit set IPV6_AUTOCONF and IPV6_FORCE_ACCEPT_RA on static6 (#634)
[Eduardo Otubo]
+ get_interfaces: don't exclude Open vSwitch bridge/bond members (#608)
[Lukas Märdian] (LP: #1898997)
+ Add config modules for controlling IBM PowerVM RMC. (#584)
[Aman306] (LP: #1895979)
+ Update network config docs to clarify MAC address quoting (#623)
[dermotbradley]
+ gentoo: fix hostname rendering when value has a comment (#611)
[Manuel Aguilera]
+ refactor integration testing infrastructure (#610) [James Falcon]
+ stages: don't reset permissions of cloud-init.log every boot (#624)
(LP: #1900837)
+ docs: Add how to use cloud-localds to boot qemu (#617) [Joshua Powers]
+ Drop vestigial update_resolve_conf_file function (#620) [Scott Moser]
+ cc_mounts: correctly fallback to dd if fallocate fails (#585)
(LP: #1897099)
+ .travis.yml: add integration-tests to Travis matrix (#600)
+ ssh_util: handle non-default AuthorizedKeysFile config (#586)
[Eduardo Otubo]
+ Multiple file fix for AuthorizedKeysFile config (#60) [Eduardo Otubo]
+ bddeb: new + -packaging-branch argument to pull packaging from branch
(#576) [Paride Legovini]
+ Add more integration tests (#615) [lucasmoura]
+ DataSourceAzure: write marker file after report ready in preprovisioning
(#590) [Johnson Shi]
+ integration_tests: emit settings to log during setup (#601)
+ integration_tests: implement citest tests run in Travis (#605)
+ Add Azure support to integration test framework (#604) [James Falcon]
+ openstack: consider product_name as valid chassis tag (#580)
[Adrian Vladu] (LP: #1895976)
+ azure: clean up and refactor report_diagnostic_event (#563) [Johnson Shi]
+ net: add the ability to blacklist network interfaces based on driver
during enumeration of physical network devices (#591) [Anh Vo]
+ integration_tests: don't error on cloud-init failure (#596)
+ integration_tests: improve cloud-init.log assertions (#593)
+ conftest.py: remove top-level import of httpretty (#599)
+ tox.ini: add integration-tests testenv definition (#595)
+ PULL_REQUEST_TEMPLATE.md: empty checkboxes need a space (#597)
+ add integration test for LP: #1886531 (#592)
+ Initial implementation of integration testing infrastructure (#581)
[James Falcon]
+ Fix name of ntp and chrony service on CentOS and RHEL. (#589)
[Scott Moser] (LP: #1897915)
+ Adding a PR template (#587) [James Falcon]
+ Azure parse_network_config uses fallback cfg when generate IMDS network
cfg fails (#549) [Johnson Shi]
+ features: refresh docs for easier out-of-context reading (#582)
+ Fix typo in resolv_conf module's description (#578) [Wacław Schiller]
+ cc_users_groups: minor doc formatting fix (#577)
+ Fix typo in disk_setup module's description (#579) [Wacław Schiller]
+ Add vendor-data support to seedfrom parameter for NoCloud and OVF (#570)
[Johann Queuniet]
+ boot.rst: add First Boot Determination section (#568) (LP: #1888858)
+ opennebula.rst: minor readability improvements (#573) [Mina Galić]
+ cloudinit: remove unused LOG variables (#574)
+ create a shutdown_command method in distro classes (#567)
[Emmanuel Thomé]
+ user_data: remove unused constant (#566)
+ network: Fix type and respect name when rendering vlan in
sysconfig. (#541) [Eduardo Otubo] (LP: #1788915, #1826608)
+ Retrieve SSH keys from IMDS first with OVF as a fallback (#509)
[Thomas Stringer]
+ Add jqueuniet as contributor (#569) [Johann Queuniet]
+ distros: minor typo fix (#562)
+ Bump the integration-requirements versioned dependencies (#565)
[Paride Legovini]
+ network-config-format-v1: fix typo in nameserver example (#564)
[Stanislas]
+ Run cloud-init-local.service after the hv_kvp_daemon (#505)
[Robert Schweikert]
+ Add method type hints for Azure helper (#540) [Johnson Shi]
+ systemd: add Before=shutdown.target when Conflicts=shutdown.target is
used (#546) [Paride Legovini]
+ LXD: detach network from profile before deleting it (#542)
[Paride Legovini] (LP: #1776958)
+ redhat spec: add missing BuildRequires (#552) [Paride Legovini]
+ util: remove debug statement (#556) [Joshua Powers]
+ Fix cloud config on chef example (#551) [lucasmoura]
From 20.3
+ Azure: Add netplan driver filter when using hv_netvsc driver (#539)
[James Falcon] (LP: #1830740)
+ query: do not handle non-decodable non-gzipped content (#543)
+ DHCP sandboxing failing on noexec mounted /var/tmp (#521) [Eduardo Otubo]
+ Update the list of valid ssh keys. (#487)
[Ole-Martin Bratteng] (LP: #1877869)
+ cmd: cloud-init query to handle compressed userdata (#516) (LP: #1889938)
+ Pushing cloud-init log to the KVP (#529) [Moustafa Moustafa]
+ Add Alpine Linux support. (#535) [dermotbradley]
+ Detect kernel version before swap file creation (#428) [Eduardo Otubo]
+ cli: add devel make-mime subcommand (#518)
+ user-data: only verify mime-types for TYPE_NEEDED and x-shellscript
(#511) (LP: #1888822)
+ DataSourceOracle: retry twice (and document why we retry at all) (#536)
+ Refactor Azure report ready code (#468) [Johnson Shi]
+ tox.ini: pin correct version of httpretty in xenial{,-dev} envs (#531)
+ Support Oracle IMDSv2 API (#528) [James Falcon]
+ .travis.yml: run a doc build during CI (#534)
+ doc/rtd/topics/datasources/ovf.rst: fix doc8 errors (#533)
+ Fix 'Users and Groups' configuration documentation (#530) [sshedi]
+ cloudinit.distros: update docstrings of add_user and create_user (#527)
+ Fix headers for device types in network v2 docs (#532)
[Caleb Xavier Berger]
+ Add AlexBaranowski as contributor (#508) [Aleksander Baranowski]
+ DataSourceOracle: refactor to use only OPC v1 endpoint (#493)
+ .github/workflows/stale.yml: s/Josh/Rick/ (#526)
+ Fix a typo in apt pipelining module (#525) [Xiao Liang]
+ test_util: parametrize devlist tests (#523) [James Falcon]
+ Recognize LABEL_FATBOOT labels (#513) [James Falcon] (LP: #1841466)
+ Handle additional identifier for SLES For HPC (#520) [Robert Schweikert]
+ Revert "test-requirements.txt: pin pytest to <6 (#512)" (#515)
+ test-requirements.txt: pin pytest to <6 (#512)
+ Add "tsanghan" as contributor (#504) [tsanghan]
+ fix brpm building (LP: #1886107)
+ Adding eandersson as a contributor (#502) [Erik Olof Gunnar Andersson]
+ azure: disable bouncing hostname when setting hostname fails (#494)
[Anh Vo]
+ VMware: Support parsing DEFAULT-RUN-POST-CUST-SCRIPT (#441)
[xiaofengw-vmware]
+ DataSourceAzure: Use ValueError when JSONDecodeError is not available
(#490) [Anh Vo]
+ cc_ca_certs.py: fix blank line problem when removing CAs and adding
new one (#483) [dermotbradley]
+ freebsd: py37-serial is now py37-pyserial (#492) [Gonéri Le Bouder]
+ ssh exit with non-zero status on disabled user (#472)
[Eduardo Otubo] (LP: #1170059)
+ cloudinit: remove global disable of pylint W0107 and fix errors (#489)
+ networking: refactor wait_for_physdevs from cloudinit.net (#466)
(LP: #1884626)
+ HACKING.rst: add pytest.param pytest gotcha (#481)
+ cloudinit: remove global disable of pylint W0105 and fix errors (#480)
+ Fix two minor warnings (#475)
+ test_data: fix faulty patch (#476)
+ cc_mounts: handle missing fstab (#484) (LP: #1886531)
+ LXD cloud_tests: support more lxd image formats (#482) [Paride Legovini]
+ Add update_etc_hosts as default module on *BSD (#479) [Adam Dobrawy]
+ cloudinit: fix tip-pylint failures and bump pinned pylint version (#478)
+ Added BirknerAlex as contributor and sorted the file (#477)
[Alexander Birkner]
+ Update list of types of modules in cli.rst [saurabhvartak1982]
+ tests: use markers to configure disable_subp_usage (#473)
+ Add mention of vendor-data to no-cloud format documentation (#470)
[Landon Kirk]
+ Fix broken link to OpenStack metadata service docs (#467)
[Matt Riedemann]
+ Disable ec2 mirror for non aws instances (#390)
[lucasmoura] (LP: #1456277)
+ cloud_tests: don't pass + -python-version to read-dependencies (#465)
+ networking: refactor is_physical from cloudinit.net (#457) (LP: #1884619)
+ Enable use of the caplog fixture in pytest tests, and add a
cc_final_message test using it (#461)
+ RbxCloud: Add support for FreeBSD (#464) [Adam Dobrawy]
+ Add schema for cc_chef module (#375) [lucasmoura] (LP: #1858888)
+ test_util: add (partial) testing for util.mount_cb (#463)
+ .travis.yml: revert to installing ubuntu-dev-tools (#460)
+ HACKING.rst: add details of net refactor tracking (#456)
+ .travis.yml: rationalise installation of dependencies in host (#449)
+ Add dermotbradley as contributor. (#458) [dermotbradley]
+ net/networking: remove unused functions/methods (#453)
+ distros.networking: initial implementation of layout (#391)
+ cloud-init.service.tmpl: use "rhel" instead of "redhat" (#452)
+ Change from redhat to rhel in systemd generator tmpl (#450)
[Eduardo Otubo]
+ Hetzner: support reading user-data that is base64 encoded. (#448)
[Scott Moser] (LP: #1884071)
+ HACKING.rst: add strpath gotcha to testing gotchas section (#446)
+ cc_final_message: don't create directories when writing boot-finished
(#445) (LP: #1883903)
+ .travis.yml: only store new schroot if something has changed (#440)
+ util: add ensure_dir_exists parameter to write_file (#443)
+ printing the error stream of the dhclient process before killing it
(#369) [Moustafa Moustafa]
+ Fix link to the MAAS documentation (#442)
[Paride Legovini] (LP: #1883666)
+ RPM build: disable the dynamic mirror URLs when using a proxy (#437)
[Paride Legovini]
+ util: rename write_file's copy_mode parameter to preserve_mode (#439)
+ .travis.yml: use $TRAVIS_BUILD_DIR for lxd_image caching (#438)
+ cli.rst: alphabetise devel subcommands and add net-convert to list (#430)
+ Default to UTF-8 in /var/log/cloud-init.log (#427) [James Falcon]
+ travis: cache the chroot we use for package builds (#429)
+ test: fix all flake8 E126 errors (#425) [Joshua Powers]
+ Fixes KeyError for bridge with no "parameters:" setting (#423)
[Brian Candler] (LP: #1879673)
+ When tools.conf does not exist, running cmd "vmware-toolbox-cmd
config get deployPkg enable-custom-scripts", the return code will
be EX_UNAVAILABLE(69), on this condition, it should not take it as
error. (#413) [chengcheng-chcheng]
+ Document CloudStack data-server well-known hostname (#399) [Gregor Riepl]
+ test: move conftest.py to top-level, to cover tests/ also (#414)
+ Replace cc_chef is_installed with use of subp.is_exe. (#421)
[Scott Moser]
+ Move runparts to subp. (#420) [Scott Moser]
+ Move subp into its own module. (#416) [Scott Moser]
+ readme: point at travis-ci.com (#417) [Joshua Powers]
+ New feature flag functionality and fix includes failing silently (#367)
[James Falcon] (LP: #1734939)
+ Enhance poll imds logging (#365) [Moustafa Moustafa]
+ test: fix all flake8 E121 and E123 errors (#404) [Joshua Powers]
+ test: fix all flake8 E241 (#403) [Joshua Powers]
+ test: ignore flake8 E402 errors in main.py (#402) [Joshua Powers]
+ cc_grub_dpkg: determine idevs in more robust manner with grub-probe
(#358) [Matthew Ruffell] (LP: #1877491)
+ test: fix all flake8 E741 errors (#401) [Joshua Powers]
+ tests: add groovy integration tests for ubuntu (#400)
+ Enable chef_license support for chef infra client (#389) [Bipin Bachhao]
+ testing: use flake8 again (#392) [Joshua Powers]
+ enable Puppet, Chef mcollective in default config (#385)
[Mina Galić (deprecated: Igor Galić)] (LP: #1880279)
+ HACKING.rst: introduce .net + > Networking refactor section (#384)
+ Travis: do not install python3-contextlib2 (dropped dependency) (#388)
[Paride Legovini]
+ HACKING: mention that .github-cla-signers is alpha-sorted (#380)
+ Add bipinbachhao as contributor (#379) [Bipin Bachhao]
+ cc_snap: validate that assertions property values are strings (#370)
+ conftest: implement partial disable_subp_usage (#371)
+ test_resolv_conf: refresh stale comment (#374)
+ cc_snap: apply validation to snap.commands properties (#364)
+ make finding libc platform independent (#366)
[Mina Galić (deprecated: Igor Galić)]
+ doc/rtd/topics/faq: Updates LXD docs links to current site (#368) [TomP]
+ templater: drop Jinja Python 2 compatibility shim (#353)
+ cloudinit: minor pylint fixes (#360)
+ cloudinit: remove unneeded __future__ imports (#362)
+ migrating momousta lp user to Moustafa-Moustafa GitHub user (#361)
[Moustafa Moustafa]
+ cloud_tests: emit dots on Travis while fetching images (#347)
+ Add schema to apt configure config (#357) [lucasmoura] (LP: #1858884)
+ conftest: add docs and tests regarding CiTestCase's subp functionality
(#343)
+ analyze/dump: refactor shared string into variable (#350)
+ doc: update boot.rst with correct timing of runcmd (#351)
+ HACKING.rst: change contact info to Rick Harding (#359) [lucasmoura]
+ HACKING.rst: guide people to add themselves to the CLA file (#349)
+ HACKING.rst: more unit testing documentation (#354)
+ .travis.yml: don't run lintian during integration test package builds
(#352)
+ Add test to ensure docs examples are valid cloud-init configs (#355)
[James Falcon] (LP: #1876414)
+ make suse and sles support 127.0.1.1 (#336) [chengcheng-chcheng]
+ Create tests to validate schema examples (#348)
[lucasmoura] (LP: #1876412)
+ analyze/dump: add support for Amazon Linux 2 log lines (#346)
(LP: #1876323)
+ bsd: upgrade support (#305) [Gonéri Le Bouder]
+ Add lucasmoura as contributor (#345) [lucasmoura]
+ Add "therealfalcon" as contributor (#344) [James Falcon]
+ Adapt the package building scripts to use Python 3 (#231)
[Paride Legovini]
+ DataSourceEc2: use metadata's NIC ordering to determine route-metrics
(#342) (LP: #1876312)
+ .travis.yml: introduce caching (#329)
+ cc_locale: introduce schema (#335)
+ doc/rtd/conf.py: bump copyright year to 2020 (#341)
+ yum_add_repo: Add Centos to the supported distro list (#340)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 9 10:45:23 UTC 2021 - Antonio Larrosa <alarrosa@suse.com> Fri Jul 9 10:45:23 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
@ -21,6 +530,12 @@ Wed Jun 2 12:13:54 UTC 2021 - Robert Schweikert <rjschwei@suse.com>
+ Do not write the generated password to the log file + Do not write the generated password to the log file
- Add cloud-init-purge-cache-py-ver-change.patch - Add cloud-init-purge-cache-py-ver-change.patch
-------------------------------------------------------------------
Thu Aug 12 02:16:08 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
- Add cloud-init-update-test-characters-in-substitution-unit-test.patch
to fix unit test fail in TestGetPackageMirrorInfo::test_substitution.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 7 17:35:46 UTC 2021 - Robert Schweikert <rjschwei@suse.com> Wed Apr 7 17:35:46 UTC 2021 - Robert Schweikert <rjschwei@suse.com>

View File

@ -18,7 +18,7 @@
%global configver 0.7 %global configver 0.7
Name: cloud-init Name: cloud-init
Version: 20.2 Version: 21.2
Release: 0 Release: 0
License: GPL-3.0 License: GPL-3.0
Summary: Cloud node initialization tool Summary: Cloud node initialization tool
@ -26,34 +26,19 @@ Url: http://launchpad.net/cloud-init/
Group: System/Management Group: System/Management
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Source1: rsyslog-cloud-init.cfg Source1: rsyslog-cloud-init.cfg
Patch29: datasourceLocalDisk.patch Patch1: datasourceLocalDisk.patch
Patch34: cloud-init-tests-set-exec.patch
# FIXME (lp#1812117) # FIXME (lp#1812117)
Patch43: cloud-init-write-routes.patch Patch2: cloud-init-write-routes.patch
# FIXME (lp#1849296) # FIXME (lp#1849296)
Patch52: cloud-init-break-resolv-symlink.patch Patch3: cloud-init-break-resolv-symlink.patch
# FIXME no proposed solution # FIXME no proposed solution
Patch56: cloud-init-sysconf-path.patch Patch4: cloud-init-sysconf-path.patch
# FIXME (lp#1860164) # FIXME (lp#1860164)
Patch57: cloud-init-no-tempnet-oci.patch Patch5: cloud-init-no-tempnet-oci.patch
Patch58: cloud-init-after-kvp.diff
Patch59: cloud-init-recognize-hpc.patch
# FIXME https://github.com/canonical/cloud-init/commit/eea754492f074e00b601cf77aa278e3623857c5a
Patch60: cloud-init-azure-def-usr-pass.patch
Patch61: cloud-init-sle12-compat.patch
Patch70: use_arroba_to_include_sudoers_directory-bsc_1181283.patch
# FIXME https://github.com/canonical/cloud-init/pull/831
Patch71: cloud-init-bonding-opts.patch
# FIXME https://github.com/canonical/cloud-init/pull/858
Patch72: cloud-init-log-file-mode.patch
# FIXME upstream commit b794d426b9
Patch73: cloud-init-no-pwd-in-log.patch
# FIXME https://github.com/canonical/cloud-init/pull/857 # FIXME https://github.com/canonical/cloud-init/pull/857
Patch74: cloud-init-purge-cache-py-ver-change.patch Patch6: cloud-init-purge-cache-py-ver-change.patch
# PATCH-FIX-UPSTREAM https://github.com/canonical/cloud-init/commit/f23a4c4262ac11cd75c99fcbfbfe453f4e115f18 # FIXME https://github.com/canonical/cloud-init/commit/899bfaa9d6bfab1db0df99257628ca1f6febff60
Patch75: 0001-templater-drop-Jinja-Python-2-compatibility-shim.patch Patch7: cloud-init-update-test-characters-in-substitution-unit-test.patch
# PATCH-FIX-UPSTREAM https://github.com/canonical/cloud-init/commit/899bfaa9d6bfab1db0df99257628ca1f6febff60
Patch76: cloud-init-update-test-characters-in-substitution-unit-test.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: filesystem BuildRequires: filesystem
# pkg-config is needed to find correct systemd unit dir # pkg-config is needed to find correct systemd unit dir
@ -143,27 +128,14 @@ Documentation and examples for cloud-init tools
%prep %prep
%setup -q %setup -q
%patch29 -p0 %patch1 -p0
%patch34 %patch2
%patch43 %patch3
%patch52 %patch4
%patch56 %patch5
%patch57 %patch6
%patch58 -p1 %patch7 -p1
%patch59
%patch60
%if 0%{?suse_version} < 1500
%patch61
%endif
%patch70 -p1
%patch71
%patch72
%patch73
%patch74
%if 0%{?suse_version} >= 1550
%patch75 -p1
%endif
%patch76 -p1
# patch in the full version to version.py # patch in the full version to version.py
version_pys=$(find . -name version.py -type f) version_pys=$(find . -name version.py -type f)
[ -n "$version_pys" ] || [ -n "$version_pys" ] ||
@ -176,7 +148,7 @@ python3 setup.py build
%check %check
## Ignore test failure currently not doing anything with opennebula ## Ignore test failure currently not doing anything with opennebula
rm -v tests/unittests/test_datasource/test_opennebula.py rm -v tests/unittests/test_datasource/test_opennebula.py
make unittest3 make unittest
%install %install
python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib} --init-system=%{initsys} python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib} --init-system=%{initsys}

View File

@ -1,36 +0,0 @@
commit d62bd1f0efb25bc156a23b8e703ff264e479303c
Author: Jordi Massaguer Pla <jmassaguerpla@suse.de>
Date: Fri Jan 22 17:10:17 2021 +0100
includedir in suoders can be prefixed by "arroba"
Since version 1.9.1, @includedir can be used in the sudoers files
instead of #includedir:
https://github.com/sudo-project/sudo/releases/tag/SUDO_1_9_1
This happens to be the default in SUSE Linux enterprise sudoer package,
so cloudinit should take this into account.
Otherwise, cloudinit was adding an extra #includedir, which was
resulting on the files under /etc/sudoers.d being included twice, one by
@includedir from the SUSE package, one by the @includedir from
cloudinit. The consequence of this, was that if you were defining an
Cmnd_Alias inside any of those files, this was being defined twice and
creating an error when using sudo.
Signed-off-by: Jordi Massaguer Pla <jmassaguerpla@suse.de>
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 1e118472..220bd11f 100755
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -673,7 +673,7 @@ class Distro(persistence.CloudInitPickleMixin, metaclass=abc.ABCMeta):
found_include = False
for line in sudoers_contents.splitlines():
line = line.strip()
- include_match = re.search(r"^#includedir\s+(.*)$", line)
+ include_match = re.search(r"^[#|@]includedir\s+(.*)$", line)
if not include_match:
continue
included_dir = include_match.group(1).strip()