Make collectd startup dependent on networking Anchor

Starting collectd too early in the manifest apply is seen
to occasionally fail due to a dependency configuration on
hostname resolution in FQDNLookup not being complete.

This is fixed by making collectd startup have a hard
dependency on platform::networking by-way of a manifest
require Anchor.

As well, to handle the DOR case when controller manifest
is not executed, this update also ensures that collectd
and influxdb services are enabled in its manifest base
class so these processes are auto started by init.

Since influxdb is a controller only service it is removed
from non controller load types.

This issue is fixed by the following multi-git changes.

stx-metal:
   Filter influxdb out of storage and compute only loads.
   No real inter git merge dependency

stx-integ:
   Add startup Before=pmond dependency

stx-config: This Update.
   Move collectd config and startup to manifest apply post stage
   Move influxdb config and startup to manifest apply post stage

Test Plan:
PASS: Build iso
PASS: Verify install storage system and collectd startup
PASS: Verify influxdb and extensions excluded in non-controller loads
PASS: Verify collectd starts properly on all nodes (CC,DOR,UNLOCK)
PASS: Verify influxdb starts properly on controller nodes (CC,DOR,UNLOCK)
PASS: Verify collectd pmond process monitoring and recovery
PASS: Verify influxdb pmond process monitoring and recovery
PASS: Verify collectd statistics storage and fetch to/from influxdb
PASS: Verify Install AIO DX and verify collectd and influxdb startup
PASS: Verify Storage system DOR
PASS: Verify AIO DX DOR

Change-Id: Idff6382d835289f5986e98e3b4ee6e9c7a960287
Closes-Bug: 1797909
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
Eric MacDonald 2019-01-02 10:13:24 -05:00
parent 9a3264acaa
commit b83ad728ce
3 changed files with 14 additions and 7 deletions

View File

@ -1,2 +1,2 @@
SRC_DIR="src"
TIS_PATCH_VER=74
TIS_PATCH_VER=75

View File

@ -29,11 +29,16 @@ class platform::collectd
content => template('platform/collectd.conf.erb'),
} # now start collectd
-> exec { 'collectd-enable':
command => 'systemctl enable collectd',
unless => 'systemctl is-enabled collectd'
}
# ensure that collectd is running
-> service { 'collectd':
ensure => running,
enable => true,
provider => 'systemd'
provider => 'systemd',
require => Anchor['platform::networking'],
} # now get pmond to monitor the process
# ensure pmon soft link for process monitoring
@ -54,7 +59,6 @@ class platform::collectd::runtime {
class platform::collectd::restart {
include ::platform::collectd
exec { 'collectd-restart':
command => '/usr/local/sbin/pmon-restart collect'
command => '/usr/local/sbin/pmon-restart collectd'
}
}

View File

@ -44,6 +44,11 @@ class platform::influxdb
content => template('platform/influxdb.conf.erb'),
} # now make sure that influxdb is started
-> exec { 'influxdb-enable':
command => 'systemctl enable influxdb',
unless => 'systemctl is-enabled influxdb'
}
# ensure that influxdb is running
-> service { 'influxdb':
ensure => running,
@ -61,12 +66,10 @@ class platform::influxdb
}
}
class platform::influxdb::runtime {
include ::platform::influxdb
}
class platform::influxdb::logrotate::params (
$log_file_name = undef,
$log_file_size = undef,