containers
containers copied to clipboard
[bitnami/worpdres] ID number error when use galera database system
Name and Version
bitnami/wordpress:6.0.1-debian-11-r7
What steps will reproduce the bug?
- Run any chart with galera cluster, as the example mariadb-galera 7.3.10, where you have 2 or more master replica pods.
- Then create wordpress/bitnami chart and attach it to the cluster.
- If the galera cluster decides to attach you to any pods but not first you take an error "Error: wrong id, user or password: 1".
What is the expected behavior?
Just run a container))
What do you see instead?
"Error: wrong id, user or password: 1".
Additional information
This problem is the result of this part of the libwordpress.sh script, which you use as the init-script inside the container.
# Post installation steps
local -r default_user_id="1"
wp_execute user meta set "$default_user_id" first_name "$WORDPRESS_FIRST_NAME"
wp_execute user meta set "$default_user_id" last_name "$WORDPRESS_LAST_NAME"
#Increase upload limit for multisite installations (default is 1MB)
local -r default_site_id="1"
is_boolean_yes "$WORDPRESS_ENABLE_MULTISITE" && wp_execute site meta update "$default_site_id" fileupload_maxk "$WORDPRESS_MULTISITE_FILEUPLOAD_MAXK"
You check that the ID number of the user is 1, but when you use the galera cluster this field is set as the number of the cluster pod, so it can be 1,2,3,4, and so on.