Fixes #35564 - Use Redis 6 on EL8
Requires: https://github.com/voxpupuli/puppet-redis/pull/450
What will handle the migration of existing installations?
Those will have the redis:5 module stream enabled, and you can't enable redis:6 without a dnf module reset first (well, there is dnf module switch-to, but not in EL8). See https://docs.fedoraproject.org/en-US/modularity/using-modules/#_switching_module_streams for more explicit "how to switch" docs.
I think because of this line Puppet won't switch modules: https://github.com/voxpupuli/puppet-redis/blob/cfa21daf10a11bbd40aafd409cffc39b2babe2f7/manifests/dnfmodule.pp#L15
I think because of this line Puppet won't switch modules: https://github.com/voxpupuli/puppet-redis/blob/cfa21daf10a11bbd40aafd409cffc39b2babe2f7/manifests/dnfmodule.pp#L15
That's a nice pitfall! ;-)
enable_only => true means Puppet will execute dnf module enable <module> instead of dnf module install <module>.
[root@6db2ac08f14e ~]# echo "package { 'redis': ensure => present }" | puppet apply -v
Notice: Compiled catalog for 6db2ac08f14e.redhat.com in environment production in 0.18 seconds
Info: Using environment 'production'
Info: Applying configuration version '1665125076'
Notice: /Stage[main]/Main/Package[redis]/ensure: created
Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml
Notice: Applied catalog in 1.83 seconds
[root@6db2ac08f14e ~]# dnf module list --enabled
Last metadata expiration check: 0:01:23 ago on Fri Oct 7 06:43:32 2022.
CentOS Stream 8 - AppStream
Name Stream Profiles Summary
redis 5 [d][e] common [d] Redis persistent key-value database
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@6db2ac08f14e ~]# echo "package { 'redis module': ensure => '6', name => 'redis', provider => 'dnfmodule', enable_only => true }" | puppet apply -v
Notice: Compiled catalog for 6db2ac08f14e.redhat.com in environment production in 0.18 seconds
Info: Using environment 'production'
Info: Applying configuration version '1665125223'
Notice: /Stage[main]/Main/Package[redis module]/ensure: ensure changed '5' to '6'
Notice: Applied catalog in 3.55 seconds
[root@6db2ac08f14e ~]# dnf module list --enabled
Last metadata expiration check: 0:03:39 ago on Fri Oct 7 06:43:32 2022.
CentOS Stream 8 - AppStream
Name Stream Profiles Summary
redis 6 [e] common [d] Redis persistent key-value database
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@6db2ac08f14e ~]# rpm -q redis
redis-5.0.3-5.module_el8.4.0+955+7126e393.x86_64
Interestingly, it seems to switch the module just fine, but obviously does not update the package if already installed.
@ehelms is this something we want to have for 3.5? (I would think so?)
@ehelms is this something we want to have for 3.5? (I would think so?)
Yes! I need to finish upgrade testing.