WAN Config profile should use system defaults for DNS configuration
Description
Environment
None
Gerrit Reviews
None
Release Notes Description
None
relates
Activity
Show:
Jared Casey July 21, 2023 at 11:08 PM
Updated WAN config profile to use system defaults for DNS configure if not specified.
Jared Casey June 9, 2023 at 5:59 PMEdited
Adding https://couchbasecloud.atlassian.net/browse/CXXCBC-333#icft=CXXCBC-333 changes gives us more insight in the logging which nameserver has been chosen. See before and after changes to show that w/ the WAN config profile we now default to the system config nameserver and port.
Before:
CBPPLOGLEVEL=trace node test.js
[2023-06-09 13:07:27.094] [13098,2831343] [debug] 18ms, Selected nameserver: "10.100.189.12" from "/etc/resolv.conf"
[2023-06-09 13:07:27.096] [13098,2831343] [debug] 1ms, open cluster, id: "23564f-4200-2944-e7a1-fdcce73afd795b", core version: "1.0.0-dp.6+4.f8a429f", {"bootstrap_nodes":[{"hostname":"cb.gxprauxvcewmas.cloud.couchbase.com","port":"11207"}],"options":{"analytics_timeout":"75000ms","bootstrap_timeout":"120000ms","config_idle_redial_timeout":"300000ms","config_poll_floor":"50ms","config_poll_interval":"2500ms","connect_timeout":"20000ms","disable_mozilla_ca_certificates":false,"dns_config":{"nameserver":"8.8.8.8","port":53,"timeout":"20000ms"},"dump_configuration":false,"enable_clustermap_notification":false,"enable_compression":true,"enable_dns_srv":true,"enable_metrics":true,"enable_mutation_tokens":true,"enable_tcp_keep_alive":true,"enable_tls":true,"enable_tracing":true,"enable_unordered_execution":true,"idle_http_connection_timeout":"4500ms","key_value_durable_timeout":"10000ms","key_value_timeout":"2500ms","management_timeout":"75000ms","max_http_connections":0,"metrics_options":{"emit_interval":"600000ms"},"network":"auto","query_timeout":"75000ms","resolve_timeout":"20000ms","search_timeout":"75000ms","show_queries":false,"tcp_keep_alive_interval":"60000ms","tls_verify":"peer","tracing_options":{"analytics_threshold":"1000ms","key_value_threshold":"500ms","management_threshold":"1000ms","orphaned_emit_interval":"10000ms","orphaned_sample_size":64,"query_threshold":"1000ms","search_threshold":"1000ms","threshold_emit_interval":"10000ms","threshold_sample_size":64,"view_threshold":"1000ms"},"transactions_options":{"cleanup_config":{"cleanup_client_attempts":false,"cleanup_lost_attempts":false,"cleanup_window":"0ms","collections":[]},"durability_level":"none","expiration_time":"0ns","query_config":{"scan_consistency":"not_bounded"}},"trust_certificate":"","use_ip_protocol":"any","user_agent_extra":"couchnode/4.2.5-dev (node/16.17.0; v8/9.4.146.26-node.22; ssl/1.1.1q+quic)","view_timeout":"75000ms"}}
[2023-06-09 13:07:27.096] [13098,2831352] [debug] 0ms, Query DNS-SRV: address="cb.gxprauxvcewmas.cloud.couchbase.com", service="_couchbases", nameserver="8.8.8.8:53"
[2023-06-09 13:07:27.097] [13098,2831352] [trace] 0ms, Query DNS-SRV (UDP) address="8.8.8.8:53", udp_timeout=10000ms, total_timeout=20000ms
0000: 00 00 01 00 00 01 00 00 00 00 00 00 0b 5f 63 6f 75 63 68 62 61 73 65 73 04 5f 74 63 70 02 63 62 ............._couchbases._tcp.cb
0020: 0e 67 78 70 72 61 75 78 76 63 65 77 6d 61 73 05 63 6c 6f 75 64 09 63 6f 75 63 68 62 61 73 65 03 .gxprauxvcewmas.cloud.couchbase.
0040: 63 6f 6d 00 00 21 00 01 com..!..
[2023-06-09 13:07:27.161] [13098,2831352] [debug] 63ms, DNS UDP returned 3 records
[2023-06-09 13:07:27.161] [13098,2831352] [info] 0ms, replace list of bootstrap nodes with addresses from DNS SRV of "cb.gxprauxvcewmas.cloud.couchbase.com": ["svc-dqis-node-001.gxprauxvcewmas.cloud.couchbase.com:11207", "svc-dqis-node-002.gxprauxvcewmas.cloud.couchbase.com:11207", "svc-dqis-node-003.gxprauxvcewmas.cloud.couchbase.com:11207"]
After:
CBPPLOGLEVEL=trace node test.js
[2023-06-09 13:11:14.720] [13556,2833928] [debug] 18ms, Selected nameserver: "10.100.189.12" from "/etc/resolv.conf"
[2023-06-09 13:11:14.722] [13556,2833928] [debug] 1ms, open cluster, id: "0e865f-2c8c-fe40-6825-c6836f0060a246", core version: "1.0.0-dp.6+4.f8a429f", {"bootstrap_nodes":[{"hostname":"cb.gxprauxvcewmas.cloud.couchbase.com","port":"11207"}],"options":{"analytics_timeout":"75000ms","bootstrap_timeout":"120000ms","config_idle_redial_timeout":"300000ms","config_poll_floor":"50ms","config_poll_interval":"2500ms","connect_timeout":"20000ms","disable_mozilla_ca_certificates":false,"dns_config":{"nameserver":"10.100.189.12","port":53,"timeout":"20000ms"},"dump_configuration":false,"enable_clustermap_notification":false,"enable_compression":true,"enable_dns_srv":true,"enable_metrics":true,"enable_mutation_tokens":true,"enable_tcp_keep_alive":true,"enable_tls":true,"enable_tracing":true,"enable_unordered_execution":true,"idle_http_connection_timeout":"4500ms","key_value_durable_timeout":"10000ms","key_value_timeout":"2500ms","management_timeout":"75000ms","max_http_connections":0,"metrics_options":{"emit_interval":"600000ms"},"network":"auto","query_timeout":"75000ms","resolve_timeout":"20000ms","search_timeout":"75000ms","show_queries":false,"tcp_keep_alive_interval":"60000ms","tls_verify":"peer","tracing_options":{"analytics_threshold":"1000ms","key_value_threshold":"500ms","management_threshold":"1000ms","orphaned_emit_interval":"10000ms","orphaned_sample_size":64,"query_threshold":"1000ms","search_threshold":"1000ms","threshold_emit_interval":"10000ms","threshold_sample_size":64,"view_threshold":"1000ms"},"transactions_options":{"cleanup_config":{"cleanup_client_attempts":false,"cleanup_lost_attempts":false,"cleanup_window":"0ms","collections":[]},"durability_level":"none","expiration_time":"0ns","query_config":{"scan_consistency":"not_bounded"}},"trust_certificate":"","use_ip_protocol":"any","user_agent_extra":"couchnode/4.2.5-dev (node/16.17.0; v8/9.4.146.26-node.22; ssl/1.1.1q+quic)","view_timeout":"75000ms"}}
[2023-06-09 13:11:14.722] [13556,2833937] [debug] 0ms, Query DNS-SRV: address="cb.gxprauxvcewmas.cloud.couchbase.com", service="_couchbases", nameserver="10.100.189.12:53"
[2023-06-09 13:11:14.722] [13556,2833937] [trace] 0ms, Query DNS-SRV (UDP) address="10.100.189.12:53", udp_timeout=10000ms, total_timeout=20000ms
0000: 00 00 01 00 00 01 00 00 00 00 00 00 0b 5f 63 6f 75 63 68 62 61 73 65 73 04 5f 74 63 70 02 63 62 ............._couchbases._tcp.cb
0020: 0e 67 78 70 72 61 75 78 76 63 65 77 6d 61 73 05 63 6c 6f 75 64 09 63 6f 75 63 68 62 61 73 65 03 .gxprauxvcewmas.cloud.couchbase.
0040: 63 6f 6d 00 00 21 00 01 com..!..
[2023-06-09 13:11:14.793] [13556,2833937] [debug] 70ms, DNS UDP returned 3 records
[2023-06-09 13:11:14.793] [13556,2833937] [info] 0ms, replace list of bootstrap nodes with addresses from DNS SRV of "cb.gxprauxvcewmas.cloud.couchbase.com": ["svc-dqis-node-001.gxprauxvcewmas.cloud.couchbase.com:11207", "svc-dqis-node-002.gxprauxvcewmas.cloud.couchbase.com:11207", "svc-dqis-node-003.gxprauxvcewmas.cloud.couchbase.com:11207"]
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Jared Casey
Jared CaseyReporter
Jared Casey
Jared CaseyStory Points
1
Sprint
None
Fix versions
Priority
Instabug
Open Instabug
PagerDuty
PagerDuty Incident
PagerDuty

PagerDuty Incident
Sentry
Linked Issues
Sentry
Linked Issues
Zendesk Support
Linked Tickets
Zendesk Support

Linked Tickets
Created June 9, 2023 at 5:01 PM
Updated September 5, 2024 at 2:29 PM
Resolved July 21, 2023 at 11:08 PM
Instabug
When using the WAN config profile we want to set the dns_srv_timeout to be 20 seconds and leave the nameserver and port at defaults. However, the defaults we want are the system config defaults and not the "fallback" defaults the C++ client provides. We should update how the Node.js SDK sets the nameserver and port defaults.