diff --git a/lib/baremetal b/lib/baremetal index 3cc24291c5..7c31d1fd17 100644 --- a/lib/baremetal +++ b/lib/baremetal @@ -90,6 +90,9 @@ else BM_DNSMASQ_RANGE=${BM_DNSMASQ_RANGE:-} fi +# BM_DNSMASQ_DNS provide dns server to bootstrap clients +BM_DNSMASQ_DNS=${BM_DNSMASQ_DNS:-} + # BM_FIRST_MAC *must* be set to the MAC address of the node you will boot. # This is passed to dnsmasq along with the kernel/ramdisk to # deploy via PXE. diff --git a/stack.sh b/stack.sh index 0521ced3b7..8a814a012e 100755 --- a/stack.sh +++ b/stack.sh @@ -1300,8 +1300,8 @@ if is_service_enabled nova && is_baremetal; then sudo pkill dnsmasq || true sudo dnsmasq --conf-file= --port=0 --enable-tftp --tftp-root=/tftpboot \ --dhcp-boot=pxelinux.0 --bind-interfaces --pid-file=/var/run/dnsmasq.pid \ - --interface=$BM_DNSMASQ_IFACE --dhcp-range=$BM_DNSMASQ_RANGE - + --interface=$BM_DNSMASQ_IFACE --dhcp-range=$BM_DNSMASQ_RANGE \ + ${$BM_DNSMASQ_DNS:+--dhcp-option=option:dns-server,$BM_DNSMASQ_DNS} # ensure callback daemon is running sudo pkill nova-baremetal-deploy-helper || true screen_it baremetal "nova-baremetal-deploy-helper"