Skip to content

fix: Connection timeout added for psql and ssh modes

Dmitry requested to merge 440-dmius-connn-timeout into master

Description

In most cases, when a host is unavailable we have a significant delay when collecting data. Moreover, we experience this delay multiple times -- as many as the number of reports (hence, connection attempts) we have.

A new option was added to specify the connection timeout. The default is 10 seconds.

Additionally, at the very beginning of the collect step, we check host. If host fail, we do not deal with this host anymore and report that the host is unresponsive.

  • the MR description has been reviewed
  • this MR contains text changes and they have been reviewed OR there are no texts changes
  • this MR contains GUI/CLI changes and they have been reviewed OR there are no GUI/CLI changes
  • this MR contains API changes and they have been reviewed OR there are no API changes

Related issue

Examples

[2019-09-16T08:15:32+0300]
[2019-09-16T08:15:32+0300] ########## Perform checks for host '...':
psql: timeout expired
[2019-09-16T08:15:42+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:45+0300]
[2019-09-16T08:15:45+0300] ########## Perform checks for host '...':
[2019-09-16T08:15:46+0300]
[2019-09-16T08:15:46+0300] === Run on '...': ./resources/checks/A001_system_info.sh ===
[2019-09-16T08:15:47+0300] === End of running ===
[2019-09-16T08:15:47+0300] JSON report saved at: './artifacts/p/json_reports/1_2019_09_16T08_06_36_+0300/A001_system_info.json'
[2019-09-16T08:15:48+0300] Markdown report saved at: './artifacts/p/md_reports/1_2019_09_16T08_06_36_+0300/A001.md'
[2019-09-16T08:15:48+0300]
[2019-09-16T08:15:48+0300] All checks have been finished for host '...'!
[2019-09-16T08:15:48+0300]
[2019-09-16T08:15:48+0300] ALL DONE!
[2019-09-16T08:15:50+0300]
[2019-09-16T08:15:50+0300] ########## Perform checks for host '...':
[2019-09-16T08:15:51+0300]
[2019-09-16T08:15:51+0300] === Run on '...': ./resources/checks/A001_system_info.sh ===
[2019-09-16T08:15:52+0300] === End of running ===
[2019-09-16T08:15:52+0300] JSON report saved at: './artifacts/p/json_reports/1_2019_09_16T08_06_36_+0300/A001_system_info.json'
[2019-09-16T08:15:52+0300] Markdown report saved at: './artifacts/p/md_reports/1_2019_09_16T08_06_36_+0300/A001.md'
[2019-09-16T08:15:52+0300]
[2019-09-16T08:15:52+0300] All checks have been finished for host '...'!
[2019-09-16T08:15:52+0300]
[2019-09-16T08:15:52+0300] ALL DONE!
[2019-09-16T08:15:53+0300]
[2019-09-16T08:15:53+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:53+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:53+0300]
[2019-09-16T08:15:53+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:53+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:54+0300]
[2019-09-16T08:15:54+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:54+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:54+0300]
[2019-09-16T08:15:54+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:54+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:55+0300]
[2019-09-16T08:15:55+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:55+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:56+0300]
[2019-09-16T08:15:56+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:56+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:56+0300]
[2019-09-16T08:15:56+0300] ########## Perform checks for host '...':
psql: could not translate host name "..." to address: Name or service not known
[2019-09-16T08:15:56+0300] ERROR: Cannot connect to the host: ....
[2019-09-16T08:15:57+0300]

Closes #440 (closed)

Edited by Anna

Merge request reports