-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Warn user when programs are missing like mysql, mysqldump, rsync, sqlite3 #1371
Comments
A note on the above: Drupal seems to use an absolute positioning for the database, so to see the site you need to change the permissions on the database. For example if your container is f25, you could type:
Now, the site will be visible in a browser. However the following still will say "needs higher bootstrap", even though the site is fully live:
|
I ran the command with --debug, and the problem was that sqlite3 was not available. This is not immediately obvious, especially taking into account the following factors:
Proposed feature request: Instead of failing with:
The failure could be something like:
|
Similarly, I dont think we validate to make sure that other key programs are available like |
Reference: https://www.drupal.org/node/1820166 |
I just spent a good hour or so figuring out that drush requires the mysql client due to the lack of information in that error message. I think this is the second time I've had to figure this out... So I'd love to see more informative error messages. |
The link @jonhattan posted is a good starting point. Other relevant examples that I have seen are composer diagnose and |
Yes, and the current error msg is misleading:
|
I also ran into this problem. I have separate Docker containers for php and database servers, so the php container doesn't have mysql client installed, which makes Drush fail with the obscure error message. |
Wow, I'm so glad I finally found this issue! Running |
I've just had to spent some time debugging this issue also, in the context of using a mysql docker container. I'm not really understanding why this dependency is necessary? PHP can already communicate with the database, running in another container on the network just fine, without the need for I had thought that perhaps it was checking for a socket, as the message suggests, however the directory is empty, and would be useless anyway:
As the above comments, it would be preferable to not have to bake this package into the PHP container when it is seemingly unnecessary. |
After some more investigation, it seems that Drush isn't written to use native PHP mysql drivers at all, and calls the client directly.
Is used to construct a shell command:
The solution really is to just use PHP to connect to the database? |
#2410 |
I mean I can understand this for the sql-dump sqlc and other commands, but why does |
Thats part of Drush's progressive bootstrap. Been that way for many years. Its true that some commands dont need it but enough do thats its not that helpful to bootstrap differently for different types of commands. |
Thanks for adding me to this bug. I've been using the old drush (5.10.0) so far, up till now. Now that that version shows its age, is unmaintained, and out of Debian; I chose to follow the new trend of using software directly from the upstream projects. Because as I remember, the new drush was known to be hard to package for a distribution. Not having a package (and pacakge metadata/relationship/dependency) is what led to not noticing the missing dependency. It'd be nicer to have such self reliant tools to have a better error message. |
There's any progress on this issue? mysql client shouldn't be a dependency since php could handle all the mysql communication. Maybe we could leave this as an option. I had the case which I can only use the RHEL7 Docker images, but the images of PHP lack on that dependency. https://access.redhat.com/containers/#/search/php |
@sebas5384 there are no plans to get rid of dependency on |
I don't think anyone is saying that mysql client shouldn't be required for sql-dump and sql-cli. The problem is when it's required for commands like cache-rebuild. This is becoming more of an issue with technologies like Docker, Kubernetes, Openshift, Heroku, etc becoming more popular for Drupal hosting, since containers tend to be very compact and while they often have more than enough requirements to run Drupal, things like cache-rebuild or cron should be able to run as well. |
but |
Having just gone through a frustrating hour with this uninformative error message to finally determine that I needed postgresql-client to let drush work with my external db; I understand it doesn't make sense to try to diagnose all missing dependencies, but adding the simple reminder to "try running drush with --debug to diagnose dependency problems" would go a long way. |
Just added a warning in drush master for this. |
Drush master now uses PHP to connect to the DB when bootstrapping (#3800). So now a lot of commands don't require mysql-client. The sql:* commands still do, as does site:install. |
Background:
I have a Docker file which installs Drush (latest dev version), runs drush site-install, and then attempts to enable certain modules. At the last step, there is a "needs higher bootstrap" error.
You can see the resulting output at https://circleci.com/gh/alberto56/docker-drupal/1.
Note the following:
Steps to reproduce:
This will result in the error.
Possibly related to: #1336
The text was updated successfully, but these errors were encountered: