From 35336282da621d5189bad97c5bddd1840721f632 Mon Sep 17 00:00:00 2001 From: Chris Krelle Date: Sun, 3 Feb 2013 15:48:43 -0800 Subject: [PATCH] Add dhcp server option to dnsmasq for baremetal This sets the dns option for baremetal deploy clients. this is useful for clients who may require external access during the deployment process. Change-Id: Ibe680d2acaad826e4868223ebfd1f112d7796662 Authored-by: Chris Krelle --- lib/baremetal | 3 +++ stack.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 4608648242..1550e44536 100755 --- a/stack.sh +++ b/stack.sh @@ -1285,8 +1285,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"