Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

stable/wordpress MARIADB_PORT_NUMBER %!s(int64=3306) #21142

Closed
peterculak opened this issue Feb 29, 2020 · 9 comments · Fixed by #21172
Closed

stable/wordpress MARIADB_PORT_NUMBER %!s(int64=3306) #21142

peterculak opened this issue Feb 29, 2020 · 9 comments · Fixed by #21172

Comments

@peterculak
Copy link

peterculak commented Feb 29, 2020

kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:07:13Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
# helm version
version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}

helm install ldab0ef8b --set ingress.hostname=55974e94-d909-4a8f-be5f-44ccc349dce2.kubernetes.local,extraEnv[0].name=WORDPRESS_URL,extraEnv[0].value=55974e94-d909-4a8f-be5f-44ccc349dce2.kubernetes.local,externalDatabase.host=hosting-mariadb.databases.svc.cluster.local,externalDatabase.port=3306,externalDatabase.user=root,externalDatabase.password=root,externalDatabase.database=993e718b94164d618af2965a461fe8c1 -f /helm/wordpress/values.yaml stable/wordpress 2>&1

after running this it creates deployment with

actual
MARIADB_PORT_NUMBER=%!s(int64=3306)
expected
MARIADB_PORT_NUMBER=3306
@UbiquitousBear
Copy link

What version of the chart is installed? Use helm ls to find out

@UbiquitousBear
Copy link

UbiquitousBear commented Mar 1, 2020

Looks like this started to happen after #21099 was merged @juan131 @javsalgar @carrodher

@peterculak
Copy link
Author

# helm ls
NAME                                 	NAMESPACE                           	REVISION	UPDATED                                	STATUS  	CHART          	APP VERSION
u9d595e15-cce8-4595-91bf-0b1b8196a6d8	97ad778d-0659-4fca-9d6a-1c0cdc5ecc31	1       	2020-03-01 16:33:25.051127861 +0000 UTC	deployed	wordpress-9.0.0	5.3.2

@juan131
Copy link
Collaborator

juan131 commented Mar 2, 2020

Hi everyone,

Please correct me if I'm wrong but you're using the parameters below:

(...)
--set externalDatabase.host=hosting-mariadb.databases.svc.cluster.local \
 --set externalDatabase.port=3306 \
 --set externalDatabase.user=root \ 
 --set externalDatabase.password=root \
 --set externalDatabase.database=993e718b94164d618af2965a461fe8c1

However, you're not using --set mariadb.enabled=false. Therefore, all the parameters that affect the external database will be ignored.

Regarding the issue, I'm unable to reproduce it. See:

$ helm template wordpres \
  --set externalDatabase.host=foo \
  --set externalDatabase.port=3306 \
  --set externalDatabase.user=root \
  --set externalDatabase.password=root \
  --set externalDatabase.database=wp_db \
  --set mariadb.enabled=false stable/wordpress
(...)
# Source: wordpress/templates/deployment.yaml
(...)
        env:
        - name: ALLOW_EMPTY_PASSWORD
          value: "yes"
        - name: MARIADB_HOST
          value: "foo"
        - name: MARIADB_PORT_NUMBER
          value: "3306"
        - name: WORDPRESS_DATABASE_NAME
          value: "wp_db"
        - name: WORDPRESS_DATABASE_USER
          value: "root"
        - name: WORDPRESS_DATABASE_PASSWORD
          valueFrom:
            secretKeyRef:
              name: wordpres-externaldb
              key: db-password

@foux
Copy link

foux commented Mar 2, 2020

I can confirm the issue with disabling the external database. Here is my (redacted) values.yaml :

mariadb:
  enabled: false

externalDatabase:
  host: xxx.xxx.xxx.xxx
  user: xxxxx
  password: "xxxxx"
  database: xxxxx
  port: 14948

And when installing, with Helm3, the output of the wordpress pod is :


Welcome to the Bitnami wordpress container
Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-wordpress
Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-wordpress/issues
Send us your feedback at containers@bitnami.com

WARN  ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
nami    INFO  Initializing apache
nami    INFO  apache successfully initialized
nami    INFO  Initializing php
nami    INFO  php successfully initialized
nami    INFO  Initializing mysql-client
nami    INFO  mysql-client successfully initialized
nami    INFO  Initializing wordpress
wordpre INFO  ==> Preparing Varnish environment
wordpre INFO  ==> Preparing Apache environment
wordpre INFO  ==> Preparing PHP environment
mysql-c INFO  Trying to connect to MySQL server
Error executing 'postInstallation': "port" option should be >= 0 and < 65536: %!s(float64=14948)```
And the pod goes into error

@foux
Copy link

foux commented Mar 2, 2020

And switching to chart 8.1.5 works

@juan131
Copy link
Collaborator

juan131 commented Mar 2, 2020

Oh I found the error! Creating a PR to address it!
Thanks for reporting it

@foux
Copy link

foux commented Mar 2, 2020

Thanks @juan131 !

@juan131
Copy link
Collaborator

juan131 commented Mar 2, 2020

The issue has been addressed in the above PR. You shouldn't face it anymore using the chart version 9.0.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants