diff options
author | Michael Polenchuk <mpolenchuk@mirantis.com> | 2018-01-11 14:53:46 +0400 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-01-12 18:45:01 +0100 |
commit | 3b5886cc27e77b74abb4e19f635a20b6a805cd20 (patch) | |
tree | b44cf6294eea1021ca9abded31b9f5723712c3c8 /mcp | |
parent | 644a0b4a671af5a146b8a8a64cc017e98f0d5986 (diff) |
[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 <mpolenchuk@mirantis.com>
(cherry picked from commit 658418ea84e633f5f97a706a075d7e2f24127999)
Diffstat (limited to 'mcp')
-rwxr-xr-x | mcp/config/states/baremetal_init | 5 |
1 files changed, 5 insertions, 0 deletions
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" |