Merge "Allow to config dhcp lease time"

This commit is contained in:
Jenkins 2015-11-30 15:15:39 +00:00 committed by Gerrit Code Review
commit aa1ffdd2a6
3 changed files with 14 additions and 9 deletions

View File

@ -60,6 +60,10 @@ If you chose to utilize the dhcp server, You may wish to set default ranges:
dhcp_pool_start: 192.168.1.200 dhcp_pool_start: 192.168.1.200
dhcp_pool_end: 192.168.1.250 dhcp_pool_end: 192.168.1.250
And also set the default dhcp address lease time:
dhcp_lease_time: 12h
Alternatively, a user can choose to perform static DHCP assignments to nodes. Alternatively, a user can choose to perform static DHCP assignments to nodes.
This can be enabled by setting the ``inventory_dhcp`` setting to ``true``. This can be enabled by setting the ``inventory_dhcp`` setting to ``true``.
This will result in the ``dhcp_pool_start`` and ``dhcp_pool_end`` settings This will result in the ``dhcp_pool_start`` and ``dhcp_pool_end`` settings

View File

@ -55,6 +55,7 @@ enabled_drivers: "agent_ipmitool,pxe_amt,agent_ilo,agent_ucs"
# since IP allocation will be static. # since IP allocation will be static.
dhcp_pool_start: 192.168.1.200 dhcp_pool_start: 192.168.1.200
dhcp_pool_end: 192.168.1.250 dhcp_pool_end: 192.168.1.250
dhcp_lease_time: 12h
# Dnsmasq default route for clients. If not defined, dnsmasq will push to clients # Dnsmasq default route for clients. If not defined, dnsmasq will push to clients
# as default route the same IP of the dnsmasq server. # as default route the same IP of the dnsmasq server.
# Default: undefined # Default: undefined

View File

@ -158,7 +158,7 @@ dhcp-hostsfile=/etc/dnsmasq.d/bifrost.dhcp-hosts.d
{% if testing %} {% if testing %}
dhcp-range=192.168.122.2,192.168.122.254,12h dhcp-range=192.168.122.2,192.168.122.254,12h
{% else %} {% else %}
dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},{{dhcp_lease_time}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -189,11 +189,11 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h
#dhcp-range=1234::2, 1234::500, 64, 12h #dhcp-range=1234::2, 1234::500, 64, 12h
# Do Router Advertisements, BUT NOT DHCP for this subnet. # Do Router Advertisements, BUT NOT DHCP for this subnet.
#dhcp-range=1234::, ra-only #dhcp-range=1234::, ra-only
# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and # Do Router Advertisements, BUT NOT DHCP for this subnet, also try and
# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack # add names to the DNS for the IPv6 address of SLAAC-configured dual-stack
# hosts. Use the DHCPv4 lease to derive the name, network segment and # hosts. Use the DHCPv4 lease to derive the name, network segment and
# MAC address and assume that the host will also have an # MAC address and assume that the host will also have an
# IPv6 address calculated using the SLAAC alogrithm. # IPv6 address calculated using the SLAAC alogrithm.
#dhcp-range=1234::, ra-names #dhcp-range=1234::, ra-names
@ -216,9 +216,9 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h
#dhcp-range=1234::, ra-stateless, ra-names #dhcp-range=1234::, ra-stateless, ra-names
# Do router advertisements for all subnets where we're doing DHCPv6 # Do router advertisements for all subnets where we're doing DHCPv6
# Unless overriden by ra-stateless, ra-names, et al, the router # Unless overriden by ra-stateless, ra-names, et al, the router
# advertisements will have the M and O bits set, so that the clients # advertisements will have the M and O bits set, so that the clients
# get addresses and configuration from DHCPv6, and the A bit reset, so the # get addresses and configuration from DHCPv6, and the A bit reset, so the
# clients don't use SLAAC addresses. # clients don't use SLAAC addresses.
#enable-ra #enable-ra
@ -284,11 +284,11 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h
# any machine with Ethernet address starting 11:22:33: # any machine with Ethernet address starting 11:22:33:
#dhcp-host=11:22:33:*:*:*,set:red #dhcp-host=11:22:33:*:*:*,set:red
# Give a fixed IPv6 address and name to client with # Give a fixed IPv6 address and name to client with
# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 # DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2
# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. # Note the MAC addresses CANNOT be used to identify DHCPv6 clients.
# Note also the they [] around the IPv6 address are obilgatory. # Note also the they [] around the IPv6 address are obilgatory.
#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] #dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5]
# Ignore any clients which are not specified in dhcp-host lines # Ignore any clients which are not specified in dhcp-host lines
# or /etc/ethers. Equivalent to ISC "deny unknown-clients". # or /etc/ethers. Equivalent to ISC "deny unknown-clients".
@ -346,7 +346,7 @@ dhcp-option=3,{{dnsmasq_router}}
# Send DHCPv6 option. Note [] around IPv6 addresses. # Send DHCPv6 option. Note [] around IPv6 addresses.
#dhcp-option=option6:dns-server,[1234::77],[1234::88] #dhcp-option=option6:dns-server,[1234::77],[1234::88]
# Send DHCPv6 option for namservers as the machine running # Send DHCPv6 option for namservers as the machine running
# dnsmasq and another. # dnsmasq and another.
#dhcp-option=option6:dns-server,[::],[1234::88] #dhcp-option=option6:dns-server,[::],[1234::88]