kubeadm 883 Updated logging to be consistent. There where areas in kubeadm init where glog was used and glog and was inconsistent with the rest of kubeadm init logging.

Updated logging in join.go and validators.go to use fmt.print style logging for init log messages.

removed redundant log message
This commit is contained in:
Marek Counts 2018-09-09 20:40:43 -07:00
parent 7bfd0d358c
commit a5356e5ba9
3 changed files with 3 additions and 5 deletions

View File

@ -331,7 +331,7 @@ func (j *Join) Run(out io.Writer) error {
}
// run kubeadm init preflight checks for checking all the prequisites
glog.Infoln("[join] running pre-flight checks before initializing the new control plane instance")
fmt.Printf("[join] running pre-flight checks before initializing the new control plane instance\n")
preflight.RunInitMasterChecks(utilsexec.New(), initConfiguration, j.ignorePreflightErrors)
// Prepares the node for hosting a new control plane instance by writing necessary

View File

@ -78,7 +78,6 @@ func (k *KernelValidator) Validate(spec SysSpec) (error, error) {
// validateKernelVersion validates the kernel version.
func (k *KernelValidator) validateKernelVersion(kSpec KernelSpec) error {
glog.V(1).Info("Validating kernel version")
versionRegexps := kSpec.Versions
for _, versionRegexp := range versionRegexps {
r := regexp.MustCompile(versionRegexp)
@ -93,7 +92,6 @@ func (k *KernelValidator) validateKernelVersion(kSpec KernelSpec) error {
// validateKernelConfig validates the kernel configurations.
func (k *KernelValidator) validateKernelConfig(kSpec KernelSpec) error {
glog.V(1).Info("Validating kernel config")
allConfig, err := k.getKernelConfig()
if err != nil {
return fmt.Errorf("failed to parse kernel config: %v", err)

View File

@ -17,7 +17,7 @@ limitations under the License.
package system
import (
"github.com/golang/glog"
"fmt"
"k8s.io/apimachinery/pkg/util/errors"
)
@ -41,7 +41,7 @@ func Validate(spec SysSpec, validators []Validator) (error, error) {
var warns []error
for _, v := range validators {
glog.Infof("Validating %s...", v.Name())
fmt.Printf("Validating %s...\n", v.Name())
warn, err := v.Validate(spec)
errs = append(errs, err)
warns = append(warns, warn)