From 658418ea84e633f5f97a706a075d7e2f24127999 Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Thu, 11 Jan 2018 14:53:46 +0400 Subject: [PATCH] [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 --- mcp/config/states/baremetal_init | 5 +++++ mcp/reclass/classes/system | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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" diff --git a/mcp/reclass/classes/system b/mcp/reclass/classes/system index 267dde28b..4a5c3dec8 160000 --- a/mcp/reclass/classes/system +++ b/mcp/reclass/classes/system @@ -1 +1 @@ -Subproject commit 267dde28bae403546a83357c5d21ff8864871ed5 +Subproject commit 4a5c3dec811bfdbbd7c3f9d20d53e4a95842f6ba -- 2.16.6