Bug 1357947 - [dhclient] option -R is broken
Summary: [dhclient] option -R is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-19 16:11 UTC by Harald Reindl
Modified: 2016-08-04 20:52 UTC (History)
2 users (show)

Fixed In Version: dhcp-4.3.4-3.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-04 20:52:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Harald Reindl 2016-07-19 16:11:26 UTC
how is "dhclient" in F24 is supposed to work without touching /etc/resilv.conf which is a *absolute no-go* in case of having dns-server on the same host which points to hosts behind vpn-tunnels including the default forwarding-resolvers

well, i can now create a "resolv.conf.my" and add another ExecStartPost to copy that over the generated one but this is a terrible solution and the manpage states cleary that all is fine

frankly i have enough of all this idiotic defaults touching resolv.conf and fear in case of "chattr +i" it the command fails also
_____________________________________________

[root@srv-rhsoft:~]$ /usr/sbin/dhclient -4 -H srv-rhsoft -q -R subnet-mask,broadcast-address,routers,interface-mtu br-wan
Internet Systems Consortium DHCP Client 4.3.4
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Command not used for DHCPv4: -R
Usage: dhclient [-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>] [-D LL|LLT]
                [-s server-addr] [-cf config-file]
                [-df duid-file] [-lf lease-file]
                [-pf pid-file] [--no-pid] [-e VAR=val]
                [-sf script-file] [interface]*
                [-C <dhcp-client-identifier>] [-B]
                [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]
                [-V <vendor-class-identifier>]
                [-R <request option list>]
_____________________________________________

/usr/sbin/dhclient -4 -H srv-rhsoft

[root@srv-rhsoft:~]$ cat /etc/resolv.conf 
options timeout:3 attempts:3 rotate
; generated by /usr/sbin/dhclient-script
search upc.at rhsoft.net
nameserver 195.34.133.21
nameserver 212.186.211.21
_____________________________________________

expected result is don't change this in any way:
[root@srv-rhsoft:~]$ cat /etc/resolv.conf
domain rhsoft.net
search rhsoft.net thelounge.net vmware.local test.rh

nameserver 127.0.0.1

options timeout:3 attempts:3 rotate
_____________________________________________

[root@srv-rhsoft:~]$ systemctl status network-wan-bridge.service
● network-wan-bridge.service - Network Internet Bridge
   Loaded: loaded (/etc/systemd/system/network-wan-bridge.service; enabled; vendor preset: disabled)
   Active: inactive (dead) (Result: exit-code) since Di 2016-07-19 17:54:44 CEST; 14min ago
  Process: 4665 ExecStopPost=/usr/sbin/brctl delbr br-wan (code=exited, status=0/SUCCESS)
  Process: 4662 ExecStopPost=/usr/sbin/ifconfig br-wan down (code=exited, status=0/SUCCESS)
  Process: 15376 ExecStart=/usr/sbin/dhclient -4 -H srv-rhsoft -q -R subnet-mask,broadcast-address,routers,interface-mtu br-wan (code=exited, status=1/FAILURE)
  Process: 15372 ExecStartPre=/usr/sbin/ifconfig br-wan hw ether 00:50:8D:B5:CC:DE up (code=exited, status=0/SUCCESS)
  Process: 15369 ExecStartPre=/usr/sbin/brctl addif br-wan vmnet1 (code=exited, status=1/FAILURE)
  Process: 15366 ExecStartPre=/usr/sbin/brctl addif br-wan wan (code=exited, status=1/FAILURE)
  Process: 15363 ExecStartPre=/usr/sbin/brctl setfd br-wan 5 (code=exited, status=0/SUCCESS)
  Process: 15360 ExecStartPre=/usr/sbin/brctl setageing br-wan 600 (code=exited, status=0/SUCCESS)
  Process: 15357 ExecStartPre=/usr/sbin/brctl stp br-wan off (code=exited, status=0/SUCCESS)
  Process: 15355 ExecStartPre=/usr/sbin/brctl addbr br-wan (code=exited, status=1/FAILURE)

Jul 19 17:54:43 srv-rhsoft.rhsoft.net systemd[1]: Failed to start Network Internet Bridge.
Jul 19 17:54:43 srv-rhsoft.rhsoft.net systemd[1]: network-wan-bridge.service: Unit entered failed state.
Jul 19 17:54:43 srv-rhsoft.rhsoft.net systemd[1]: network-wan-bridge.service: Failed with result 'exit-code'.
Jul 19 17:54:44 srv-rhsoft.rhsoft.net systemd[1]: network-wan-bridge.service: Service hold-off time over, scheduling restart.
Jul 19 17:54:44 srv-rhsoft.rhsoft.net systemd[1]: Stopped Network Internet Bridge.
Jul 19 17:54:44 srv-rhsoft.rhsoft.net systemd[1]: network-wan-bridge.service: Start request repeated too quickly.
Jul 19 17:54:44 srv-rhsoft.rhsoft.net systemd[1]: Failed to start Network Internet Bridge.

