cadvisor test: fix (#18671)
* influxdb module: add postStart * cadvisor module: increase TimeoutStartSec Under high load, the cadvisor module can take longer than the default 90 seconds to start. This change should hopefully fix the test on Hydra.
This commit is contained in:
parent
52307fd6e5
commit
2d2c311304
|
@ -66,16 +66,16 @@ let
|
||||||
enabled = false;
|
enabled = false;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
collectd = {
|
collectd = [{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
typesdb = "${pkgs.collectd}/share/collectd/types.db";
|
typesdb = "${pkgs.collectd}/share/collectd/types.db";
|
||||||
database = "collectd_db";
|
database = "collectd_db";
|
||||||
port = 25826;
|
port = 25826;
|
||||||
};
|
}];
|
||||||
|
|
||||||
opentsdb = {
|
opentsdb = [{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
};
|
}];
|
||||||
|
|
||||||
continuous_queries = {
|
continuous_queries = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
@ -171,6 +171,11 @@ in
|
||||||
mkdir -m 0770 -p ${cfg.dataDir}
|
mkdir -m 0770 -p ${cfg.dataDir}
|
||||||
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
|
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
|
||||||
'';
|
'';
|
||||||
|
postStart = mkBefore ''
|
||||||
|
until ${pkgs.curl.bin}/bin/curl -s -o /dev/null 'http://127.0.0.1${toString configOptions.http.bind-address}'/ping; do
|
||||||
|
sleep 1;
|
||||||
|
done
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers = optional (cfg.user == "influxdb") {
|
users.extraUsers = optional (cfg.user == "influxdb") {
|
||||||
|
|
|
@ -90,6 +90,7 @@ in {
|
||||||
${optionalString cfg.storageDriverSecure "-storage_driver_secure"}
|
${optionalString cfg.storageDriverSecure "-storage_driver_secure"}
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
TimeoutStartSec=300;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,6 @@ import ./make-test.nix ({ pkgs, ... } : {
|
||||||
|
|
||||||
$influxdb->waitForUnit("influxdb.service");
|
$influxdb->waitForUnit("influxdb.service");
|
||||||
|
|
||||||
# Wait until influxdb admin interface is available
|
|
||||||
$influxdb->waitUntilSucceeds("curl -f 127.0.0.1:8083");
|
|
||||||
|
|
||||||
# create influxdb database
|
# create influxdb database
|
||||||
$influxdb->succeed(q~
|
$influxdb->succeed(q~
|
||||||
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"
|
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"
|
||||||
|
|
|
@ -17,9 +17,6 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
$one->waitForUnit("influxdb.service");
|
$one->waitForUnit("influxdb.service");
|
||||||
|
|
||||||
# Check if admin interface is avalible
|
|
||||||
$one->waitUntilSucceeds("curl -f 127.0.0.1:8083");
|
|
||||||
|
|
||||||
# create database
|
# create database
|
||||||
$one->succeed(q~
|
$one->succeed(q~
|
||||||
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE test"
|
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE test"
|
||||||
|
|
Loading…
Reference in a new issue