[Bug 974454] Re: resolv.conf loses search directive with domain during pxe boot

Bug Watch Updater 974454 at bugs.launchpad.net
Thu Oct 10 05:26:48 UTC 2019


** Changed in: netcfg (Debian)
       Status: Unknown => New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netcfg in Ubuntu.
https://bugs.launchpad.net/bugs/974454

Title:
  resolv.conf loses search directive with domain during pxe boot

Status in netcfg package in Ubuntu:
  Confirmed
Status in netcfg source package in Bionic:
  Confirmed
Status in netcfg package in Debian:
  New

Bug description:
  [Impact]

   * netcfg currently ends up overwriting DNS search domains provided by
  correctly configured DHCP servers in the installer environment.

   * Any preseed command that relies on hostname resolution via a search
  domain fail at runtime.

   * The change in this bug allows netcfg to detect that the DHCP-server
  provided a domain.

  [Test Case]

   * TBP

  [Regression Potential]

   * TBP

  [Other Info]
   
   * Anything else you think is useful to include
   * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
   * and address these questions in advance

  [Original Report]

  When performing a pxe boot using the netboot image from the precise-
  server-amd64 iso, resolv.conf is modified and the search directive
  containing the domain provided by dhcp is removed. I can see that the
  entry is picked up during the boot of the image initially. The file is
  then overwritten removing the search directive. This seems to
  correspond with a reverse dns lookup being used to obtain a hostname
  as shown in the log section provided. Running dhclient after this
  restores the entry in resolv.conf.

  In monitorng resolv.conf, I found that /etc/resolv.conf is populated
  with the following information initially during the pxe boot, which is
  the result that is needed:

  search provision.example.com
  nameserver 10.1.0.2

  ---------------------------

  It is then modified to the following:

  nameserver 10.1.0.2

  ------------------------
  Apr  5 14:03:33 netcfg[2088]: DEBUG: No RA received; attempting IPv4 autoconfig
  Apr  5 14:03:33 netcfg[2088]: WARNING **: Started DHCP client; PID is 2147
  Apr  5 14:03:34 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1
  Apr  5 14:03:34 dhclient: DHCPREQUEST of 10.1.0.112 on eth0 to 255.255.255.255 port 67
  Apr  5 14:03:34 dhclient: DHCPOFFER of 10.1.0.112 from 10.1.0.2
  Apr  5 14:03:34 dhclient: DHCPACK of 10.1.0.112 from 10.1.0.2
  Apr  5 14:03:34 dhclient: bound to 10.1.0.112 -- renewal in 7192 seconds.
  Apr  5 14:03:36 kernel: [   21.621493] eth0: no IPv6 routers present
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Reading domain name returned via DHCP
  Apr  5 14:03:36 netcfg[2088]: DEBUG: DHCP domain name is '**************'
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Reading NTP servers from DHCP info
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Read NTP server 10.1.0.2
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Reading nameservers from /etc/resolv.conf
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Read nameserver 10.1.0.2
  Apr  5 14:03:36 netcfg[2088]: DEBUG: State is now 1
  Apr  5 14:03:36 netcfg[2088]: DEBUG: State is now 2
  Apr  5 14:03:36 netcfg[2088]: DEBUG: State is now 5
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Using DNS to try and obtain default hostname
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Getting default hostname from rDNS lookup of autoconfigured address 10.1.0.112
  Apr  5 14:03:36 netcfg[2088]: DEBUG: getnameinfo() returned -3: errno 0 (Success)
  Apr  5 14:03:36 netcfg[2088]: DEBUG: Getting default hostname from rDNS lookup of autoconfigured address fe80::250:56ff:feb8:5e
  Apr  5 14:03:36 netcfg[2088]: DEBUG: getnameinfo() returned -2: errno 0 (Success)

  -------------------

  pxelinux.cfg entry:

  LABEL default
    MENU DEFAULT
    MENU LABEL Ubuntu 12.04 (64-bit) Installer
    IPAPPEND 2
    KERNEL ubuntu/12.04/amd64/linux
    APPEND interface=auto lang=en_US locale=en_US console-setup/layoutcode=us priority=critical debian-installer/allow_unauthenticated=true initrd=ubuntu/12.04/amd64/initrd.gz url=http://kickstart/cgi-bin/example.cgi ramdisk_size=10882 root=/dev/ram0 devfs=mount,dall rw --

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/974454/+subscriptions



More information about the foundations-bugs mailing list