Moodle
  1. Moodle
  2. MDL-32338

Failing to get updates breaks cron

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Administration
    • Labels:
    • Rank:
      39161

      Description

      Steps to reproduce:

      0/ (Have a moodle in a state where it needs to check for updates - can be done in DB with: UPDATE mdl_config_plugins set value = '1' WHERE name = 'recentfetch' AND plugin = 'core_plugin'
      1/ Set your proxy setting to something invalid
      2/ Cron cron

      Expected Result
      ---------------
      Moodle fails to receive updates but cron continues successfully following that failure

      Actual Result:
      --------------
      Cron aborts with exception:
      Outdated or missing info about available updates, forced fetching ... Default exception handler: core_plugin/err_response_http_code Debug: 0

      • line 764 of /lib/pluginlib.php: available_update_checker_exception thrown
      • line 653 of /lib/pluginlib.php: call to available_update_checker->get_response()
      • line 1105 of /lib/pluginlib.php: call to available_update_checker->fetch()
      • line 738 of /lib/pluginlib.php: call to available_update_checker->cron_execute()
      • line 386 of /lib/cronlib.php: call to available_update_checker->cron()
      • line 61 of /admin/cli/cron.php: call to cron_run()

      !!! core_plugin/err_response_http_code !!!

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          I also ran into this while testing MDL-3030.

          Show
          Andrew Davis added a comment - I also ran into this while testing MDL-3030 .
          Hide
          Dan Poltawski added a comment -

          Andrew was getting http code 417 though - which is another thing to be slightly concerned about

          Show
          Dan Poltawski added a comment - Andrew was getting http code 417 though - which is another thing to be slightly concerned about
          Hide
          Aparup Banerjee added a comment -

          a quick stab at this : https://github.com/nebgor/moodle/compare/mistress...MDL-32338 (i was already distracted by it)

          Show
          Aparup Banerjee added a comment - a quick stab at this : https://github.com/nebgor/moodle/compare/mistress...MDL-32338 (i was already distracted by it)
          Hide
          Aparup Banerjee added a comment -

          just getting this onto David's eyes sooner.

          Show
          Aparup Banerjee added a comment - just getting this onto David's eyes sooner.
          Hide
          Andrew Davis added a comment -

          This bug continues to make my cron sad

          Show
          Andrew Davis added a comment - This bug continues to make my cron sad
          Hide
          Aparup Banerjee added a comment -

          Andrew, did you try the patch ?

          Show
          Aparup Banerjee added a comment - Andrew, did you try the patch ?
          Hide
          Andrew Davis added a comment -

          Just tried it. My net connection had previously worked enough for the update check to successfully complete so I ran the SQL in this bug description and disconnected my wifi to get back to a broken state.

          Running the current code in master I get this then cron just stops

          Outdated or missing info about available updates, forced fetching ... !!! core_plugin/err_response_http_code !!!
          !! Stack trace: * line 772 of /lib/pluginlib.php: available_update_checker_exception thrown
          * line 661 of /lib/pluginlib.php: call to available_update_checker->get_response()
          * line 1113 of /lib/pluginlib.php: call to available_update_checker->fetch()
          * line 746 of /lib/pluginlib.php: call to available_update_checker->cron_execute()
          * line 387 of /lib/cronlib.php: call to available_update_checker->cron()
          * line 88 of /admin/cron.php: call to cron_run()
           !!

          When I checkout the branch at https://github.com/nebgor/moodle/compare/mistress...MDL-32338 I get the following then cron continues.

          Outdated or missing info about available updates, forced fetching ... FAILED!
          Show
          Andrew Davis added a comment - Just tried it. My net connection had previously worked enough for the update check to successfully complete so I ran the SQL in this bug description and disconnected my wifi to get back to a broken state. Running the current code in master I get this then cron just stops Outdated or missing info about available updates, forced fetching ... !!! core_plugin/err_response_http_code !!! !! Stack trace: * line 772 of /lib/pluginlib.php: available_update_checker_exception thrown * line 661 of /lib/pluginlib.php: call to available_update_checker->get_response() * line 1113 of /lib/pluginlib.php: call to available_update_checker->fetch() * line 746 of /lib/pluginlib.php: call to available_update_checker->cron_execute() * line 387 of /lib/cronlib.php: call to available_update_checker->cron() * line 88 of /admin/cron.php: call to cron_run() !! When I checkout the branch at https://github.com/nebgor/moodle/compare/mistress...MDL-32338 I get the following then cron continues. Outdated or missing info about available updates, forced fetching ... FAILED!
          Hide
          David Mudrak added a comment -

          Nice fix Apu! Descend to FL600 and contact the approach.

          Show
          David Mudrak added a comment - Nice fix Apu! Descend to FL600 and contact the approach.
          Hide
          Aparup Banerjee added a comment - - edited

          Thanks David, commencing final approach. Thanks for the test too Andrew!

          Show
          Aparup Banerjee added a comment - - edited Thanks David, commencing final approach. Thanks for the test too Andrew!
          Hide
          Dan Poltawski added a comment -

          Thanks Apu, ready for testing!

          Show
          Dan Poltawski added a comment - Thanks Apu, ready for testing!
          Hide
          Ankit Agarwal added a comment -

          Working as expected:-
          Finished registration update on hubs.
          Outdated or missing info about available updates, forced fetching ... FAILED!
          Deleting session linked tokens more than one day old...done.

          Cron didnt break.
          Passing
          Thanks

          Show
          Ankit Agarwal added a comment - Working as expected:- Finished registration update on hubs. Outdated or missing info about available updates, forced fetching ... FAILED! Deleting session linked tokens more than one day old...done. Cron didnt break. Passing Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

          Thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: