Page MenuHomePhabricator

Update cache.mrouter modules in deployment-charts
Open, MediumPublic

Description

In order to create the mcrouter chart for T346690, we need to upgrade the cache to support a standalone mcrouter service

Event Timeline

Change 991372 had a related patch set uploaded (by Effie Mouzeli; author: Effie Mouzeli):

[operations/deployment-charts@master] cache.mcrouter: upgrade to 1.3.0

https://gerrit.wikimedia.org/r/991372

Change 991372 merged by Effie Mouzeli:

[operations/deployment-charts@master] cache.mcrouter: upgrade to 1.3.0

https://gerrit.wikimedia.org/r/991372

jijiki triaged this task as Low priority.
jijiki added a project: serviceops.
JMeybohm reopened this task as Open.EditedFri, Apr 19, 12:12 PM
JMeybohm raised the priority of this task from Low to High.
JMeybohm subscribed.

This breaks in CI when actually enabled.

When mcrouter is enabled during scaffolding, it is not actually enabled in the chart because values.yaml misses cache.mcrouter.enabled: true. When I do so, CI breaks because mcrouter's images below the common_images: key cant be found (as that key is added twice if statsd is enabled as well):

[ERROR] templates/: template: foo-lamp/templates/deployment.yaml:30:12: executing "foo-lamp/templates/deployment.yaml" at <include "cache.mcrouter.container" .>: error calling include: template: foo-lamp/templates/vendor/cache/mcrouter_1.3.1.tpl:6:49: executing "cache.mcrouter.container" at <.Values.common_images.mcrouter.mcrouter>: nil pointer evaluating interface {}.mcrouter

After fixing that, CI breaks with some mcrouter config horror:

[ERROR] templates/: template: foo-lamp/templates/configmap.yaml:4:4: executing "foo-lamp/templates/configmap.yaml" at <include "cache.mcrouter.configmap" .>: error calling include: template: foo-lamp/templates/vendor/cache/mcrouter_1.3.1.tpl:226:3: executing "cache.mcrouter.configmap" at <include "cache.mcrouter.config" .>: error calling include: template: foo-lamp/templates/vendor/cache/mcrouter_1.3.1.tpl:239:8: executing "cache.mcrouter.config" at <include "cache.mcrouter.routes" .>: error calling include: template: foo-lamp/templates/vendor/cache/mcrouter_1.3.1.tpl:322:19: executing "cache.mcrouter.routes" at <last .routes>: error calling last: runtime error: invalid memory address or nil pointer dereference

Change #1021918 had a related patch set uploaded (by JMeybohm; author: JMeybohm):

[operations/deployment-charts@master] Fix mcrouter module to work our of the box from scaffold

https://gerrit.wikimedia.org/r/1021918

I think I fixed all that because it was blocking me.

But there is also two definitions of the mcrouter container:

{{- define "cache.mcrouter.container" -}}

and

{{/* Begin of code for compatibility with 1.2 */}}
{{- define "cache.mcrouter.deployment" -}}

At least to me it's not clear if/what the plan is to phase this out. Maybe a follow-up task should be linked here or in the file.

JMeybohm lowered the priority of this task from High to Medium.Fri, Apr 19, 1:04 PM

That is my doing, I shouldn't have marked this task as resolved. While I was doing some other work, I found that the definition of cache.mcrouter.deployment was kind of misleading, thus the update. The old definition cache.mcrouter.deployment will be phased out, it is still present because I wanted to move forward with mw-mcrouter ds, without breaking MediaWiki should someone update its modules.

Change #1021918 merged by jenkins-bot:

[operations/deployment-charts@master] Fix mcrouter module to work out of the box from scaffold

https://gerrit.wikimedia.org/r/1021918