Comment 1 Harald Reindl 2016-07-19 16:14:53 UTC
ok, at least "chattr +i /etc/resolv.conf" don't end in a error but still a terrible regression (which in my case had the result driving to the machine after upgrade which lost it's internet and vpn-connectivity)

[root@srv-rhsoft:~]$ systemctl status network-wan-bridge.service
● network-wan-bridge.service - Network Internet Bridge
   Loaded: loaded (/etc/systemd/system/network-wan-bridge.service; enabled; vendor preset: disabled)
   Active: active (running) since Di 2016-07-19 18:12:53 CEST; 6s ago
  Process: 13950 ExecStopPost=/usr/sbin/brctl delbr br-wan (code=exited, status=0/SUCCESS)
  Process: 13948 ExecStopPost=/usr/sbin/ifconfig br-wan down (code=exited, status=0/SUCCESS)
  Process: 14162 ExecStartPost=/usr/sbin/ifconfig vmnet1 0.0.0.0 -multicast -allmulti up (code=exited, status=0/SUCCESS)
  Process: 14096 ExecStartPost=/usr/sbin/ifconfig br-wan -multicast -allmulti (code=exited, status=0/SUCCESS)
  Process: 14002 ExecStart=/usr/sbin/dhclient -4 -H srv-rhsoft -q br-wan (code=exited, status=0/SUCCESS)
  Process: 13978 ExecStartPre=/usr/sbin/ifconfig br-wan hw ether 00:50:8D:B5:CC:DE up (code=exited, status=0/SUCCESS)
  Process: 13975 ExecStartPre=/usr/sbin/brctl addif br-wan vmnet1 (code=exited, status=0/SUCCESS)
  Process: 13973 ExecStartPre=/usr/sbin/brctl addif br-wan wan (code=exited, status=0/SUCCESS)
  Process: 13969 ExecStartPre=/usr/sbin/brctl setfd br-wan 5 (code=exited, status=0/SUCCESS)
  Process: 13966 ExecStartPre=/usr/sbin/brctl setageing br-wan 600 (code=exited, status=0/SUCCESS)
  Process: 13964 ExecStartPre=/usr/sbin/brctl stp br-wan off (code=exited, status=0/SUCCESS)
  Process: 13957 ExecStartPre=/usr/sbin/brctl addbr br-wan (code=exited, status=0/SUCCESS)
 Main PID: 14095 (dhclient)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/network-wan-bridge.service
           └─14095 /usr/sbin/dhclient -4 -H srv-rhsoft -q br-wan

Comment 2 Jiri Popelka 2016-08-03 11:08:43 UTC
Sorry for the delay Harald, I was on holiday.
I see what's going on - we've always had this patch [1] for adding several options to dhclient and '-R' being on of them.
But in latest dhcp-4.3.4 upstream also added [2] a dhcpv6-only '-R' option to dhclient.
This already happened once, when upstream added '-I' and I had to rename our '-I' to '-C'.

The question is what letter/name to use instead of '-R'.
I'd probably go with something like long '--request-options' rather then choosing a short one letter option to avoid renaming again later.
What do you think ?

[1] http://pkgs.fedoraproject.org/cgit/rpms/dhcp.git/tree/dhcp-dhclient-options.patch
[2] https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=c88dfebddd766d40dc29b50ede355ec3ecf2a463

Comment 3 Harald Reindl 2016-08-03 11:11:46 UTC
i don't care much how i tell dhclient to leave my resolvers in peace and just get IP, gateway and in doubt MTU form the ISP - but such breakage leaves remote systems which in fact are the router/firewall itself offline and require you in doubt to drive some hundret kilometers

Comment 4 Fedora Update System 2016-08-03 12:04:42 UTC
dhcp-4.3.4-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5789f83769

Comment 5 Harald Reindl 2016-08-03 14:59:18 UTC
don't look like it works as expected :-(

