Bug 1226986 - Valkey migration enables bogus valkey@basename services
Summary: Valkey migration enables bogus valkey@basename services
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Antonio Teixeira
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-26 06:16 UTC by Georg Pfuetzenreuter
Modified: 2024-07-01 20:48 UTC (History)
7 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Pfuetzenreuter 2024-06-26 06:16:55 UTC
I never had a "redis@basename" instance! Yet after todays dup to 20240624 which replaced redis with valkey-7.2.5-2.1.x86_64 the migration logic enabled these bogus services, which naturally failed during boot:

```
~> ll /etc/systemd/system/multi-user.target.wants/valkey*
lrwxrwxrwx 1 root root 39 Jun 26 08:10 '/etc/systemd/system/multi-user.target.wants/valkey@basename.service' -> '/usr/lib/systemd/system/valkey@.service'
lrwxrwxrwx 1 root root 48 Jun 26 08:10 '/etc/systemd/system/multi-user.target.wants/valkey-sentinel@basename.service' -> '/usr/lib/systemd/system/valkey-sentinel@.service'
```
Comment 1 Georg Pfuetzenreuter 2024-06-26 06:20:28 UTC
It's still early so I might be missing something, but I think there are missing dollar signs in lines 5 and 6?

https://build.opensuse.org/projects/server:database/packages/valkey/files/migrate_redis_to_valkey.bash?expand=1

As of revision 4 these lines look like this:

```
redisunits=(basename $(find /etc/systemd/system -maxdepth 1 -name "redis@*.service"))
sentinelunits=(basename $(find /etc/systemd/system -maxdepth 1 -name "redis-sentinel@*.service"))
```
Comment 2 Georg Pfuetzenreuter 2024-06-26 06:27:42 UTC
I made a patch, please check - don't have means to test myself - Redis is gone from my system. :-)

https://build.opensuse.org/request/show/1183296
Comment 3 pallas wept 2024-06-27 11:40:42 UTC
(In reply to Georg Pfuetzenreuter from comment #2)
> I made a patch, please check - don't have means to test myself - Redis is
> gone from my system. :-)
> 
> https://build.opensuse.org/request/show/1183296

Thanks for looking into this and reporting it. I'm seeing the same errors.

I have not tested this patch either, it's too late for this system, I just disabled the two services. I'd like to know if that was the correct course of action? Should they be deleted? Repaired? Do replacements need to be created?

Any advice appreciated.