graphite: restart collectd on upgrade

This commit is contained in:
Girish Ramakrishnan
2021-03-24 14:10:17 -07:00
parent 407dda5c25
commit 7ae79fe3a5
+7 -5
View File
@@ -1825,7 +1825,12 @@ function startGraphite(existingInfra, serviceConfig, callback) {
shell.sudo('removeGraphiteDir', [ RMADDONDIR_CMD, 'graphite' ], {}, done);
},
shell.exec.bind(null, 'startGraphite', cmd)
], callback);
], function (error) {
// restart collectd to get the disk stats after graphite starts. currently, there is no way to do graphite health check
if (!error) setTimeout(() => shell.sudo('restartcollectd', [ RESTART_SERVICE_CMD, 'collectd' ], {}, NOOP_CALLBACK), 60000);
callback(error);
});
}
function setupProxyAuth(app, options, callback) {
@@ -2156,10 +2161,7 @@ function restartGraphite(callback) {
docker.restartContainer('graphite', callback);
setTimeout(function () {
// wait for graphite to startup and then restart collectd. graphite migrations can be quite slow!
shell.sudo('restartcollectd', [ RESTART_SERVICE_CMD, 'collectd' ], {}, NOOP_CALLBACK);
}, 60000);
setTimeout(() => shell.sudo('restartcollectd', [ RESTART_SERVICE_CMD, 'collectd' ], {}, NOOP_CALLBACK), 60000);
}
function teardownOauth(app, options, callback) {