• Jan Safranek's avatar
    Fixed error handling of cloud init. · f7384827
    Jan Safranek authored
    Avoid creating a new 'err' variable in the 'if'-branch, shadowing the one
    in the outer scope.
    
    Any error from subsequent 'cloud, err = GetCloudProvider()' was not propagated
    to 'err' variable in the outer scope and thus errors were never returned from
    this function.
    
    This is hard to debug error on OpenStack, when content of --cloud-config=
    file is wrong or connection to OpenStack fails. Such error is never logged
    and Kubernetes thinks everything is OK.
    f7384827
plugins.go 2.92 KB