Moodle
  1. Moodle
  2. MDL-37935

Cache store instances do not report an error when the server is down.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.4.2
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide
      1. Install memcache
      2. Within Moodle create a memcached store instance.
      3. Map the new store instance to the calendar cache.
      4. Check it is ready.
      5. Set up a memcached test instance.
      6. Turn off the memcache backend (sudo /etc/init.d/memcache stop)
      7. Browse to the cache admin page and check the status column for the instance is red and has a help icon.
      8. Browse to the test performance script.
      9. Check that beside memcached it say "Store not ready"
      Show
      Install memcache Within Moodle create a memcached store instance. Map the new store instance to the calendar cache. Check it is ready. Set up a memcached test instance. Turn off the memcache backend (sudo /etc/init.d/memcache stop) Browse to the cache admin page and check the status column for the instance is red and has a help icon. Browse to the test performance script. Check that beside memcached it say "Store not ready"
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull 2.4 Branch:
      wip-MDL-37935-m24
    • Pull Master Branch:
      wip-MDL-37935-m25
    • Rank:
      47694

      Description

      There should be a way to test each cache instance to see if the server/folder is available or not and indicate this on the "Site administration / ► Plugins / ► Caching / ► Configuration" page.

      It is currently confusing when setting up new caches - how to tell if the cache is working?

      Also the performance tests do not indicate an error if a cache is down (they run even faster!).

        Activity

        Hide
        Sam Hemelryk added a comment -

        Thanks for the report Damyon.

        I'm putting a patch up for review now to address the two points raised here.

        1. Stores that are not ready and have mappings are marked in red on the admin screen with a help icon explaining that things need to be checked.
        2. The test performance script now properly checks a store is ready before using it.

        Many thanks
        Sam

        Show
        Sam Hemelryk added a comment - Thanks for the report Damyon. I'm putting a patch up for review now to address the two points raised here. Stores that are not ready and have mappings are marked in red on the admin screen with a help icon explaining that things need to be checked. The test performance script now properly checks a store is ready before using it. Many thanks Sam
        Hide
        Sam Hemelryk added a comment -

        Putting this up for integration review in order to try and catch upcoming release.

        Show
        Sam Hemelryk added a comment - Putting this up for integration review in order to try and catch upcoming release.
        Hide
        Damyon Wiese added a comment -

        Thanks Sam - this has been pushed to master and 24 branches. I added a commit to fix a typo in the language file.

        Show
        Damyon Wiese added a comment - Thanks Sam - this has been pushed to master and 24 branches. I added a commit to fix a typo in the language file.
        Hide
        Andrew Davis added a comment -

        I have a query about step 9. (Check that beside memcached it say "Store not ready")

        On the cache administration page my memcached instance is highlighted red, which is correct. On the test performance page however I dont see "Store not ready" anywhere. Next to memcached it says "Untestable" regardless of whether or not memcache is running.

        Show
        Andrew Davis added a comment - I have a query about step 9. (Check that beside memcached it say "Store not ready") On the cache administration page my memcached instance is highlighted red, which is correct. On the test performance page however I dont see "Store not ready" anywhere. Next to memcached it says "Untestable" regardless of whether or not memcache is running.
        Hide
        Sam Hemelryk added a comment -

        Hi Andrew, just to check you've got the memcached extension installed but have stopped the memcache daemon right?

        Show
        Sam Hemelryk added a comment - Hi Andrew, just to check you've got the memcached extension installed but have stopped the memcache daemon right?
        Hide
        Andrew Davis added a comment -

        Yep.

        Show
        Andrew Davis added a comment - Yep.
        Hide
        Sam Hemelryk added a comment -

        Hmmm ok, I've just double checked everything myself and things work as expected for me.

        Could you please check a couple of things:

        1. Browse to Admin > Plugins > Caching > Cache stores > Memcache
        2. Check you have "127.0.0.1:11211" set as the test server (assuming you installed memcache in the default place)
        3. Head to the test performance page and see if that works.

        If not then try:

        1. Turn the memcache server back on.
        2. Browse to test performance.
        3. Make sure that memcached shows tested and has values.

        Hopefully that aids us in tracking it down.

        Show
        Sam Hemelryk added a comment - Hmmm ok, I've just double checked everything myself and things work as expected for me. Could you please check a couple of things: Browse to Admin > Plugins > Caching > Cache stores > Memcache Check you have "127.0.0.1:11211" set as the test server (assuming you installed memcache in the default place) Head to the test performance page and see if that works. If not then try: Turn the memcache server back on. Browse to test performance. Make sure that memcached shows tested and has values. Hopefully that aids us in tracking it down.
        Hide
        Andrew Davis added a comment -

        Ok. Passing this now. I had the wrong address for the memcache test instance. Thanks Sam

        Show
        Andrew Davis added a comment - Ok. Passing this now. I had the wrong address for the memcache test instance. Thanks Sam
        Hide
        Eloy Lafuente (stronk7) added a comment -

        This is valid for unlimited entries to the, soon to be unveiled, Moodle Codebase Gardens. It includes free access to all facilities.

        Personal and non-transferable to all assignees, reviewers and testers in this issue. Valid until switching to Blackboard (100000€ penalization will be applied).

        Thanks, closing as fixed!

        Show
        Eloy Lafuente (stronk7) added a comment - This is valid for unlimited entries to the, soon to be unveiled, Moodle Codebase Gardens. It includes free access to all facilities. Personal and non-transferable to all assignees, reviewers and testers in this issue. Valid until switching to Blackboard (100000€ penalization will be applied). Thanks, closing as fixed!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: