redis / redis-debian

Debian packaging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis package not supporting Systemd notify (again)?

readingtype opened this issue · comments

I think this issue may have crept back in. The symptom is that Systemd constantly restarts Redis until TimeoutStartSec is reached.

This was a problem for me back in August with ppa:chris-lea:/redis and I'm afraid I am only now able to return to the work I was doing then to check how things are in the new PPA.

My use case will be extremely common: a Systemd unit for a Redis instance, and I would like to use the notify setting in the unit so as to maximise Systemd's usefulness.

The unit type is notify, and in the Redis config file daemonize is set to no and supervised is set to systemd.

My OS is Ubuntu 20.04 on the aarch64 platform (Raspberry Pi 4). But I have just tried it out on a VM that's running on x86_64 with the same result.

@readingtype Looks like the build was not done with libsystemd. Can you take a look at the latest package? I noticed that some builds failed due to flaky tests but Focal/arm64 should be OK.

@yossigo Sure. I have removed 6:6.0.8 installed yesterday. However there seems to be an issue in that there's no redis-server at 6:6.0.9-3rl1-focal. Please point out my mistakes!

`$ sudo apt-get install redis=6:6.0.9-3rl1~focal1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
redis : Depends: redis-server (>= 6:6.0.9-3rl1~focal1) but 6:6.0.9-2rl1~focal1 is to be installed

$ sudo apt-get install redis-server=6:6.0.9-3rl1~focal1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '6:6.0.9-3rl1~focal1' for 'redis-server' was not found`

I admit I haven't fully grasped the nature of the relationship between redis and redis-server packages (especially as I don't see redis-server in the redis/redis-debian PPA), but the apt-cache policy info looks like this:

`
$ apt-cache policy redis
redis:
Installed: (none)
Candidate: 6:6.0.9-3rl1~focal1
Version table:
6:6.0.9-3rl1~focal1 500
500 http://ppa.launchpad.net/redislabs/redis/ubuntu focal/main arm64 Packages
6:6.0.9-2rl1~focal1 500
500 http://ppa.launchpad.net/redislabs/redis/ubuntu focal/main arm64 Packages
5:5.0.7-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages

$ apt-cache policy redis-server
redis-server:
Installed: (none)
Candidate: 6:6.0.9-2rl1~focal1
Version table:
6:6.0.9-2rl1~focal1 500
500 http://ppa.launchpad.net/redislabs/redis/ubuntu focal/main arm64 Packages
6:6.0.8-5rl1~focal1 -1
100 /var/lib/dpkg/status
5:5.0.7-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages
`

Note to say after messing around with apt for a while I got an updated installation using

$sudo apt-get install redis=6:6.0.9-2rl1~focal1

@readingtype Apparently the packages took longer than expected to get built on launchpad. You should be able to find 6.0.9-3rl1 available now and hopefully the systemd issue is resolved. Please let me know if that's not the case.

@yossigo Thanks. I can confirm 6:6.0.9-3rl1~focal1 is installed.

On a VM with amd_64 and Ubuntu 18.04 the Notify setting is allowing the unit to load properly. Great!

On the machine I'm more interested in, which is aarch_64 and Ubuntu 20.04, the unit still won't load and the server is restarted endlessly.

So:

  • 6:6.0.9-3rl1~bionic1 OK.
  • 6:6.0.9-3rl1~focal1 not OK.

I hope this narrows the issue down! Apologies that I didn't report the release version on the VM earlier.

@readingtype Thanks for clarifying that. I went back to the build logs and I can confirm that 6.0.9-3rl1 does build with libsystemd on arm64 as well, so it doesn't seem like a build issue - could be a real bug.

Any logs that may give us a hint about what's wrong?

@yossigo The only log I know of is the one from the instance. The extract attached shows what is logged endlessly when systemd tries to start the instance in notify mode. I've included two cycles. The SIGTERM is from systemd.
systemd-notify-redis-6-6.0.9-3rl1-focal1-aarch64-log.txt

@readingtype I've just confirmed that it does indeed work, also on Ubuntu 20.04 / arm64 platforms.
Can you make sure your Redis configuration includes daemonize no and supervised auto?

@yossigo Good catch! I had missed that regressing in my config. I've actually set it to systemd. It's working now. Thanks a lot.