More storage provisioner fixes.

I'm not sure of a better way to ensure /tmp exists in a from scratch container,
but glog appears to just explode without it.
pull/2168/head
dlorenc 2017-11-07 08:51:09 -08:00 committed by dlorenc
parent 7e0131e1de
commit 6f7fd002ab
No known key found for this signature in database
GPG Key ID: 5C3BCD5779438DF7
2 changed files with 9 additions and 1 deletions

View File

@ -301,7 +301,7 @@ $(ISO_BUILD_IMAGE): deploy/iso/minikube-iso/Dockerfile
@echo "$(@) successfully built"
out/storage-provisioner: $(shell $(STORAGE_PROVISIONER_FILES))
go build GOOS=linux -o $(BUILD_DIR)/storage-provisioner -ldflags=$(LOCALKUBE_LDFLAGS) cmd/storage-provisioner/main.go
GOOS=linux go build -o $(BUILD_DIR)/storage-provisioner -ldflags=$(LOCALKUBE_LDFLAGS) cmd/storage-provisioner/main.go
.PHONY: storage-provisioner-image
storage-provisioner-image: out/storage-provisioner

View File

@ -18,11 +18,19 @@ package main
import (
"flag"
"fmt"
"os"
"github.com/golang/glog"
"k8s.io/minikube/pkg/localkube"
)
func main() {
// Glog requires that /tmp exists.
if err := os.MkdirAll("/tmp", 0755); err != nil {
fmt.Printf("Error creating tmpdir: %s\n", err)
os.Exit(1)
}
flag.Parse()
if err := localkube.StartStorageProvisioner(); err != nil {