From 3b5886cc27e77b74abb4e19f635a20b6a805cd20 Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Thu, 11 Jan 2018 14:53:46 +0400 Subject: [baremetal] Disable dhcp offered routes Prevent dhcp client from setting an unwanted default routes on compute nodes. Conflicts: mcp/reclass/classes/system [stable/euphrates cherry-pick] Drop reclass system submodule bump, only applicable to master. Change-Id: I2529491bbc977647e5f457d5f1ba88b0cc4372ee Signed-off-by: Michael Polenchuk (cherry picked from commit 658418ea84e633f5f97a706a075d7e2f24127999) --- mcp/config/states/baremetal_init | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mcp') diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index 5a8cb49fc..1d3820192 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" -- cgit 1.2.3-korg