private void retryingExec(String command) {
        boolean success = false;
        for (int attempt = 1; attempt <= EXEC_ATTEMPTS; attempt++) {
            String errorMessage;
            try {
                Pair<Integer, String> result = processExecuter.exec(command);
                if (result.getFirst() == 0) {
                    success = true;
                    break;
                }
                errorMessage = result.getSecond();
            } catch (IOException e) {
                errorMessage = Exceptions.toMessageString(e);
            }
            Duration duration = Duration.ofSeconds((long) Math.pow(2, attempt));
            LOG.log(Level.WARNING, "Failed to run " + command + " on attempt " + attempt + ": " + errorMessage +
                                   ". Retrying in " + duration);
            sleeper.sleep(duration);
        }
        if (!success) {
            throw new RuntimeException("Failed to run " + command + " successfully after " + EXEC_ATTEMPTS +
                                       " attempts, giving up");
        }
    }
Run given command. Retries after a delay on failure
routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java