Skip to content

Commit

Permalink
Update DMS to support migrating directly to SLE15 SP5
Browse files Browse the repository at this point in the history
  • Loading branch information
yarunachalam committed Feb 27, 2024
1 parent 081b0cb commit 9835814
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
8 changes: 4 additions & 4 deletions doc/adoc/user_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 SP5. It is
possible to configure other versions of SLES as the migration target,
but doing so is not a tested or supported use case.

Expand Down Expand Up @@ -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 SP5
* Upgrade has been tested for SLES 12 SP5 to SLES 15 SP5
* 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
Expand All @@ -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 SP5. The packages delivered by SUSE in the Public Cloud Module
implement this behavior by default.
5 changes: 1 addition & 4 deletions image/pubcloud/sle15/config.kiwi
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
<user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/home/migration" name="migration" groups="users"/>
</users>
<repository type="rpm-md">
<source path="obs://SUSE:SLE-15-SP1:Update/standard"/>
</repository>
<repository type="rpm-md">
<source path="obs://SUSE:SLE-15-SP1:GA/standard"/>
<source path="obs://home:yarunachalam:branches:Devel:PubCloud:CrossCloud/SLE_15_SP5"/>
</repository>
<repository type="rpm-md">
<source path="obs://SUSE:SLE-15:Update/standard"/>
Expand Down
2 changes: 1 addition & 1 deletion test/data/custom-migration-config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
debug: true
migration_product: 'SLES/15.1/x86_64'
migration_product: 'SLES/15.5/x86_64'
14 changes: 7 additions & 7 deletions test/unit/defaults_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-SP5', version_id='15.5',
pretty_name='SUSE Linux Enterprise Server 15 SP5',
id='sles', id_like='suse', ansi_color='0;32',
cpe_name='cpe:/o:suse:sles:15:sp1'
cpe_name='cpe:/o:suse:sles:15:sp5'
)
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-SP5"\n'
'VERSION_ID="15.5"\n'
'PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"\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:sp5"')
with patch('builtins.open', create=True) as mock_open:
mock_open_os_release = MagicMock(spec=io.IOBase)

Expand Down
22 changes: 11 additions & 11 deletions test/unit/migration_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-SP5', version_id='15.5',
pretty_name='SUSE Linux Enterprise Server 15 SP5',
id='sles', id_like='suse', ansi_color='0;32',
cpe_name='cpe:/o:suse:sles:15:sp1'
cpe_name='cpe:/o:suse:sles:15:sp5'
)
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.5/x86_64'

@patch.object(Defaults, 'get_os_release')
@patch.object(SUSEBaseProduct, 'get_tag')
Expand All @@ -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-SP5', version_id='15.5',
pretty_name='SUSE Linux Enterprise Server 15 SP5',
id='sles', id_like='suse', ansi_color='0;32',
cpe_name='cpe:/o:suse:sles:15:sp1'
cpe_name='cpe:/o:suse:sles:15:sp5'
)
mock_get_system_root_path.return_value = '../data'
mock_get_os_release.return_value = os_release_result
Expand All @@ -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-SP5', version_id='15.5',
pretty_name='SUSE Linux Enterprise Server 15 SP5',
id='sles', id_like='suse', ansi_color='0;32',
cpe_name='cpe:/o:suse:sles:15:sp1'
cpe_name='cpe:/o:suse:sles:15:sp5'
)
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.5/x86_64'
assert self.config.is_debug_requested() is True

def test_is_zypper_migration_plugin_requested(self):
Expand Down

0 comments on commit 9835814

Please sign in to comment.