Skip to content

Commit d3f51e3

Browse files
srm09k8s-infra-cherrypick-robot
authored andcommitted
Increases verbosity level for some logs
This patch increases the verbosity level for some log statements which are assoicated to optional fields, thus reducing the amount of log data generated on continuous reconciles. Signed-off-by: Sagar Muchhal <[email protected]>
1 parent c233cbe commit d3f51e3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg/services/govmomi/service.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func (vms *VMService) reconcilePowerState(ctx *virtualMachineContext) (bool, err
315315

316316
func (vms *VMService) reconcileStoragePolicy(ctx *virtualMachineContext) error {
317317
if ctx.VSphereVM.Spec.StoragePolicyName == "" {
318-
ctx.Logger.Info("storage policy not defined. skipping reconcile storage policy")
318+
ctx.Logger.V(5).Info("storage policy not defined. skipping reconcile storage policy")
319319
return nil
320320
}
321321

@@ -527,7 +527,7 @@ func (vms *VMService) getBootstrapData(ctx *context.VMContext) ([]byte, error) {
527527

528528
func (vms *VMService) reconcileVMGroupInfo(ctx *virtualMachineContext) (bool, error) {
529529
if ctx.VSphereFailureDomain == nil || ctx.VSphereFailureDomain.Spec.Topology.Hosts == nil {
530-
ctx.Logger.Info("hosts topology in failure domain not defined. skipping reconcile VM group")
530+
ctx.Logger.V(5).Info("hosts topology in failure domain not defined. skipping reconcile VM group")
531531
return true, nil
532532
}
533533

@@ -556,7 +556,7 @@ func (vms *VMService) reconcileVMGroupInfo(ctx *virtualMachineContext) (bool, er
556556

557557
func (vms *VMService) reconcileTags(ctx *virtualMachineContext) error {
558558
if len(ctx.VSphereVM.Spec.TagIDs) == 0 {
559-
ctx.Logger.Info("no tags defined. skipping tags reconciliation")
559+
ctx.Logger.V(5).Info("no tags defined. skipping tags reconciliation")
560560
return nil
561561
}
562562

@@ -570,11 +570,10 @@ func (vms *VMService) reconcileTags(ctx *virtualMachineContext) error {
570570

571571
func (vms *VMService) reconcileClusterModuleMembership(ctx *virtualMachineContext) error {
572572
if ctx.ClusterModuleInfo != nil {
573-
ctx.Logger.V(4).Info("add vm to module", "moduleUUID", *ctx.ClusterModuleInfo)
573+
ctx.Logger.V(5).Info("add vm to module", "moduleUUID", *ctx.ClusterModuleInfo)
574574
provider := clustermodules.NewProvider(ctx.Session.TagManager.Client)
575575

576576
if err := provider.AddMoRefToModule(ctx, *ctx.ClusterModuleInfo, ctx.Ref); err != nil {
577-
ctx.Logger.V(4).Error(err, "failed to add vm to module", "moduleUUID", *ctx.ClusterModuleInfo)
578577
return err
579578
}
580579
ctx.VSphereVM.Status.ModuleUUID = ctx.ClusterModuleInfo

0 commit comments

Comments
 (0)