Skip to content

Commit

Permalink
Fixed a logging bug in pod filtering logic (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellistarn committed Dec 3, 2021
1 parent 552821f commit 58c2170
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controllers/provisioning/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ func (p *Provisioner) FilterProvisionable(ctx context.Context, pods []*v1.Pod) [
original := pod
candidate := &v1.Pod{}
if err := p.kubeClient.Get(ctx, types.NamespacedName{Namespace: pod.Namespace, Name: pod.Name}, candidate); err != nil {
logging.FromContext(ctx).Errorf("Unexpected error retrieving pod \"%s/%s\" while checking if it is provisionable", pod.Namespace, pod.Name)
logging.FromContext(ctx).Errorf("Could not verify pod \"%s/%s\" is provisionable, %s", pod.Namespace, pod.Name, err.Error())
continue
}
if candidate.Spec.NodeName == "" {
provisionable = append(provisionable, original)
Expand Down

0 comments on commit 58c2170

Please sign in to comment.