]> git.proxmox.com Git - mirror_ifupdown2.git/commit - ifupdown2/ifupdownaddons/dhclient.py
ifupdown2: Modify implementation of nowait option
authorScott Emery <scotte@cumulusnetworks.com>
Thu, 4 Feb 2016 00:38:18 +0000 (16:38 -0800)
committerScott Emery <scotte@cumulusnetworks.com>
Thu, 4 Feb 2016 00:38:18 +0000 (16:38 -0800)
commita0a8d7e094db8eb0224b4b9095cb65adee65b569
tree6c88c1101d9f4353c46e863229280837d6f0fb19
parent28102a01e269aa0b934e6e24873cba4ed8e55dde
ifupdown2: Modify implementation of nowait option

Ticket: None
Reviewed By: CCR-4058
Testing Done: ifup'd interface with both dhcp-wait: "no" and dhcp-wait: "yes"
and not specified at all.

A previous patch implemented the nowait option for DHCP. This patch changes the
name of the option to "dhcp-wait" and makes the default, if nothing is specified
in the policy files, to be "yes", which means dhclient will be called without
the "-nw" option, causing it to wait for up to a minute for a response from the
DHCP server before continuing.

The format of the JSON in the policy file for this option was also changed so
that it conforms to the other ifupdown2 policy options. This format is now:

{
    "dhcp": {
        "defaults": { "dhcp-wait": "no" }
    }
}

Also, the documented argument values are "yes" and "no". Any other values, will
be interpreted as "yes".

A subsequent patch in cl-basefiles will be made to include this fragment in
/var/lib/ifupdown2/policy.d/dhcp.json so that Cumulus Linux will default to
not waiting for DHCP to complete.
addons/dhcp.py
ifupdown/policymanager.py
ifupdownaddons/dhclient.py