Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files Browse the repository at this point in the history
AxiomSamarth committed May 17, 2021

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
2 parents 225a563 + f81374f commit 90a5d58
Showing 4 changed files with 498 additions and 49 deletions.
12 changes: 6 additions & 6 deletions pkg/util/provider/machinecontroller/machine.go
Original file line number Diff line number Diff line change
@@ -110,8 +110,8 @@ func (c *controller) reconcileClusterMachineKey(key string) error {
}

func (c *controller) reconcileClusterMachine(machine *v1alpha1.Machine) (machineutils.RetryPeriod, error) {
klog.V(4).Infof("Start Reconciling machine %q", machine.Name)
defer klog.V(4).Infof("Stop Reconciling machine %q", machine.Name)
klog.V(4).Infof("Start Reconciling machine: %q , nodeName: %q ,providerID: %q", machine.Name, getNodeName(machine), getProviderID(machine))
defer klog.V(4).Infof("Stop Reconciling machine %q, nodeName: %q ,providerID: %q", machine.Name, getNodeName(machine), getProviderID(machine))

if c.safetyOptions.MachineControllerFrozen && machine.DeletionTimestamp == nil {
// If Machine controller is frozen and
@@ -199,7 +199,7 @@ func (c *controller) addNodeToMachine(obj interface{}) {
}

if machine.Status.CurrentStatus.Phase != v1alpha1.MachineCrashLoopBackOff && nodeConditionsHaveChanged(machine.Status.Conditions, node.Status.Conditions) {
klog.V(4).Infof("Enqueue machine object %q as backing node's conditions have changed", machine.Name)
klog.V(4).Infof("Enqueue machine object %q as conditions of backing node %q have changed", machine.Name, getNodeName(machine))
c.enqueueMachine(machine)
}
}
@@ -337,7 +337,7 @@ func (c *controller) triggerCreationFlow(createMachineRequest *driver.CreateMach
}

// Creation was successful
klog.V(2).Infof("Created new VM for machine: %q with ProviderID: %s", machine.Name, providerID)
klog.V(2).Infof("Created new VM for machine: %q with ProviderID: %q and backing node: %q", machine.Name, providerID, getNodeName(machine))
break

case codes.Unknown, codes.DeadlineExceeded, codes.Aborted, codes.Unavailable:
@@ -441,7 +441,7 @@ func (c *controller) triggerCreationFlow(createMachineRequest *driver.CreateMach
}

func (c *controller) triggerUpdationFlow(machine *v1alpha1.Machine, actualProviderID string) (machineutils.RetryPeriod, error) {
klog.V(2).Infof("Setting ProviderID of %s to %s", machine.Name, actualProviderID)
klog.V(2).Infof("Setting ProviderID of machine %s with backing node %s to %s", machine.Name, getNodeName(machine), actualProviderID)

for {
machine, err := c.controlMachineClient.Machines(machine.Namespace).Get(machine.Name, metav1.GetOptions{})
@@ -533,6 +533,6 @@ func (c *controller) triggerDeletionFlow(deleteMachineRequest *driver.DeleteMach
}
*/

klog.V(2).Infof("Machine %q deleted successfully", machine.Name)
klog.V(2).Infof("Machine %q with providerID %q and nodeName %q deleted successfully", machine.Name, getProviderID(machine), getNodeName(machine))
return machineutils.LongRetry, nil
}
4 changes: 2 additions & 2 deletions pkg/util/provider/machinecontroller/machine_safety.go
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ func (c *controller) reconcileClusterMachineSafetyAPIServer(key string) error {
return err
}

klog.V(2).Info("SafetyController: Reinitializing machine health check for ", machine.Name)
klog.V(2).Info("SafetyController: Reinitializing machine health check for machine: %q with backing node: %q and providerID: %q", machine.Name, getNodeName(machine), getProviderID(machine))
}

// En-queue after 30 seconds, to ensure all machine states are reconciled
@@ -220,7 +220,7 @@ func (c *controller) checkMachineClass(machineClass *v1alpha1.MachineClass) (mac
// If machine exists and machine object is still been processed by the machine controller
if err == nil &&
(machine.Status.CurrentStatus.Phase == "" || machine.Status.CurrentStatus.Phase == v1alpha1.MachineCrashLoopBackOff) {
klog.V(3).Infof("SafetyController: Machine object %q is being processed by machine controller, hence skipping", machine.Name)
klog.V(3).Infof("SafetyController: Machine object %q with backing nodeName %q , providerID %q is being processed by machine controller, hence skipping", machine.Name, getNodeName(machine), getProviderID(machine))
continue
}

Loading

0 comments on commit 90a5d58

Please sign in to comment.