Skip to content

Example Template Liveness/Readiness Probe Errors #148

Open
@strangiato

Description

@strangiato

The following Maria DB Templates have an incorrectly configured liveness/readiness probe:

When the probes are executed the following warning is logged in the pod:

2021-05-03 20:19:23 29 [Warning] Access denied for user 'userHFP'@'localhost' (using password: YES)
2021-05-03 20:19:27 30 [Warning] Access denied for user 'userHFP'@'localhost' (using password: YES)
2021-05-03 20:19:33 31 [Warning] Access denied for user 'userHFP'@'localhost' (using password: YES)

The probe should be two commands seperated by ; or &&:

"command": [
	"/bin/sh",
	"-i",
	"-c",
	"MYSQL_PWD=\"$MYSQL_PASSWORD\" && mysqladmin -u $MYSQL_USER ping"
]

Executing the command manually generates the following for the current probe:

sh-4.4$ MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'dbuser'@'localhost' (using password: YES)'

With the correction:

sh-4.4$ MYSQL_PWD=\"$MYSQL_PASSWORD\" && mysqladmin -u $MYSQL_USER ping
mysqld is alive

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions