mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-08 23:13:09 -06:00
avoid discarding exceptions in docker helper
This commit is contained in:
parent
da87b1c3bd
commit
f1e3adf518
@ -155,7 +155,7 @@ public class DockerHelper {
|
||||
logger.error("Unable to contact docker, make sure docker is up and try again.");
|
||||
logger.error("If docker is installed make sure this user has access to the docker group.");
|
||||
logger.error("$ sudo gpasswd -a ${USER} docker && newgrp docker");
|
||||
System.exit(1);
|
||||
throw e;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -178,7 +178,7 @@ public class DockerHelper {
|
||||
logger.error("Unable to contact docker, make sure docker is up and try again.");
|
||||
logger.error("If docker is installed make sure this user has access to the docker group.");
|
||||
logger.error("$ sudo gpasswd -a ${USER} docker && newgrp docker");
|
||||
System.exit(1);
|
||||
throw e;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -193,7 +193,7 @@ public class DockerHelper {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Unable to contact docker, make sure docker is up and try again.");
|
||||
System.exit(1);
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (runningContainers.size() >= 1) {
|
||||
@ -204,9 +204,10 @@ public class DockerHelper {
|
||||
|
||||
if (reload != null) {
|
||||
try {
|
||||
post(reload, null, false, "reloading config");
|
||||
post(reload, null, false, "reload config");
|
||||
} catch (Exception e) {
|
||||
logger.error(String.format("Unexpected config/state for docker container %s, consider removing the container", name));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,6 +234,7 @@ public class DockerHelper {
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("Error getting docker log and detect start for containerId: " + containerId);
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ public class DockerMetricsManager {
|
||||
logger.error("failed to set permissions on prom backup " +
|
||||
"directory " + userHome + "/.nosqlbench/prometheus)");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
try (PrintWriter out = new PrintWriter(
|
||||
@ -238,11 +238,11 @@ public class DockerMetricsManager {
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("error writing prometheus yaml file to ~/.prometheus");
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("creating file in ~/.prometheus");
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ public class DockerMetricsManager {
|
||||
logger.error("failed to set permissions on grafana directory " +
|
||||
"directory " + userHome + "/.nosqlbench/grafana)");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -348,6 +348,7 @@ public class DockerMetricsManager {
|
||||
close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user