- [dhclient] rename -R option to --request-options (#1357947)

[root@srv-rhsoft:~]$ /usr/sbin/dhclient -4 -H srv-rhsoft -q --request-options=subnet-mask,broadcast-address,routers,interface-mtu br-wan
Internet Systems Consortium DHCP Client 4.3.4
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Unknown command: --request-options=subnet-mask,broadcast-address,routers,interface-mtu
Usage: dhclient [-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>] [-D LL|LLT]
                [-s server-addr] [-cf config-file]
                [-df duid-file] [-lf lease-file]
                [-pf pid-file] [--no-pid] [-e VAR=val]
                [-sf script-file] [interface]*
                [-C <dhcp-client-identifier>] [-B]
                [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]
                [-V <vendor-class-identifier>]
                [--request-options <request option list>]

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
    http://bugzilla.redhat.com

exiting.
[root@srv-rhsoft:~]$ rpm -qa | grep dhcp
dhcp-libs-4.3.4-3.fc24.x86_64
dhcp-client-4.3.4-3.fc24.x86_64
dhcp-common-4.3.4-3.fc24.noarch
dhcp-server-4.3.4-3.fc24.x86_64

Comment 6 Harald Reindl 2016-08-03 15:03:05 UTC
ok, it works without the = but are normally long-params not supposed to work with "--param=value" and short-params like "-p value"?


[root@srv-rhsoft:~]$ systemctl status network-wan-bridge.service
? network-wan-bridge.service - Network Internet Bridge
   Loaded: loaded (/etc/systemd/system/network-wan-bridge.service; enabled; vendor preset: disabled)
   Active: active (running) since Mi 2016-08-03 17:01:25 CEST; 33s ago
  Process: 7050 ExecStopPost=/usr/sbin/brctl delbr br-wan (code=exited, status=0/SUCCESS)
  Process: 7048 ExecStopPost=/usr/sbin/ifconfig br-wan down (code=exited, status=0/SUCCESS)
  Process: 8027 ExecStartPost=/usr/sbin/ifconfig vmnet1 0.0.0.0 -multicast -allmulti up (code=exited, status=0/SUCCESS)
  Process: 8025 ExecStartPost=/usr/sbin/ifconfig br-wan -multicast -allmulti (code=exited, status=0/SUCCESS)
  Process: 7084 ExecStart=/usr/sbin/dhclient -4 -H srv-rhsoft -q --request-options subnet-mask,broadcast-address,routers,interface-mtu br-wan (code=exited, status=0/SUCCESS)
  Process: 7080 ExecStartPre=/usr/sbin/ifconfig br-wan hw ether 00:50:8D:B5:CC:DE up (code=exited, status=0/SUCCESS)
  Process: 7077 ExecStartPre=/usr/sbin/brctl addif br-wan vmnet1 (code=exited, status=0/SUCCESS)
  Process: 7074 ExecStartPre=/usr/sbin/brctl addif br-wan wan (code=exited, status=0/SUCCESS)
  Process: 7071 ExecStartPre=/usr/sbin/brctl setfd br-wan 5 (code=exited, status=0/SUCCESS)
  Process: 7068 ExecStartPre=/usr/sbin/brctl setageing br-wan 600 (code=exited, status=0/SUCCESS)
  Process: 7064 ExecStartPre=/usr/sbin/brctl stp br-wan off (code=exited, status=0/SUCCESS)
  Process: 7060 ExecStartPre=/usr/sbin/brctl addbr br-wan (code=exited, status=0/SUCCESS)
 Main PID: 8024 (dhclient)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/network-wan-bridge.service
           ??8024 /usr/sbin/dhclient -4 -H srv-rhsoft -q --request-options subnet-mask,broadcast-address,routers,interface-mtu br-wan

Aug 03 17:01:21 srv-rhsoft.rhsoft.net systemd[1]: Starting Network Internet Bridge...
Aug 03 17:01:22 srv-rhsoft.rhsoft.net dhclient[7084]: DHCPREQUEST on br-wan to 255.255.255.255 port 67 (xid=0xae4a4503)
Aug 03 17:01:22 srv-rhsoft.rhsoft.net dhclient[7084]: DHCPNAK from 10.34.112.57 (xid=0xae4a4503)
Aug 03 17:01:22 srv-rhsoft.rhsoft.net dhclient[7084]: DHCPDISCOVER on br-wan to 255.255.255.255 port 67 interval 5 (xid=0xc175b301)
Aug 03 17:01:22 srv-rhsoft.rhsoft.net dhclient[7084]: DHCPREQUEST on br-wan to 255.255.255.255 port 67 (xid=0xc175b301)
Aug 03 17:01:22 srv-rhsoft.rhsoft.net dhclient[7084]: DHCPOFFER from 10.34.112.57
Aug 03 17:01:22 srv-rhsoft.rhsoft.net dhclient[7084]: DHCPACK from 10.34.112.57 (xid=0xc175b301)
Aug 03 17:01:25 srv-rhsoft.rhsoft.net dhclient[7084]: bound to 62.178.103.85 -- renewal in 78866 seconds.
Aug 03 17:01:25 srv-rhsoft.rhsoft.net systemd[1]: Started Network Internet Bridge.

Comment 7 Fedora Update System 2016-08-04 01:54:46 UTC
dhcp-4.3.4-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5789f83769

Comment 8 Fedora Update System 2016-08-04 20:52:52 UTC
dhcp-4.3.4-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.