Create storage dir for 'join-cluster' if needed

pull/1212/head
Philip O'Toole 2014-12-11 14:20:25 -08:00
parent 71da5c4a4a
commit 918c0562be
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package main
import ( import (
"flag" "flag"
"log" "log"
"os"
"github.com/influxdb/influxdb/messaging" "github.com/influxdb/influxdb/messaging"
) )
@ -44,7 +45,9 @@ func execJoinCluster(args []string) {
// If joining as a data node then create a data directory. // If joining as a data node then create a data directory.
if *role == "combined" || *role == "data" { if *role == "combined" || *role == "data" {
// TODO: do any required data-node stuff. if err := os.MkdirAll(config.Storage.Dir, 0744); err != nil {
log.Fatal(err)
}
} }
log.Printf("joined cluster at %s", *seedServers) log.Printf("joined cluster at %s", *seedServers)