Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis won't start after upgrading to icingadb-redis 7.2.6-2+debian12 #47

Closed
sagepe opened this issue Oct 31, 2024 · 3 comments
Closed

Comments

@sagepe
Copy link

sagepe commented Oct 31, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 8.10.0-1bookworm
  • Ruby: ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-linux]
  • Distribution: Debian 12
  • Module version: 3.1.1

How to reproduce (e.g Puppet code you use)

  class { 'icingadb::redis':
    manage_repos => false,
    bind         => ['127.0.0.1', '::1'],
    port         => 6380,
  }

Upgrade from 7.0.15-1+debian12 => 7.2.6-2+debian12

What are you seeing

Icingadb-redis won't start with the following error:

... systemd[1]: Starting icingadb-redis.service - Redis database for Icinga DB...
... icingadb-redis-server[3754696]: *** FATAL CONFIG FILE ERROR (Redis 7.2.6) ***
... icingadb-redis-server[3754696]: Can't open the log file: Read-only file system
... systemd[1]: icingadb-redis.service: Main process exited, code=exited, status=1/FAILURE
... systemd[1]: icingadb-redis.service: Failed with result 'exit-code'.
... systemd[1]: Failed to start icingadb-redis.service - Redis database for Icinga DB.

What behaviour did you expect instead

icingadb-redis to start successfully after an upgrade.

Output log

See above.

Any additional information you'd like to impart

According to this forum post, the latest icingdb-redis package took out ReadWritePaths=-/var/log/icingadb-redis from the service unit file shipped with the package and set logfile="" in the default configuration file.

This module uses puppet-redis, which in turn expects a log file to be set - I don't think there's a way to override this. This module also sets manage_service_file => false, so the service unit as shipped is used.

We've worked around this by adding a drop-in file via our profile class:

systemd::dropin_file { 'redis-logfile.conf':
  unit    => 'icingadb-redis.service',
  content => "[Service]\nReadWritePaths=-/var/log/icingadb-redis\n",
}

I wasn't sure what the best place for this was, but I thought I'd open an issue here for visibility. There may be a way of working around this in a different fashion with the modules as-is, but this is what we did.

@lbetz
Copy link
Contributor

lbetz commented Oct 31, 2024

Hi, I haven't any problem with these versions if I use the default logdir /var(log/icingadb-redis. The unit file of icingadb-redis-7.2.6-2 has the setting ReadWritePaths=-/var/log/icingadb-redis.

@sagepe
Copy link
Author

sagepe commented Oct 31, 2024

Ah, I think I know what's happened - my mistake.

The initial release, 7.2.6-1, had omitted the line, it looks like it was restored in 7.2.6-2. This got crossed over in my testing, so you're quite right, this is no longer an issue.

Apologies!

@sagepe sagepe closed this as completed Oct 31, 2024
@lbetz
Copy link
Contributor

lbetz commented Oct 31, 2024

Yes. You're right. In the previous version of the package I noticed this issue I did my best to get it fixed by icinga.
To log to journald I opened a PR:
voxpupuli/puppet-redis#534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants