-
Notifications
You must be signed in to change notification settings - Fork 340
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
Cannot deploy module to a fresh production install #763
Comments
Yeah, I am able to reproduce some strange behaviors (not exactly this one, but the "undefined index: websites" is easily reproduceable). Imho this is due to the fact that when injecting the client during the setup:install, you may fall in a case where the client is calling I will dig a bit more on this one. Regards |
Imho we should not try to "always" validate, even if no params were submitted : The Same should apply for the @afoucret any thought ? |
Note for myself : There is also an |
FYI here are my Magento core patches to avoid this issue: https://gist.github.com/shavounet/bd0ac80e7fd63d97d17643ce316d5136 |
@shavounet yes that's sure that the error triggered by magento is quite unclear. But after more digging I'm now sure these errors are triggered when trying to access the ScopeConfiguration during the install process : this is impossible since the configuration has not been already built properly. I agree that magento could handle this more nicely, but we'll also have to address this issue in Elasticsuite. I will propose a fix to @afoucret soon and we'll keep you in touch. Regards |
Yeah I've hesitated to push the issue directly to Magento... but your module is for now the only one impacted. I think it could be up to you to push this issue directly to Magento (and see their reaction). |
PR #769 will merge this one and will be part of release 2.5.2. Feel free to test it |
This might or might not be a native Magento issue... but it prevent your module from being deployed in a standard production procedure.
Might be an edge case, or not... I'm not sure what is triggered
Preconditions
Magento Version : 2.2 (EE B2B, but unrelevent)
ElasticSuite Version : 2.5 (with new --es-hosts install flags)
Environment : prod but reproducible in dev
Steps to reproduce
./bin/magento setup:di:compile
./bin/magento setup:install
(with no params, only to trigger param validation)Expected result
Actual result
Unable to connect ElasticSearch server : Notice: Undefined index: data in /var/www/html/vendor/magento/framework/App/Config/Initial.php on line 60
Note that this message prevent totally the install, even with right parameters (including es-hosts).
Here are the workarounds, I found :
Notice: Undefined index: websites in /var/www/html/vendor/magento/module-config/App/Config/Type/System.php on line 248
)Unable to connect ElasticSearch server : No alive nodes found in your cluster
which is fineI think it might be due to your code checking configuration, looking for es-hosts definition.
The text was updated successfully, but these errors were encountered: