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

Update logging in scanHost and apply timeout to each step of the scanning progress #1101

Merged
merged 1 commit into from Mar 26, 2024

Conversation

ChrisSchinnerl
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl commented Mar 25, 2024

Closes #1088

Updates scanHost to be a bit more generous with the timeout and apply it to each step of the scanning process. That way, if resolving the IP address took 3 seconds and fetching the settings takes 4 we won't fail the scan if fetching the price table takes another 4 seconds.

We also log both errors now when a scan fails twice.

@ChrisSchinnerl ChrisSchinnerl self-assigned this Mar 25, 2024
@ChrisSchinnerl ChrisSchinnerl marked this pull request as ready for review March 25, 2024 15:10
Copy link
Member

@peterjan peterjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is good to merge but maybe we should add a TODO to remove the timeout parameter. It should just use the given context and on the caller side we make sure we pass in a reasonable timeout value. Doing so would also get rid of the timeout update mechanism in the scanner, which apparently applies a min timeout of 10s anyway so that mechanism isn't doing anything because 99% of scans are done in <4 s .

@ChrisSchinnerl ChrisSchinnerl merged commit 19a25f9 into dev Mar 26, 2024
9 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the chris/host-scan-logging branch March 26, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Host scans fail due to closed streams on our side
2 participants