Skip to content

Commit 6d0bbce

Browse files
committed
Switch reboot default
In light of recent issues reported with soft reboot we are chaning the reboot method to a full reboot. This is intended to reduce the number of requests we receive to investigate boot issues.
1 parent 3b5507e commit 6d0bbce

4 files changed

Lines changed: 23 additions & 14 deletions

File tree

doc/adoc/user_guide.adoc

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,24 @@ tux > sudo zypper in SLES15-Migration
171171
----
172172
+
173173
The `run_migration` uses `kexec` to boot into the kernel delivered with the
174-
upgrade image delivered by the SLES15-Migration package. Once this system
175-
is live after the `kexec` the distribution migration process is automatically
176-
started. However, `kexec` is not supported and does not function in certain
177-
conditions. For example, the `run_migration` utility does not work in Xen
178-
based environments or when kernel keys change.
174+
upgrade image delivered by the SLES{$VERSION}-Migration package.
179175
+
180-
If kexec causes a kernel panic this can cause the system to hang and the
181-
distribution migration to fail. In that case refer to this TID:
182-
https://www.suse.com/support/kb/doc/?id=000019733
183-
And set the "soft_reboot" customization option:
176+
On the s390x architecture this is the only package available and the
177+
the `run_migration` method is the only option to start the migration process.
178+
The migration process starts automatically once the `run_migration` command
179+
is issued.
180+
+
181+
On all other architectures the `kexec`, i.e. use of `run_migration` is not
182+
supported. This path does not work in certain conditions, for example
183+
on Xen based environments or when kernel keys change.
184+
+
185+
By default this method is disabled. Enabling soft reboot behavior via kexec
186+
requires an explicit configuration change on all architectures except s390x
187+
by setting the "soft_reboot" customization option:
184188
+
185189
[listing]
186190
----
187-
echo "soft_reboot: false" >> /etc/sle-migration-service.yml
191+
echo "soft_reboot: true" >> /etc/sle-migration-service.yml
188192
----
189193

190194
Option 2 - Trigger via reboot::
@@ -303,9 +307,10 @@ debug: true|false
303307
----
304308

305309
Configure Reboot Method::
306-
By default, the migration system uses `kexec` to boot back into the host
307-
system once migration is complete. If this is in any way problematic,
308-
a regular `reboot` can be requested by setting `soft_reboot: false`.
310+
By default, the migration system uses a full reboot to boot back into the
311+
host system once migration is complete. It is possible to configure the
312+
migration system to use `kexec`, i.e. use a soft reboot by setting
313+
`soft_reboot: true` in the configuration. A soft reboot may trigger issues.
309314
+
310315
[listing]
311316
----

suse_migration_services/migration_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def is_zypper_migration_plugin_requested(self):
180180
return self.config_data.get('use_zypper_migration', True)
181181

182182
def is_soft_reboot_requested(self):
183-
return self.config_data.get('soft_reboot', True)
183+
return self.config_data.get('soft_reboot', False)
184184

185185
def is_host_independent_initd_requested(self):
186186
return self.config_data.get('build_host_independent_initrd', False)

test/data/migration-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
soft_reboot: true
12
preserve:
23
rules:
34
- /etc/udev/rules.d/*.rules

test/unit/units/reboot_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def test_main_skip_reboot_due_to_debug_file_set(
3737
@patch.object(Defaults, 'get_migration_config_file')
3838
@patch.object(Defaults, 'get_system_migration_custom_config_file')
3939
@patch('suse_migration_services.units.reboot.Fstab')
40+
@patch('suse_migration_services.migration_config.is_soft_reboot_requested')
4041
def test_main_kexec_reboot(
4142
self,
4243
mock_Fstab,
@@ -45,12 +46,14 @@ def test_main_kexec_reboot(
4546
mock_logger_setup,
4647
mock_Command_run,
4748
mock_os_path_exists,
49+
mock_soft_reboot_state,
4850
):
4951
def skip_device(device):
5052
if '/dev/mynode' in device:
5153
return False
5254
return True
5355

56+
mock_soft_reboot_state.return_value = True
5457
mock_os_path_exists.side_effect = skip_device
5558
fstab = Fstab()
5659
fstab_mock = Mock()

0 commit comments

Comments
 (0)