[rear-devel] [rear/rear] 2a060f: Do not abort in case of invalid user input but retry

Johannes Meixner noreply at github.com
Wed Oct 23 10:35:17 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/rear/rear
  Commit: 2a060f6513427bde62c52862afa44a913af3e949
      https://github.com/rear/rear/commit/2a060f6513427bde62c52862afa44a913af3e949
  Author: Johannes Meixner <jsmeix at suse.de>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M usr/share/rear/conf/default.conf
    M usr/share/rear/verify/NBU/default/390_request_point_in_time_restore_parameters.sh
    M usr/share/rear/verify/TSM/default/390_request_point_in_time_restore_parameters.sh

  Log Message:
  -----------
  Do not abort in case of invalid user input but retry


  Commit: ec1b8e4f0fce34098a9c33859feb7c63ea105e59
      https://github.com/rear/rear/commit/ec1b8e4f0fce34098a9c33859feb7c63ea105e59
  Author: Johannes Meixner <jsmeix at suse.de>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M usr/share/rear/verify/GALAXY10/default/550_request_point_in_time_restore_parameters.sh
    M usr/share/rear/verify/TSM/default/390_request_point_in_time_restore_parameters.sh

  Log Message:
  -----------
  Also for GALAXY10 point-in-time restore do not abort in case of invalid user date and time input but retry


  Commit: d81afa56b844359b015e1935412f32324581b3f0
      https://github.com/rear/rear/commit/d81afa56b844359b015e1935412f32324581b3f0
  Author: Johannes Meixner <jsmeix at suse.de>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M usr/share/rear/restore/DP/default/460_press_y_to_continue.sh
    M usr/share/rear/verify/NBU/default/380_request_client_destination.sh
    M usr/share/rear/verify/default/040_validate_variables.sh

  Log Message:
  -----------
  Some cleanup and enhancements related to WAIT_SECS as far as possible by plain looking at the code


  Commit: 37f9a3029ff0d25bb63121f54de7b2cc860a2252
      https://github.com/rear/rear/commit/37f9a3029ff0d25bb63121f54de7b2cc860a2252
  Author: Johannes Meixner <jsmeix at suse.de>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M usr/share/rear/conf/default.conf
    M usr/share/rear/verify/default/040_validate_variables.sh

  Log Message:
  -----------
  Minor typo fixes in comments


  Commit: d43a09f2a11256cb33e4aa2f45e8496a1367bf22
      https://github.com/rear/rear/commit/d43a09f2a11256cb33e4aa2f45e8496a1367bf22
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2019-10-23 (Wed, 23 Oct 2019)

  Changed paths:
    M usr/share/rear/conf/default.conf
    M usr/share/rear/restore/DP/default/460_press_y_to_continue.sh
    M usr/share/rear/verify/GALAXY10/default/550_request_point_in_time_restore_parameters.sh
    M usr/share/rear/verify/NBU/default/380_request_client_destination.sh
    M usr/share/rear/verify/NBU/default/390_request_point_in_time_restore_parameters.sh
    M usr/share/rear/verify/TSM/default/390_request_point_in_time_restore_parameters.sh
    M usr/share/rear/verify/default/040_validate_variables.sh

  Log Message:
  -----------
  Merge pull request #2257 from jsmeix/do_not_abort_in_case_of_invalid_user_input_but_retry_issue2253

Do not abort in case of invalid user input but retry if possible.
I noticed some scripts that abort 'rear recover'
when the user did an invalid input like date or time.
I think this is too hard and unfriendly when input values
can be (syntactically) validated with not much effort.
In such cases there should be an endless retry loop
until the user provided valid input (or intentionally aborts).
I added 'FIXME' comments where I was unable to implement
validation (because I don't know what is valid for third-party tools).
See https://github.com/rear/rear/issues/2253
Additionally the user config variable WAIT_SECS default value
was aligned with the USER_INPUT_TIMEOUT default value
so that now the default user input timeout value is 300 seconds
in any case (all 'read -t' calls in scripts use 'read -t $WAIT_SECS').
The former WAIT_SECS default value of 30 seconds was too short
because the 'read -t' timeout interrupts ongoing user input so that
the timeout must be sufficiently long for the user to read and
understand the possibly unexpected user input request message
and then some more time to make a decision what to enter and
finally even more time to actually enter the right value.


Compare: https://github.com/rear/rear/compare/da065dff556c...d43a09f2a112


More information about the rear-devel mailing list