discoverInterfaceName should resolve hostnames before trying to find network interface stats using IP addresses

Description

The code to find a matching network interface to pull stats for assumes the configured interaface is an IP address, but it's just as valid (if not more) to specify a hostname instead.

When the interface is a hostname, discoverInterfaceName() fails to find a matching address from the list of system network interfaces, because it's still trying to match against a hostname instead of an address.

It would be handy if Sync Gateway performed a lookup to fetch IP addresses for a hostname if an IP address was not specified in the first place, before falling through to the existing code. This ensures machines that are able to resolve an address can accurately map it back to a given network interface.

 

Activity

Show:

CB robot October 4, 2021 at 12:15 PM

Build sync_gateway-2.8.3-4 contains sync_gateway commit 10ef540 with commit message:
[2.8.3] : Backport : Show network interface stats when configured API listen adresses use hostnames instead of IPs (#5001) (#5268)

CB robot May 19, 2021 at 4:32 PM

Build sync_gateway-3.0.0-198 contains sync_gateway commit 58dd304 with commit message:
- Show network interface stats when configured API listen adresses use hostnames instead of IPs (#5001)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created April 30, 2021 at 3:20 PM
Updated August 31, 2024 at 10:57 AM
Resolved May 19, 2021 at 4:45 PM
Instabug