Upgrade script: more robust handling of errors with rollback and reboot to the previous kura version