ROX-33865: Scanner V4 retry initial DB connection#19761
Conversation
|
Skipping CI for Draft Pull Request. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19761 +/- ##
==========================================
- Coverage 49.58% 49.58% -0.01%
==========================================
Files 2761 2761
Lines 208140 208146 +6
==========================================
Hits 103214 103214
- Misses 97260 97266 +6
Partials 7666 7666
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Images are ready for the commit at 7324d70. To use with deploy scripts, first |
The assumption here is that connection pools in |
BradLugo
left a comment
There was a problem hiding this comment.
LGTM. Though it makes me wonder if some behavior should be changed in claircore.
🚀 Build Images ReadyImages are ready for commit 0f13ca6. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-622-g0f13ca6fe2 |
Description
Fixes crash in Scanner V4 Indexer and Matcher startup
The upgrade to pgx5 in claircore changed
postgres.Connect()so that it no longer establishes a DB connection. This causes Scanner V4 indexer and matcher to crash at a code point where a connection to the DB is expected to be avail (see below for example).This was impacting ROX-27690 (enabling Scanner V4 in CI) - jobs were failing due to 'unexpected pod restarts'.
Example
User-facing documentation
Testing and quality
Automated testing
No automated tests were added, Scanner V4 is not running in CI. In the future when Scanner V4 is enabled in CI the pod crashing will be caught by existing pod restart checks.
How I validated my change
Manually (because Scanner V4 is not yet running in CI)
Scaled DB pod to zero, and then restarted indexer + matcher pods, observed in logs retry attempts: