Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32338

Failing to get updates breaks cron

    Details

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

      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 !!!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              andyjdavis Andrew Davis added a comment -

              I also ran into this while testing MDL-3030.

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

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

              Show
              poltawski Dan Poltawski added a comment - Andrew was getting http code 417 though - which is another thing to be slightly concerned about
              Hide
              nebgor 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
              nebgor 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
              nebgor Aparup Banerjee added a comment -

              just getting this onto David's eyes sooner.

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

              This bug continues to make my cron sad

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

              Andrew, did you try the patch ?

              Show
              nebgor Aparup Banerjee added a comment - Andrew, did you try the patch ?
              Hide
              andyjdavis 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
              andyjdavis 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
              mudrd8mz David Mudrák added a comment -

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

              Show
              mudrd8mz David Mudrák added a comment - Nice fix Apu! Descend to FL600 and contact the approach.
              Hide
              nebgor Aparup Banerjee added a comment - - edited

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

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

              Thanks Apu, ready for testing!

              Show
              poltawski Dan Poltawski added a comment - Thanks Apu, ready for testing!
              Hide
              ankit_frenz 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_frenz 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
              stronk7 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
              stronk7 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:
                    Fix Release Date:
                    25/Jun/12