DB load balancing: Use string instead of IPAddr
What does this MR do?
Use string instead of IPAddr
There's a small inconsistency with the logging, arising from https://gitlab.com/gitlab-org/gitlab-ee/issues/13858
-
Staging:
"db_host":{"family":2,"addr":182459753,"mask_addr":4294967295},"db_port":6432
-
Production:
"db_host":"10.220.16.105","db_port":null
It appears that this is because we now dealing with IPAddr
objects vs previously we had strings. The fix is to add to_s
in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15691/diffs#397f1a3280081aad2c8927a8adb81428e5ab6d3b_171_177 (like we had for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15691/diffs#397f1a3280081aad2c8927a8adb81428e5ab6d3b_170_170)
https://gitlab.com/gitlab-org/gitlab-ce/issues/66074#note_203827468 shows that we support IP address strings fine.
Thanks @tigerwnz for investigating this!
IPAddr.new("1.1.1.1").to_json
=> "{\"family\":2,\"addr\":16843009,\"mask_addr\":4294967295}"
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
-
Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team