[baremetal] Disable dhcp offered routes 03/50403/1
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Thu, 11 Jan 2018 10:53:46 +0000 (14:53 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Thu, 11 Jan 2018 11:04:03 +0000 (15:04 +0400)
Prevent dhcp client from setting an unwanted
default routes on compute nodes.

Change-Id: I2529491bbc977647e5f457d5f1ba88b0cc4372ee
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
mcp/config/states/baremetal_init
mcp/reclass/classes/system

index ef2f78b..9718a41 100755 (executable)
@@ -28,6 +28,11 @@ salt -C 'kvm* or cmp*' state.apply salt.minion
 salt -C 'kvm* or cmp*' service.force_reload salt-minion
 salt -C 'cmp*' state.apply linux.system
 salt -C 'cmp*' state.apply linux.network || true
+
+# disable dhcp offered routes on compute nodes
+salt -C 'cmp*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \
+  args='unset new_routers'
+
 salt -C 'kvm* or cmp*' system.reboot
 wait_for 90.0 "salt -C 'kvm* or cmp*' test.ping"
 
index 267dde2..4a5c3de 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 267dde28bae403546a83357c5d21ff8864871ed5
+Subproject commit 4a5c3dec811bfdbbd7c3f9d20d53e4a95842f6ba