Search in sources :

Example 1 with PromptContainerData

use of com.yahoo.vespa.hosted.node.admin.containerdata.PromptContainerData in project vespa by vespa-engine.

the class NodeAgentImpl method createContainerData.

private void createContainerData(ContainerNodeSpec nodeSpec) {
    ContainerData containerData = ContainerData.createClean(environment, ContainerName.fromHostname(nodeSpec.hostname));
    // If this fails, however, we should fail the start-up, as the config server won't work without it. Thus, no catch here.
    if (nodeSpec.nodeType.equals(NodeType.config.name())) {
        logger.info("Creating files needed by config server");
        new ConfigServerContainerData(environment, nodeSpec.hostname).writeTo(containerData);
    }
    // ContainerData only works when root, which is the case only for HostAdmin so far. Allow this to fail, since it's not critical.
    try {
        logger.info("Creating files for message of the day and the bash prompt");
        new MotdContainerData(nodeSpec, environment).writeTo(containerData);
        new PromptContainerData(environment).writeTo(containerData);
    } catch (UncheckedIOException e) {
        logger.info("Failed creating files for message of the day and the bash prompt", e);
    }
}
Also used : MotdContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.MotdContainerData) UncheckedIOException(java.io.UncheckedIOException) PromptContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.PromptContainerData) PromptContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.PromptContainerData) ContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.ContainerData) ConfigServerContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.ConfigServerContainerData) MotdContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.MotdContainerData) ConfigServerContainerData(com.yahoo.vespa.hosted.node.admin.containerdata.ConfigServerContainerData)

Aggregations

ConfigServerContainerData (com.yahoo.vespa.hosted.node.admin.containerdata.ConfigServerContainerData)1 ContainerData (com.yahoo.vespa.hosted.node.admin.containerdata.ContainerData)1 MotdContainerData (com.yahoo.vespa.hosted.node.admin.containerdata.MotdContainerData)1 PromptContainerData (com.yahoo.vespa.hosted.node.admin.containerdata.PromptContainerData)1 UncheckedIOException (java.io.UncheckedIOException)1