Don't ping local addresses on controller

When verifying addresses we specify the interface that we expect
the traffic to use.  For addresses that belong to the active
controller, this means that the connectivity test will fail because
the valid route is via the "lo" loopback device rather than the
external network interface.

Since the relevent addresses are statically configured anyway,
the simplest solution is just to skip checking for connectivity
on controller nodes.

Note: the change is logically just adding two lines, but the indentation
changes make it look more complicated.

Change-Id: I326ae03c5dc368692e43aeb7d5ba2ae95c957145
This commit is contained in:
Chris Friesen 2018-04-16 13:01:42 -06:00 committed by Jack Ding
parent 4efe06ee52
commit 8bfa24815c
1 changed files with 13 additions and 11 deletions

View File

@ -146,19 +146,21 @@ class platform::network (
$testcmd = '/usr/local/bin/connectivity_test'
if $management_interface {
exec { 'connectivity-test-management':
command => "${testcmd} -t 70 -i ${management_interface} controller-platform-nfs; /bin/true",
require => Anchor['platform::networking'],
onlyif => "test ! -f /etc/platform/simplex",
if $::personality != 'controller' {
if $management_interface {
exec { 'connectivity-test-management':
command => "${testcmd} -t 70 -i ${management_interface} controller-platform-nfs; /bin/true",
require => Anchor['platform::networking'],
onlyif => "test ! -f /etc/platform/simplex",
}
}
}
if $infrastructure_interface {
exec { 'connectivity-test-infrastructure':
command => "${testcmd} -t 120 -i ${infrastructure_interface} controller-nfs; /bin/true",
require => Anchor['platform::networking'],
onlyif => "test ! -f /etc/platform/simplex",
if $infrastructure_interface {
exec { 'connectivity-test-infrastructure':
command => "${testcmd} -t 120 -i ${infrastructure_interface} controller-nfs; /bin/true",
require => Anchor['platform::networking'],
onlyif => "test ! -f /etc/platform/simplex",
}
}
}