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

redis cache store doesn't support envoy proxy because of lack of INFO command support

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-74072_master
    • Hide

      Requirements

      1. Docker
      2. docker-compose
      3. The Redis extension for PHP (https://github.com/phpredis/phpredis)

      Instructions

      1. Download the 74072_docker.zip file and unzip it
      2. cd into the 74072_docker directory and run docker-compose up
      3. Log in to Moodle as administrator
      4. Navigate to Site admin -> Plugins -> Caching -> Configuration
      5. Add a new Redis cache instance pointing to:
        Server: locahost
      6. From the bottom of the Cache configuration page choose "Edit mappings"
      7. Set your newly created cache instance as the default cache for the Application
      8. Navigate to Site admin -> Plugins -> Caching -> Cache usage
        1. Confirm that there was no exception
      Show
      Requirements Docker docker-compose The Redis extension for PHP ( https://github.com/phpredis/phpredis ) Instructions Download the 74072_docker.zip file and unzip it cd into the 74072_docker directory and run docker-compose up Log in to Moodle as administrator Navigate to Site admin -> Plugins -> Caching -> Configuration Add a new Redis cache instance pointing to: Server: locahost From the bottom of the Cache configuration page choose "Edit mappings" Set your newly created cache instance as the default cache for the Application Navigate to Site admin -> Plugins -> Caching -> Cache usage Confirm that there was no exception

      It is debatable wether this is a moodle bug, but I think we should treat it as such and workaround the issue in Moodle. we use envoy as a proxy in front of redis, and it doesn't support the INFO command here so it breaks:

      https://github.com/moodle/moodle/blob/master/cache/stores/redis/lib.php#L683

      List of supported commands is here:

      https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/other_protocols/redis#supported-commands

      This was logged with envoy but has been closed as a stale issue so I'm not holding my breath there:

      https://github.com/envoyproxy/envoy/issues/8328

      I think at minimum we should detect the broken implementation and treat it the same as a null return value. I'm not sure if we can workaround it in a better way and still get a proper value out.

            tomotsuyuki Tomo Tsuyuki
            brendanheywood Brendan Heywood
            Brendan Heywood Brendan Heywood
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 30 minutes
                4h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.