From bd515506bcd6e179172623ab8ed1bc9f409dabcd Mon Sep 17 00:00:00 2001 From: Fergal Mc Carthy Date: Thu, 8 Aug 2024 08:05:57 -0400 Subject: [PATCH 1/2] Switch default target and ISO backing distro SLE 15 SP3 Update documentation to reflect new default target. Update image build config.kiwi to build the ISO image based upon SLE 15 SP3. Update unit tests to reflect new default target. Co-Authored-By: yarunachalam --- doc/adoc/user_guide.adoc | 8 ++++---- image/pubcloud/sle15/config.kiwi | 15 +++++++++++++++ test/data/custom-migration-config.yml | 2 +- test/unit/defaults_test.py | 14 +++++++------- test/unit/migration_config_test.py | 22 +++++++++++----------- 5 files changed, 38 insertions(+), 23 deletions(-) diff --git a/doc/adoc/user_guide.adoc b/doc/adoc/user_guide.adoc index e50a940f..8d4df28c 100644 --- a/doc/adoc/user_guide.adoc +++ b/doc/adoc/user_guide.adoc @@ -100,7 +100,7 @@ data or processes. For example, DMS will function if /home is its own partition, but not if /var is on a separate partition from root. SLES Version Support:: -Upgrade is supported from SLES12 SP4 or SLES12 SP5 to SLES 15 SP1. It is +Upgrade is supported from SLES12 SP4 or SLES12 SP5 to SLES 15 SP3. It is possible to configure other versions of SLES as the migration target, but doing so is not a tested or supported use case. @@ -370,8 +370,8 @@ the commands from the Installation Section of this document. * Upgrade is only possible for systems that use unencrypted root file systems, at the OS level. Encrypting the root device using a cloud framework encryption mechanism happens at a different level. -* Upgrade has been tested for SLES 12 SP4 to SLES 15 SP1 -* Upgrade has been tested for SLES 12 SP5 to SLES 15 SP1 +* Upgrade has been tested for SLES 12 SP4 to SLES 15 SP3 +* Upgrade has been tested for SLES 12 SP5 to SLES 15 SP3 * The system is primarily intended for Public Cloud instance upgrade use. The system also works for simple setups in a data center setting on physical installations. However, for any more complex configurations the off line @@ -397,5 +397,5 @@ the commands from the Installation Section of this document. * The only supported migration path in the Public Cloud is from the final 2 service packs of a distribution to the first service pack of the next distribution. For example from SLES 12 SP4 or SLES 12 SP5 to - SLES 15 SP1. The packages delivered by SUSE in the Public Cloud Module + SLES 15 SP3. The packages delivered by SUSE in the Public Cloud Module implement this behavior by default. diff --git a/image/pubcloud/sle15/config.kiwi b/image/pubcloud/sle15/config.kiwi index 652c4b06..91eed7e5 100644 --- a/image/pubcloud/sle15/config.kiwi +++ b/image/pubcloud/sle15/config.kiwi @@ -23,6 +23,21 @@ + + + + + + + + + + + + + + + diff --git a/test/data/custom-migration-config.yml b/test/data/custom-migration-config.yml index 5b5d8eb9..05442c5f 100644 --- a/test/data/custom-migration-config.yml +++ b/test/data/custom-migration-config.yml @@ -1,2 +1,2 @@ debug: true -migration_product: 'SLES/15.1/x86_64' +migration_product: 'SLES/15.3/x86_64' diff --git a/test/unit/defaults_test.py b/test/unit/defaults_test.py index 8c500e19..53d7ea2c 100644 --- a/test/unit/defaults_test.py +++ b/test/unit/defaults_test.py @@ -23,19 +23,19 @@ def test_get_os_release(self): ] ) os_release_result = os_release_tuple( - name='SLES', version='15-SP1', version_id='15.1', - pretty_name='SUSE Linux Enterprise Server 15 SP1', + name='SLES', version='15-SP3', version_id='15.3', + pretty_name='SUSE Linux Enterprise Server 15 SP3', id='sles', id_like='suse', ansi_color='0;32', - cpe_name='cpe:/o:suse:sles:15:sp1' + cpe_name='cpe:/o:suse:sles:15:sp3' ) os_release_content = ('NAME="SLES"\n' - 'VERSION="15-SP1"\n' - 'VERSION_ID="15.1"\n' - 'PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"\n' + 'VERSION="15-SP3"\n' + 'VERSION_ID="15.3"\n' + 'PRETTY_NAME="SUSE Linux Enterprise Server 15 SP3"\n' 'ID="sles"\n' 'ID_LIKE="suse"\n' 'ANSI_COLOR="0;32"\n' - 'CPE_NAME="cpe:/o:suse:sles:15:sp1"') + 'CPE_NAME="cpe:/o:suse:sles:15:sp3"') with patch('builtins.open', create=True) as mock_open: mock_open_os_release = MagicMock(spec=io.IOBase) diff --git a/test/unit/migration_config_test.py b/test/unit/migration_config_test.py index f4dd3b5c..81625994 100644 --- a/test/unit/migration_config_test.py +++ b/test/unit/migration_config_test.py @@ -39,14 +39,14 @@ def test_get_migration_product_auto_detected( ] ) os_release_result = os_release_tuple( - name='SLES', version='15-SP1', version_id='15.1', - pretty_name='SUSE Linux Enterprise Server 15 SP1', + name='SLES', version='15-SP3', version_id='15.3', + pretty_name='SUSE Linux Enterprise Server 15 SP3', id='sles', id_like='suse', ansi_color='0;32', - cpe_name='cpe:/o:suse:sles:15:sp1' + cpe_name='cpe:/o:suse:sles:15:sp3' ) mock_get_system_root_path.return_value = '../data' mock_get_os_release.return_value = os_release_result - assert self.config.get_migration_product() == 'SLES/15.1/x86_64' + assert self.config.get_migration_product() == 'SLES/15.3/x86_64' @patch.object(Defaults, 'get_os_release') @patch.object(SUSEBaseProduct, 'get_tag') @@ -62,10 +62,10 @@ def test_get_migration_product_targets( ] ) os_release_result = os_release_tuple( - name='SLES', version='15-SP1', version_id='15.1', - pretty_name='SUSE Linux Enterprise Server 15 SP1', + name='SLES', version='15-SP3', version_id='15.3', + pretty_name='SUSE Linux Enterprise Server 15 SP3', id='sles', id_like='suse', ansi_color='0;32', - cpe_name='cpe:/o:suse:sles:15:sp1' + cpe_name='cpe:/o:suse:sles:15:sp3' ) mock_get_system_root_path.return_value = '../data' mock_get_os_release.return_value = os_release_result @@ -91,16 +91,16 @@ def test_update_migration_config_file_no_autodetect( ] ) os_release_result = os_release_tuple( - name='SLES', version='15-SP1', version_id='15.1', - pretty_name='SUSE Linux Enterprise Server 15 SP1', + name='SLES', version='15-SP3', version_id='15.3', + pretty_name='SUSE Linux Enterprise Server 15 SP3', id='sles', id_like='suse', ansi_color='0;32', - cpe_name='cpe:/o:suse:sles:15:sp1' + cpe_name='cpe:/o:suse:sles:15:sp3' ) mock_get_os_release.return_value = os_release_result mock_get_system_root_path.return_value = '../data' mock_get_product_name.return_value = None self.config.update_migration_config_file() - assert self.config.get_migration_product() == 'SLES/15.1/x86_64' + assert self.config.get_migration_product() == 'SLES/15.3/x86_64' assert self.config.is_debug_requested() is True def test_is_zypper_migration_plugin_requested(self): From ec2cb0d6bf883191e125c4a18b61612f225ae40e Mon Sep 17 00:00:00 2001 From: Fergal Mc Carthy Date: Tue, 13 Aug 2024 08:04:34 -0400 Subject: [PATCH 2/2] SLES12 SP4 no longer a supported migration starting point. --- doc/adoc/user_guide.adoc | 19 +++++++++---------- image/pubcloud/sle15/config.kiwi | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/doc/adoc/user_guide.adoc b/doc/adoc/user_guide.adoc index 8d4df28c..16a2ca03 100644 --- a/doc/adoc/user_guide.adoc +++ b/doc/adoc/user_guide.adoc @@ -28,9 +28,9 @@ endif::[] == Concept The Distribution Migration System provides an upgrade path for an installed SUSE Linux Enterprise system from one major version to another, -for example, from SUSE Linux Enterprise Server 12 SP4 to SUSE Linux -Enterprise Server 15. For a service pack upgrade from one Service Pack (SP) -to another within a given major version release series the existing +for example, from SUSE Linux Enterprise Server 12 SP5 to SUSE Linux +Enterprise Server 15 SP3. For a service pack upgrade from one Service Pack +(SP) to another within a given major version release series the existing Zypper migration workflow provides the supported upgrade path. The distribution migration system provides the ability to upgrade across major distributions without the need to use the next major version @@ -100,9 +100,9 @@ data or processes. For example, DMS will function if /home is its own partition, but not if /var is on a separate partition from root. SLES Version Support:: -Upgrade is supported from SLES12 SP4 or SLES12 SP5 to SLES 15 SP3. It is -possible to configure other versions of SLES as the migration target, -but doing so is not a tested or supported use case. +Upgrade is supported from SLES12 SP5 to SLES 15 SP3. It is possible to +configure other versions of SLES as the migration target, but doing so +is not a tested or supported use case. Support for SLES12 SP4 will end December 31 2023. From 2024 onward SLES12 SP5 is the only supported migration starting point. @@ -370,7 +370,6 @@ the commands from the Installation Section of this document. * Upgrade is only possible for systems that use unencrypted root file systems, at the OS level. Encrypting the root device using a cloud framework encryption mechanism happens at a different level. -* Upgrade has been tested for SLES 12 SP4 to SLES 15 SP3 * Upgrade has been tested for SLES 12 SP5 to SLES 15 SP3 * The system is primarily intended for Public Cloud instance upgrade use. The system also works for simple setups in a data center setting on physical @@ -396,6 +395,6 @@ the commands from the Installation Section of this document. of the SLES version you started with. This cannot be changed. * The only supported migration path in the Public Cloud is from the final 2 service packs of a distribution to the first service pack of - the next distribution. For example from SLES 12 SP4 or SLES 12 SP5 to - SLES 15 SP3. The packages delivered by SUSE in the Public Cloud Module - implement this behavior by default. + the next distribution. For example from SLES 12 SP5 to SLES 15 SP3. + The packages delivered by SUSE in the Public Cloud Module implement + this behavior by default. diff --git a/image/pubcloud/sle15/config.kiwi b/image/pubcloud/sle15/config.kiwi index 91eed7e5..02e9b16d 100644 --- a/image/pubcloud/sle15/config.kiwi +++ b/image/pubcloud/sle15/config.kiwi @@ -6,7 +6,7 @@ public-cloud-dev@susecloud.net SLES15 Distribution Migration Live System to upgrade - SLES12-SP4+ instances to SLES15+ + SLES12-SP5+ instances to SLES15+