#1762 Issue closed: Unattended PXE recover mode with BAREOS halts after restore

Labels: fixed / solved / done, minor bug, external tool

gdha opened issue at 2018-03-23 08:16:

  • rear version (/usr/sbin/rear -V): 2.3 and higher
  • OS version (cat /etc/rear/os.conf or lsb_release -a): RHEL, SLES
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf): BACKUP=BAREOS
  • Are you using legacy BIOS or UEFI boot? BIOS
  • Brief description of the issue: When using PXE to recover unattended with BAREOS we get a prompt after a successful restore if we want to continue or inspect with shell? That is not the desired state we expected.
  • Work-around, if any:
    Problem is found in script /usr/share/rear/restore/BAREOS/default/400_restore_backup.sh:if [ "$ISO_DEFAULT" != "automatic" ] where the variable ISO_DEFAULT is not the correct one. It should have been ISO_RECOCER_MODE and PXE_RECOVER_MODE

jsmeix commented at 2018-03-23 09:33:

@gdha
which exact "prompt after a successful restore if we want to continue or inspect with shell"
do you get?

Is it the rear_shell "Did the backup successfully restore ..." in
usr/share/rear/restore/BAREOS/default/400_restore_backup.sh
or is it perhaps the new UserInput RESTORED_FILES_CONFIRMATION
in the new usr/share/rear/finalize/default/020_confirm_finalize.sh
from my https://github.com/rear/rear/pull/1758

In the latter case the actual reason is that you are in MIGRATION_MODE
and then the UserInput RESTORED_FILES_CONFIRMATION
is intentionally there.

In the former case that too simple rear_shell "Did the backup successfully restore..."
should be replaced by a UserInput() call so that the user can predefine
a user input value in this case (i.e. so that there is no longer a hardcoded
disruptive break into the rear_shell).

gdha commented at 2018-03-23 10:31:

@jsmeix I reran the test and saw MIGRATION_MODE being turned off because I was using unattended mode. Therefore, I think what I thought above is correct. Will make a PR and we can retest it once available.

jsmeix commented at 2018-03-23 11:22:

Yes, in unattended mode MIGRATION_MODE is usually turned off via
usr/share/rear/layout/prepare/default/270_overrule_migration_mode.sh
see the comments in that script when MIGRATION_MODE is not turned off
even when in unattended mode.

gdha commented at 2018-03-23 11:27:

@jsmeix It was switched off -
2018-03-21 17:33:02.606873147 Switching off manual disk layout configuration (MIGRATION_MODE) due to 'unattended' kernel option

jsmeix commented at 2018-03-23 12:40:

To Keep Separated Issues Separated (KSIS )
I could after https://github.com/rear/rear/pull/1763 was merged
enhance the rear_shell "Did the backup successfully restore..."
by a UserInput() call.

jsmeix commented at 2018-03-23 13:28:

After having a bit closer look at the code in
usr/share/rear/restore/BAREOS/default/400_restore_backup.sh
I (as a non-bareos user) will not touch that code
because that code is too obsuce for me.

jsmeix commented at 2018-03-23 13:29:

I think with https://github.com/rear/rear/pull/1763 merged
this issue can be closed as fixed.


[Export of Github issue for rear/rear.]