Closed geerlingguy closed 5 years ago
The reason I'm bumping into this is because, now that I have Drupal running with a base set of 2
replicas, the installer (install.php
) seems to error out whenever I try running it via the UI.
So I'm trying to get one of the Drupal pods, then run kubectl exec
against it to do a drush site-install
.
This helped: https://github.com/geerlingguy/ansible-role-kubernetes/commit/dcea1bfe57538a309f46c6bddb9b3a09fa881112
For Vagrant I had:
kubernetes_kubelet_extra_args: '--node-ip={{ inventory_hostname }}'
But since I updated the inventory layout, it now needs to be:
kubernetes_kubelet_extra_args: '--node-ip={{ ansible_host }}'
Testing the fix locally.
Gah, that works... but now I'm hitting some other frustrating things once in the Drupal pod, like:
root@drupal8-f446ddc7b-2d64s:/var/www/html# vendor/bin/drush site-install standard --db-url='mysql://drupal:$DRUPAL_DB_PASSWORD@$DRUPAL_DB_HOST/drupal' --site-name='Pi Dramble'
You are about to CREATE the 'drupal' database. Do you want to continue? (yes/no) [yes]:
> yes
In SiteInstallCommands.php line 354:
Failed to create database: sh: 1: mysql: not found
Apparently I don't have mysql-client
in the geerlingguy/drupal
base image.
Opened upstream issue: https://github.com/geerlingguy/drupal-container/issues/9
For example:
This is definitely happening in the Vagrant environment, but not sure yet about the Dramble (Pi) environment. I haven't run the playbook in that environment for a couple days.
If it's just Vagrant, it's likely related to the network interfaces, and it's trying to route a request over an internal network which can't see the other nodes.