Page MenuHomePhabricator

Fix redis for stretch
Closed, ResolvedPublic

Description

Sessions don't work on stretch, with redis giving this error: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
The redis log says Failed opening the RDB file redis-db.rdb (in server root dir /srv/redis) for saving: Read-only file system. The file doesn't exist; /srv/redis is drwxr-xr-x redis redis and redis-server runs as redis:redis.
Interestingly if I just start it by hand via sudo /usr/bin/redis-server /etc/redis/redis.conf then it works fine (although MediaWiki sessions still don't).

Apparently the systemd file for redis sets everything to readonly and /srv/redis needs to be whitelisted via ReadWriteDirectories (an undocumented service directive - welcome to systemd). That also seems to fix the performance issues.

Event Timeline

bd808 created this task.Dec 3 2017, 6:08 AM
Tgr added a comment.Dec 3 2017, 6:33 AM

systemctl restart redis hangs forever (not immediately after a system reboot, but it always happens a couple attempts later), which also kills vagrant provision. Not sure if this is a redis problem or something more generic with systemd.

Change 394835 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@stretch-migration] Add systemd override for redis-service

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

Change 394835 merged by jenkins-bot:
[mediawiki/vagrant@stretch-migration] Add systemd override for redis-service

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

bd808 assigned this task to Tgr.Dec 17 2017, 6:59 PM
bd808 closed this task as Resolved.