addon-nginx-proxy-manager icon indicating copy to clipboard operation
addon-nginx-proxy-manager copied to clipboard

Suggested solution to issue #365 : Unable to start without MariaDB

Open nlhomme opened this issue 1 year ago • 6 comments

Context

As said in issue #365, the MariaDB addons has several issues due to lack of error handling.

During the start of Nginx Proxy Manager, NPM starts a SQLite database if MariaDB cannot be reach. But this requires that the MariaDB addond is installed and running, even if it cannot be reached by Nginx Proxy Manager.

Proposed change

If a MySQL service is not available, instead of logging an error message and exit with nok), a warning error and logged and the start process continue

Related Issues

Issue 365: Unable to start without MariaDB

nlhomme avatar Oct 07 '22 18:10 nlhomme

This is amazing. Thank you!

rcmurphy avatar Oct 07 '22 18:10 rcmurphy

Typically when rejecting a PR, it’s best to keep the feedback constructive, instead of just saying “wrong”. @frenck could you articulate your issues with the PR and a suggested approach?

rcmurphy avatar Oct 08 '22 13:10 rcmurphy

Hi,

I'm sorry for the empty description (now completed), it's not a lack of motivation, it is an oversight.

Regards

Nicolas

nlhomme avatar Oct 08 '22 16:10 nlhomme

I'm also sorry for the noise made by the "repository.yaml" file, it was a test file created in the wrong branch...

nlhomme avatar Oct 08 '22 16:10 nlhomme

Is the intention to switch the addon from using MariaDB to using SQLite? As the addon has been implemented based on having MariaDB as the backend.

If it is the case, how would you migrate the users data?, as an example if I am currently running the addon and for some reason I stop MariaDB, and restart NPM in this scenario it would start up with a blank SQLite DB. This won't include any of my configuration which is used to generate the Nginx config and manage the certificates. The proxy may still function as they are generated config files, however the application won't be fully functional.

I know there have been some issues relating to MariaDB and startup due to Watchdog, which I believe caused issues in it then returning the correct data for this addon to start. In order to fix that there needs to be a check somewhere to ensure the necessary config isn't null.

sinclairpaul avatar Oct 08 '22 17:10 sinclairpaul

My intent was that one could pick MariaDB or SQLite for their install. Migration would not be supported.

rcmurphy avatar Oct 08 '22 18:10 rcmurphy

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Nov 08 '22 08:11 github-actions[bot]