You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version and edition of Flyway are you using?
9.17.0 community
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
command-line
Which database are you using? (Type & version)
Mariadb
Which operating system are you using?
Alpine Linux 3.17 with Java11 inside docker image
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
I used the cli client to do check a database for migrations needed.
The cli client runs inside a docker image in kubernetes. The kubernetes pod is defined as having a read-only file system.
Now the cli client starts and prints some error messages not being able to write reports to disc.
The migrations done n-the-less because latest version catch these errors and do not exit the entire app anymore.
But having this useless/unwanted/expected error messages is cluttering the logs and raises monitoring alarms not needed.
What did you expect to see?
There should be no ERROR messages on cli startup. The reports (JSON + HTML) should not be written by default as with all versions before 9.16.
If it is not possible to change the default behavior there should be at least a env variable and/or configuration parameter to disable writing reports to disc.
What did you see instead?
The docker logs show ERROR messages not being really errors in this case as reports are not needed / wanted.
Flyway Community Edition 9.17.0 by Redgate
Database: jdbc:mariadb://....:3306/dashboard (MySQL 10.4)
Successfully validated 9 migrations (execution time 00:00.075s)
Current version of schema `dashboard`: 009
Schema `dashboard` is up to date. No migration necessary.
ERROR: Unable to create JSON report
org.flywaydb.core.api.FlywayException: Unable to write JSON to file: report.json (Permission denied)
at org.flywaydb.core.internal.util.JsonUtils.jsonToFile(JsonUtils.java:46)
at org.flywaydb.commandline.utils.OperationsReportUtils.createJsonReport(OperationsReportUtils.java:58)
at org.flywaydb.commandline.Main.main(Main.java:178)
ERROR: Unable to create HTML report
org.flywaydb.core.api.FlywayException: Unable to write HTML to file: report.html (Permission denied)
at org.flywaydb.core.internal.util.HtmlUtils.toHtmlFile(HtmlUtils.java:36)
at org.flywaydb.commandline.utils.OperationsReportUtils.createHtmlReport(OperationsReportUtils.java:49)
at org.flywaydb.commandline.Main.main(Main.java:179)
Thanks in advance,
Stefan Seide
--
The text was updated successfully, but these errors were encountered:
or automatically by using OpenShift to run the image. Openshift assigns a random user at image runtime that does not have write access to the flyway directories
We got this error as well, though it looks like random. pod failed to start with this error, but then passed it without any exceptions. There were no migrations required on the 1st run when it failed.
Which version and edition of Flyway are you using?
9.17.0 community
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
command-line
Which database are you using? (Type & version)
Mariadb
Which operating system are you using?
Alpine Linux 3.17 with Java11 inside docker image
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
I used the cli client to do check a database for migrations needed.
The cli client runs inside a docker image in kubernetes. The kubernetes pod is defined as having a read-only file system.
Now the cli client starts and prints some error messages not being able to write reports to disc.
The migrations done n-the-less because latest version catch these errors and do not exit the entire app anymore.
But having this useless/unwanted/expected error messages is cluttering the logs and raises monitoring alarms not needed.
What did you expect to see?
There should be no ERROR messages on cli startup. The reports (JSON + HTML) should not be written by default as with all versions before 9.16.
If it is not possible to change the default behavior there should be at least a env variable and/or configuration parameter to disable writing reports to disc.
What did you see instead?
The docker logs show ERROR messages not being really errors in this case as reports are not needed / wanted.
Thanks in advance,
Stefan Seide
--
The text was updated successfully, but these errors were encountered: