aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/config/states/baremetal_init
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-01-11 14:53:46 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2018-01-11 15:04:03 +0400
commit658418ea84e633f5f97a706a075d7e2f24127999 (patch)
tree231956b9738ea987a7fafed9b113c98e7d4ed602 /mcp/config/states/baremetal_init
parent252fd2b6fe32a77a4014ce33ead9f77817b1d2c9 (diff)
[baremetal] Disable dhcp offered routes
Prevent dhcp client from setting an unwanted default routes on compute nodes. Change-Id: I2529491bbc977647e5f457d5f1ba88b0cc4372ee Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Diffstat (limited to 'mcp/config/states/baremetal_init')
-rwxr-xr-xmcp/config/states/baremetal_init5
1 files changed, 5 insertions, 0 deletions
diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init
index ef2f78b70..9718a4176 100755
--- a/mcp/config/states/baremetal_init
+++ b/mcp/config/states/baremetal_init
@@ -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"