~ltrager/maas/lp1603563_2.0

« back to all changes in this revision

Viewing changes to src/maasserver/preseed_network.py

  • Committer: MAAS Lander
  • Author(s): LaMont Jones
  • Date: 2016-10-25 21:26:35 UTC
  • mfrom: (5199.1.2 bug-1636251-2.0)
  • Revision ID: maas_lander-20161025212635-pd2te42hw6ycoikv
[r=lamont][bug=1636251][author=lamont] Make sure that the host's domain is listed first in the search list, so that it knows its fqdn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        # Order the network_config where dependencies come first.
48
48
        self._order_config_dependency()
49
49
 
 
50
        search_list = [self.node.domain.name] + [
 
51
            name
 
52
            for name in sorted(get_dns_search_paths())
 
53
            if name != self.node.domain.name]
50
54
        self.network_config.append({
51
55
            "type": "nameserver",
52
56
            "address": self.dns_servers,
53
 
            "search": sorted(get_dns_search_paths()),
 
57
            "search": search_list,
54
58
        })
55
59
 
56
60
        network_config = {