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

D7 o_contrib_seven, redis and redis_edge #1661

Open
zanami opened this issue Jun 30, 2022 · 11 comments
Open

D7 o_contrib_seven, redis and redis_edge #1661

zanami opened this issue Jun 30, 2022 · 11 comments

Comments

@zanami
Copy link

zanami commented Jun 30, 2022

First of all, looks like my BOA is somewhat broken and I'm sure it's not a common problem.
I just want to understand what's up with redis and redis_edge.

My D7 custom platforms (just regular D7s and one Panopoly) are in ~/static.
Inside /modules/o_contrib_seven 2 symlinks
redis
redis_edge

redis is enabled, so I guess Drupal loads redis.module which requires autoload.inc

$ drush pmi redis
 Extension        :  redis
 Type             :  module
 Title            :  Redis
 Description      :  Provide a module placeholder, for using as dependency for module that needs Redis.
 Version          :  7.89
 Package          :  Performance
 Core             :  7.x
 PHP              :  5.2.4
 Status           :  enabled
 Path             :  modules/o_contrib_seven/redis
 Schema version   :  module has no schema

then ~/config/includes/global.inc AKA /data/conf/global.inc does it's job and sets cache_backends

$ drush vget cache_backends
cache_backends:
  - modules/o_contrib_seven/redis_edge/redis.autoload.inc

then bootstrap.inc does require_once and I get "cannot redeclare redis_autoload" error

I don't know how this should work, either Drupal should pick up modules/o_contrib_seven/redis_edge as Path (how?) or... no, I can't think of anything else.

Solutions are all hacky and not permanent
— disabling redis module, it still works, Drupal just doesn't load it. Ok, but BOA enables it back eventually
— deleting /data/all/000/modules/redis (BOA puts it back on update)
— hacking redis.autoload.inc to change function name (same)

Could please someone with D7 do...

drush @site_alias pmi redis 
drush @site_alias vget 'cache_backends'
ls -l modules/o_contrib_seven

UPDATE

Another "solution" is to symlink the "correct" redis in platform's sites/all/modules folder

cd ~/static/platformname/sites/all/modules     
ln -s ../../../modules/o_contrib_seven/redis_edge redis

Inspired by /distro/017/drupal-7.56.1-prod provided by BOA, it has it's own separate sites/all/modules/redis
Interestingly, redis status is "not installed" there and BOA doesn't enable it.

@EdNett
Copy link

EdNett commented Jun 30, 2022

Hello , Don't know if you need this still, but

drush @site_alias pmi drush gives drush was not found
drush @dite_alias vget 'cache_backends' gives no matching variable found
ls -l modules/o_contrib_seven gives error *** forbidden path -> "/data/all/029/o_contrib_seven/"

good luck,

Ed

@zanami
Copy link
Author

zanami commented Jun 30, 2022

Sorry, my bad, should be
drush @site_alias pmi redis
drush @site_alias vget cache_backends

where @site_alias is your actual site alias, like @whatever.com

@EdNett
Copy link

EdNett commented Jun 30, 2022

Extension : redis
Project : redis
Type : module
Title : Redis
Description : Provide a module placeholder, for using as dependency for module that needs
Redis.
Version : 7.x-3.18
Date : 2019-10-30
Package : Performance
Core : 7.x
PHP : 5.2.4
Status : not installed
Path : sites/all/modules/redis
Schema : no schema installed

cache_backends:

  • modules/o_contrib_seven/redis_edge/redis.autoload.inc

@zanami
Copy link
Author

zanami commented Jun 30, 2022 via email

@omega8cc
Copy link
Owner

Please check if you have duplicate in sites/all/modules/redis and remove it. It doesn’t matter what are the versions in o_contrib because they are loaded via individual configuration in the global.inc

Sent with GitHawk

@omega8cc
Copy link
Owner

Once removed the duplicate please run registry rebuild — either in Aegir or drush @site rr

Sent with GitHawk

@zanami
Copy link
Author

zanami commented Jul 1, 2022

I didn't have anything in sites/all/modules apart from boa platform ini stuff

It doesn’t matter what are the versions in o_contrib because they are loaded via individual configuration in the global.inc

Yes, global.inc is where cache_backend is set to use redis_edge. But it does not prevent Drupal from loading redis module, if it's enabled. And out of 2 versions available in o_contrib_seven it picks redis over redis_edge somehow.

EdNett posted above, the module doesn't matter if it's disables/not installed.

I tried pm-uninstall redis in my ~/static/d7 platform, but BOA keeps enabling it, so I had to create a symlink to the "proper" redis_edge in sites/all/modules

This doesn't feel right as I couldn't find any similar issues or docs on how to deal with it. Looks like BOA does not care about redis in it's bundled d7 platforms (or even enforce it to be disables, not sure) while it keeps enabling redis in custom d7 platforms.

I have a D6 custom platform - redis is "not installed". If I try to enable redis I get "redis is incompatible with the Drupal version." backend_cache is set and redis is working, I guess.

I also have couple of D8 custom platforms - redis is enabled. o_contrib_eight also has 2 redis flavors: redis_compr and redis_eight but somehow Drupal loads the same redis_eight as global.inc. D8 is different so I didn't investigate it much. It works as is.

@zanami
Copy link
Author

zanami commented Oct 11, 2022 via email

@omega8cc
Copy link
Owner

Good point, we have already dropped the procedure for D8+ sites which enabled redis module daily -- it was a leftover from the time before we were able to handle this on the fly and for all Drupal cores with extra options in the INI files for compatibility. It should be still properly documented, though, but is explained the built-in docs: https://github.com/omega8cc/boa/blob/master/aegir/conf/default.boa_site_control.ini#L44

@EdNett
Copy link

EdNett commented Jun 7, 2023

I had forgotton about this - and I posted a new issue : #1716

For me, currently, 4.2.0 stable june 7 2023 - unless I disable redis in the boa_site_control.ini file - the site is down - 500 unresponsive! So it's a big error.

Why can't we simply permanently remove (or remove after each update to barracuda) either
/data/all/000/modules/redis_edge/ or
/data/all/000/modules/redis/ ?

Wouldn't removing one of those directories recursively take care of the problem? As I posetd in #1724

And why do we have both anyways? There isn't a redis_edge module for d7, is there?

Ed

@omega8cc
Copy link
Owner

@EdNett no, you should never delete anything there, because you are not even aware that redis_edge is essential for Drupal 7, and instead follow these steps:

  1. Set _MODULES_FIX=NO in /root/.barracuda.cnf
  2. Disable redis module with drush in any affected site
  3. Make sure you don't have duplicate redis module in sites/all/modules
  4. Run drush @sitename rr for any affected site

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

No branches or pull requests

3 participants