Andrew Bogott has submitted this change and it was merged.
Change subject: Set up special dhcp behavior for bare-metal boxes
......................................................................
Set up special dhcp behavior for bare-metal boxes
Change-Id: I0729ffbb08f3c92b6a9c6b3c3b9747abcb020d93
---
M hieradata/common.yaml
M modules/openstack/manifests/nova/network.pp
M modules/openstack/templates/kilo/nova/dnsmasq-nova.conf.erb
3 files changed, 15 insertions(+), 0 deletions(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 553e662..d0a3172 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -321,6 +321,15 @@
db_host: 'm5-master.eqiad.wmnet'
bind_ip: "%{::ipaddress_eth0}"
+# IPs assigned here MUST be reserved beforehand so they don't collide with
labs VMs.
+# To reserve, on the labs controller run $ sudo nova-manage fixed reserve <ip>
+# (If using Neutron, all bets are off and this comment is wrong.)
+# Note also that nova-network is not great about refreshing dnsmasq,
+# so changes to this table may require a manual kill of dnsmasq and restart
+# of nova-network.
+labs_metal:
+ - promethium: {MAC: '90:b1:1c:2d:6f:0c', IPv4: 10.68.16.2, project: testlabs,
}
+
kafka_clusters:
# This is the analytics Kafka cluster, named just 'eqiad' for
# historical reasons.
diff --git a/modules/openstack/manifests/nova/network.pp
b/modules/openstack/manifests/nova/network.pp
index dc83a6d..9141fa7 100644
--- a/modules/openstack/manifests/nova/network.pp
+++ b/modules/openstack/manifests/nova/network.pp
@@ -44,6 +44,7 @@
private_ip => '10.68.16.65'},
}
+ $labs_metal = hiera('labs_metal',[])
$recursor_ip = ipresolve(hiera('labs_recursor'),4)
file { '/etc/dnsmasq-nova.conf':
content =>
template("openstack/${$openstack_version}/nova/dnsmasq-nova.conf.erb"),
diff --git a/modules/openstack/templates/kilo/nova/dnsmasq-nova.conf.erb
b/modules/openstack/templates/kilo/nova/dnsmasq-nova.conf.erb
index e0a32a9..475f650 100644
--- a/modules/openstack/templates/kilo/nova/dnsmasq-nova.conf.erb
+++ b/modules/openstack/templates/kilo/nova/dnsmasq-nova.conf.erb
@@ -8,5 +8,10 @@
alias=<%= v['public_ip'] %>,<%= v['private_ip'] %>
<% end -%>
+# Special entries for labs baremetal
+<% @labs_metal.sort.map do |k,v| -%>
+dhcp-host=<%= v['MAC'] %>,<%= k %>,<%= v['IPv4'] %>,10m
+<% end -%>
+
#Clients should use the designate-backed dns server rather than dnsmasq
dhcp-option=option:dns-server,<%= @recursor_ip %>
--
To view, visit https://gerrit.wikimedia.org/r/259787
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0729ffbb08f3c92b6a9c6b3c3b9747abcb020d93
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits