Merge pull request #13660 from jsafrane/devel/fix-cloud-init

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-09-09 03:42:15 -07:00
commit 79f40d6800

View File

@ -65,15 +65,16 @@ func GetCloudProvider(name string, config io.Reader) (Interface, error) {
// InitCloudProvider creates an instance of the named cloud provider. // InitCloudProvider creates an instance of the named cloud provider.
func InitCloudProvider(name string, configFilePath string) (Interface, error) { func InitCloudProvider(name string, configFilePath string) (Interface, error) {
var cloud Interface var cloud Interface
var err error
if name == "" { if name == "" {
glog.Info("No cloud provider specified.") glog.Info("No cloud provider specified.")
return nil, nil return nil, nil
} }
var err error
if configFilePath != "" { if configFilePath != "" {
config, err := os.Open(configFilePath) var config *os.File
config, err = os.Open(configFilePath)
if err != nil { if err != nil {
glog.Fatalf("Couldn't open cloud provider configuration %s: %#v", glog.Fatalf("Couldn't open cloud provider configuration %s: %#v",
configFilePath, err) configFilePath, err)