private Set<String> lookupName(String name, RecordType type) throws NamingException {
        DirContext ctx = new InitialDirContext();
        Attributes attributes = ctx.getAttributes("dns:/" + name, new String[]{type.value()});
        Attribute attribute = attributes.get(type.value());
        if (attribute == null) {
            return Set.of();
        }
        Set<String> results = new HashSet<>();
        attribute.getAll().asIterator().forEachRemaining(value -> results.add(Objects.toString(value)));
        return results;
    }
Implementation of a name resolver that always uses a DNS server to resolve the given name. The intention is to avoid
possibly incorrect/incomplete records in /etc/hosts.

@author mpolden
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/DnsNameResolver.java