You have been subscribed to a public bug by Dan Streetman (ddstreet):

[Impact]

* open-iscsi is adding "domainsearch", a non-existent configuration
option, instead of "search" in /etc/resolv.conf. As a result, the search
list is ignored in the clients.

[Test case]

* Install an ubuntu machine that uses iscsi as root.
* Prepare the dhcp server to provide the search list to its clients. For 
instance, in dnsmasq:

dhcp-option=option:domain-search,canonical.com

* Boot the machine and check the content of /etc/resolv.conf
- if domainsearch is present, the search list will be ignored:

root@iscsi-xenial:/home/ubuntu# ping -c1 golem
ping: unknown host golem

root@iscsi-xenial:/home/ubuntu# strace ping -c1 golem 2>&1 | grep golem
execve("/bin/ping", ["ping", "-c1", "golem"], [/* 19 vars */]) = 0
sendto(4, "_(\1\0\0\1\0\0\0\0\0\0\5golem\0\0\1\0\1", 23, MSG_NOSIGNAL, NULL, 0) 
= 23
recvfrom(4, "_(\201\203\0\1\0\0\0\0\0\0\5golem\0\0\1\0\1", 1024, 0, 
{sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.122.1")}, 
[16]) = 23
write(2, "ping: unknown host golem\n", 25ping: unknown host golem

- if search is present, the search list will be used:

root@iscsi-xenial:/home/ubuntu# ping -c1 golem
PING golem.canonical.com (91.189.89.199) 56(84) bytes of data.
64 bytes from golem.canonical.com (91.189.89.199): icmp_seq=1 ttl=57 time=63.7 
ms

--- golem.canonical.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 63.735/63.735/63.735/0.000 ms

root@iscsi-xenial:/home/ubuntu# strace ping -c1 golem 2>&1 | grep golem
execve("/bin/ping", ["ping", "-c1", "golem"], [/* 19 vars */]) = 0
sendto(4, "\1\\\1\0\0\1\0\0\0\0\0\0\5golem\tcanonical\3com"..., 37, 
MSG_NOSIGNAL, NULL, 0) = 37
recvfrom(4, "\1\\\201\200\0\1\0\1\0\0\0\0\5golem\tcanonical\3com"..., 1024, 0, 
{sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.122.1")}, 
[16]) = 53
write(1, "PING golem.canonical.com (91.189"..., 145PING golem.canonical.com 
(91.189.89.199) 56(84) bytes of data.
64 bytes from golem.canonical.com (91.189.89.199): icmp_seq=1 ttl=57 time=63.5 
ms
write(1, "--- golem.canonical.com ping sta"..., 157--- golem.canonical.com ping 
statistics ---

[Regression potential]

* None. The change is minor (a string replacement) and it's currently
not working.

[Other info]

* resolv.conf man page: http://man7.org/linux/man-
pages/man5/resolv.conf.5.html

[Original description]

Having an interface file such as /run/net-eno2.conf with the following
content:

DEVICE='eno2'
PROTO='dhcp'
IPV4ADDR='10.10.10.10'
IPV4BROADCAST='10.10.10.255'
IPV4NETMASK='255.255.255.0'
IPV4GATEWAY='10.10.10.1'
IPV4DNS0='169.254.169.254'
IPV4DNS1='0.0.0.0'
HOSTNAME=''
DNSDOMAIN='test.com'
NISDOMAIN=''
ROOTSERVER='169.254.169.254'
ROOTPATH=''
filename='/ipxe.efi'
UPTIME='45'
DHCPLEASETIME='86400'
DOMAINSEARCH='test.com'

net-interface-handler translates it to:

nameserver 169.254.169.254
domainsearch test.com

instead of:

nameserver 169.254.169.254
search test.com

The problem is that domainsearch is not a valid configuration option for
/etc/resolv.conf and is ignored.

** Affects: open-iscsi (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: open-iscsi (Ubuntu Xenial)
     Importance: Undecided
         Status: New

** Affects: open-iscsi (Ubuntu Bionic)
     Importance: Undecided
         Status: New

** Affects: open-iscsi (Ubuntu Cosmic)
     Importance: Undecided
         Status: New


** Tags: patch sts sts-sponsor sts-sru-needed
-- 
open-iscsi uses domainsearch instead of search for /etc/resolv.conf
https://bugs.launchpad.net/bugs/1791108
You received this bug notification because you are a member of STS Sponsors, 
which is subscribed to the bug report.

-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to     : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp

Reply via email to