Bind dnsmasq to ip address instead of iface name

Change-Id: I49d1d6b50f43332ddfb9b86bb9b2b22d75e5c3e6
Closes-Bug: #1600030
(cherry picked from commit d806feb629)
This commit is contained in:
slava 2016-07-08 01:07:57 +03:00 committed by Valyavskiy Viacheslav
parent 89946bf309
commit f20d682fa1
7 changed files with 9 additions and 9 deletions

View File

@ -30,7 +30,7 @@
# [dhcp_end_address] Last address of dhcp range # [dhcp_end_address] Last address of dhcp range
# [dhcp_netmask] Netmask of the network # [dhcp_netmask] Netmask of the network
# [dhcp_gateway] Gateway address for installed nodes # [dhcp_gateway] Gateway address for installed nodes
# [dhcp_interface] Interface where to bind dhcp and tftp services # [dhcp_ipaddress] IP address where to bind dhcp and tftp services
# #
# [cobbler_user] Cobbler web interface username # [cobbler_user] Cobbler web interface username
# [cobbler_password] Cobbler web interface password # [cobbler_password] Cobbler web interface password
@ -54,7 +54,7 @@ class cobbler(
$dhcp_end_address = '10.0.0.254', $dhcp_end_address = '10.0.0.254',
$dhcp_netmask = '255.255.255.0', $dhcp_netmask = '255.255.255.0',
$dhcp_gateway = $ipaddress, $dhcp_gateway = $ipaddress,
$dhcp_interface = 'eth0', $dhcp_ipaddress = '127.0.0.1',
$cobbler_user = 'cobbler', $cobbler_user = 'cobbler',
$cobbler_password = 'cobbler', $cobbler_password = 'cobbler',

View File

@ -15,7 +15,7 @@ describe 'cobbler' do
:dhcp_end_address => '10.0.0.254', :dhcp_end_address => '10.0.0.254',
:dhcp_netmask => '255.255.255.0', :dhcp_netmask => '255.255.255.0',
:dhcp_gateway => facts[:ipaddress], :dhcp_gateway => facts[:ipaddress],
:dhcp_interface => 'eth0', :dhcp_ipaddress => facts[:ipaddress],
:cobbler_user => 'cobbler', :cobbler_user => 'cobbler',
:cobbler_password => 'cobbler', :cobbler_password => 'cobbler',
:pxetimeout => 0, :pxetimeout => 0,

View File

@ -17,7 +17,7 @@ server=/<%= @dns_domain %>/
server=/<%= @dns_domain %>/<%= dns %> server=/<%= @dns_domain %>/<%= dns %>
<%- end -%> <%- end -%>
resolv-file=/etc/dnsmasq.upstream resolv-file=/etc/dnsmasq.upstream
interface=<%= @dhcp_interface %> listen-address=<%= @dhcp_ipaddress %>
# On systems which support it, dnsmasq binds the wildcard address, # On systems which support it, dnsmasq binds the wildcard address,
# even when it is listening on only some interfaces. It then discards # even when it is listening on only some interfaces. It then discards

View File

@ -31,7 +31,7 @@ class { '::fuel::cobbler':
dns_upstream => $::fuel_settings['DNS_UPSTREAM'], dns_upstream => $::fuel_settings['DNS_UPSTREAM'],
dns_domain => $::fuel_settings['DNS_DOMAIN'], dns_domain => $::fuel_settings['DNS_DOMAIN'],
dns_search => $::fuel_settings['DNS_SEARCH'], dns_search => $::fuel_settings['DNS_SEARCH'],
dhcp_interface => $::fuel_settings['ADMIN_NETWORK']['interface'], dhcp_ipaddress => $::fuel_settings['ADMIN_NETWORK']['ipaddress'],
nailgun_api_url => $nailgun_api_url, nailgun_api_url => $nailgun_api_url,
bootstrap_ethdevice_timeout => $bootstrap_ethdevice_timeout, bootstrap_ethdevice_timeout => $bootstrap_ethdevice_timeout,
} }

View File

@ -17,7 +17,7 @@ class fuel::cobbler(
$dns_search = $::fuel::params::dns_search, $dns_search = $::fuel::params::dns_search,
$mco_user = $::fuel::params::mco_user, $mco_user = $::fuel::params::mco_user,
$mco_pass = $::fuel::params::mco_password, $mco_pass = $::fuel::params::mco_password,
$dhcp_interface = $::fuel::params::dhcp_interface, $dhcp_ipaddress = $::fuel::params::dhcp_ipaddress,
$nailgun_api_url = "http://${::fuel::params::nailgun_host}:${::fuel::params::nailgun_port}/api", $nailgun_api_url = "http://${::fuel::params::nailgun_host}:${::fuel::params::nailgun_port}/api",
# default password is 'r00tme' # default password is 'r00tme'
$ks_encrypted_root_password = $::fuel::params::ks_encrypted_root_password, $ks_encrypted_root_password = $::fuel::params::ks_encrypted_root_password,
@ -59,7 +59,7 @@ class fuel::cobbler(
# dhcp_end_address => $dhcp_end_address, # dhcp_end_address => $dhcp_end_address,
# dhcp_netmask => $dhcp_netmask, # dhcp_netmask => $dhcp_netmask,
# dhcp_gateway => $dhcp_gateway, # dhcp_gateway => $dhcp_gateway,
dhcp_interface => $dhcp_interface, dhcp_ipaddress => $dhcp_ipaddress,
cobbler_user => $cobbler_user, cobbler_user => $cobbler_user,
cobbler_password => $cobbler_password, cobbler_password => $cobbler_password,
pxetimeout => '50' pxetimeout => '50'

View File

@ -64,7 +64,7 @@ class fuel::params {
$dns_upstream = '8.8.8.8' $dns_upstream = '8.8.8.8'
$dns_domain = 'domain.tld' $dns_domain = 'domain.tld'
$dns_search = 'domain.tld' $dns_search = 'domain.tld'
$dhcp_interface = 'eth0' $dhcp_ipaddress = '127.0.0.1'
$admin_interface = 'eth0' $admin_interface = 'eth0'
$admin_network = '10.20.0.*' $admin_network = '10.20.0.*'
$extra_networks = undef $extra_networks = undef

View File

@ -30,7 +30,7 @@ describe manifest do
:dns_upstream => fuel_settings['DNS_UPSTREAM'], :dns_upstream => fuel_settings['DNS_UPSTREAM'],
:dns_domain => fuel_settings['DNS_DOMAIN'], :dns_domain => fuel_settings['DNS_DOMAIN'],
:dns_search => fuel_settings['DNS_SEARCH'], :dns_search => fuel_settings['DNS_SEARCH'],
:dhcp_interface => fuel_settings['ADMIN_NETWORK']['interface'], :dhcp_ipaddress => fuel_settings['ADMIN_NETWORK']['ipaddress'],
:nailgun_api_url => "http://#{fuel_settings['ADMIN_NETWORK']['ipaddress']}:8000/api", :nailgun_api_url => "http://#{fuel_settings['ADMIN_NETWORK']['ipaddress']}:8000/api",
:bootstrap_ethdevice_timeout => bootstrap_settings.fetch('ethdevice_timeout', '120'), :bootstrap_ethdevice_timeout => bootstrap_settings.fetch('ethdevice_timeout', '120'),
} }