Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook notification when server fails to start in timely manner is not clear #21

Open
WadeBarnes opened this issue Apr 3, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@WadeBarnes
Copy link
Member

When database validation fails due to server startup, the resulting WebHook notification is lacking the details of why the verification failed.

Example notification:

Rocket.Cat @rocket.cat Bot 6:53 AM
Error message received from Ontario's Verifiable Organizations (prod):
Backup verification failed; /backups/daily/2019-04-03/postgresql-TheOrgBook_Database_2019-04-03_09-00-00.sql.gz

Elapsed time: 0h:0m:45s - Status Code: 1

Running the verification from the command line provides the important failure details;

sh-4.2$ ./backup.sh -s -v all

Verifying backup ...

Settings:
- Database: postgresql:5432/TheOrgBook_Database
- Backup file: /backups/daily/2019-04-03/postgresql-TheOrgBook_Database_2019-04-03_09-00-00.sql.gz

waiting for server to start..............................
The server failed to start within 30 seconds.

waiting for server to shut down...... done
server stopped
Cleaning up ...

[!!ERROR!!] - Backup verification failed; /backups/daily/2019-04-03/postgresql-TheOrgBook_Database_2019-04-03_09-00-00.sql.gz

Elapsed time: 0h:0m:45s - Status Code: 1

The Webhook notification should indicate the verification failed because the server did not start in the allotted time.

The amount of time the script waits for the server to start is controlled by the DATABASE_SERVER_TIMEOUT environment variable. The default is 30 seconds. If you find you are receiving these types of errors, you can try increasing the timeout.

@WadeBarnes WadeBarnes added the enhancement New feature or request label Apr 3, 2019
@WadeBarnes WadeBarnes self-assigned this Apr 3, 2019
@WadeBarnes WadeBarnes added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant