bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.88k stars 9.16k forks source link

[Wordpress] pod crashloops if `wordpressPlugins: all` is enabled #7133

Closed gaurav517 closed 3 years ago

gaurav517 commented 3 years ago

Which chart: Wordpress: version: 12.0.0

Describe the bug pod crashloops if wordpressPlugins: all is enabled

To Reproduce Steps to reproduce the behavior:

  1. k8s pods crashlooping
  2. See error:
wordpress 07:59:44.51 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-wordpress
wordpress 07:59:44.51 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-wordpress/issues
wordpress 07:59:44.51
wordpress 07:59:44.52 INFO  ==> ** Starting WordPress setup **
wordpress 07:59:44.53 DEBUG ==> Validating settings in APACHE_* environment variables
wordpress 07:59:44.56 INFO  ==> Configuring PHP options
wordpress 07:59:44.57 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
wordpress 07:59:44.61 DEBUG ==> Validating settings in WORDPRESS_* environment variables...
wordpress 07:59:44.72 INFO  ==> Ensuring WordPress directories exist
wordpress 07:59:44.73 INFO  ==> Trying to connect to the database server
wordpress 07:59:44.73 DEBUG ==> Executing SQL command:
SELECT 1
1
wordpress 07:59:44.75 INFO  ==> Configuring WordPress with settings provided via environment variables
wordpress 07:59:44.75 DEBUG ==> Setting FS_METHOD to 'direct' in WordPress configuration (literal: no)
Success: Added the constant 'FS_METHOD' to the 'wp-config.php' file with the value 'direct'.
wordpress 07:59:45.00 DEBUG ==> Setting WP_HOME to ''http://' . $_SERVER['HTTP_HOST'] . '/'' in WordPress configuration (literal: yes)
Success: Added the constant 'WP_HOME' to the 'wp-config.php' file with the raw value ''http://' . $_SERVER['HTTP_HOST'] . '/''.
wordpress 07:59:45.22 DEBUG ==> Setting WP_SITEURL to ''http://' . $_SERVER['HTTP_HOST'] . '/'' in WordPress configuration (literal: yes)
Success: Added the constant 'WP_SITEURL' to the 'wp-config.php' file with the raw value ''http://' . $_SERVER['HTTP_HOST'] . '/''.
wordpress 07:59:45.46 DEBUG ==> Setting DB_NAME to 'mydb_wordpress' in WordPress configuration (literal: no)
Success: Updated the constant 'DB_NAME' in the 'wp-config.php' file with the value 'mydb_wordpress'.
wordpress 07:59:45.69 DEBUG ==> Setting DB_USER to 'myuser' in WordPress configuration (literal: no)
Success: Updated the constant 'DB_USER' in the 'wp-config.php' file with the value 'user'.
wordpress 07:59:45.91 DEBUG ==> Setting DB_PASSWORD to 'password' in WordPress configuration (literal: no)
Success: Updated the constant 'DB_PASSWORD' in the 'wp-config.php' file with the value 'password'.
wordpress 07:59:46.14 DEBUG ==> Setting DB_HOST to '10.243.0.3:3306' in WordPress configuration (literal: no)
Success: Updated the constant 'DB_HOST' in the 'wp-config.php' file with the value '10.243.0.3:3306'.
Success: Shuffled the salt keys.
wordpress 07:59:46.61 DEBUG ==> Setting WP_AUTO_UPDATE_CORE to 'false' in WordPress configuration (literal: yes)
Success: Added the constant 'WP_AUTO_UPDATE_CORE' to the 'wp-config.php' file with the raw value 'false'.
wordpress 07:59:46.83 INFO  ==> Installing WordPress
WordPress is already installed.
wordpress 07:59:47.50 INFO  ==> Activating all installed plugins
usage: wp plugin install <plugin|zip|url>... [--version=<version>] [--force] [--activate] [--activate-network] [--insecure]

Expected behavior Pod should be running.

Version of Helm and Kubernetes:

helm version
version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa28009b71", GitTreeState:"dirty", GoVersion:"go1.16.5"}
kubectl version 
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:52:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.8-gke.900", GitCommit:"28ab8501be88ea42e897ca8514d7cd0b436253d9", GitTreeState:"clean", BuildDate:"2021-06-30T09:23:36Z", GoVersion:"go1.15.13b5", Compiler:"gc", Platform:"linux/amd64"}
pablogalegoc commented 3 years ago

HI @gaurav517,

I see this behaviour as well, it seems that it is the --all flag added to the wp plugin install that is causing the command execution to fail, I'll take a look into it and report back what I find.

pablogalegoc commented 3 years ago

Hi again @gaurav517, I've pushed a change in the Wordpress container that should fix this issue. Will let you know once it is published by our internal release process.

gaurav517 commented 3 years ago

Thanks @pablogalegoc, can you link the commit? for my own curiosity? thanks.

pablogalegoc commented 3 years ago

Of course @gaurav517, right now the release process is blocked by some failing tests unrelated to this change so once it is solved basically you will see minor a change here and bellow https://github.com/bitnami/bitnami-docker-wordpress/blob/33eb9cddd1e23e840d7f67f801d5e7b0a69018a7/5/debian-10/rootfs/opt/bitnami/scripts/libwordpress.sh#L297 We were mixing command flags for wp plugin install and wp plugin activate

pablogalegoc commented 3 years ago

@gaurav517 here's the change: https://github.com/bitnami/bitnami-docker-wordpress/commit/113f71db2fa7d846ca650151601da752fccabf26. Let me know if you find further issues with this.

github-actions[bot] commented 3 years ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 3 years ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.