Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error logging of master/minion ingresses #953

Merged
merged 1 commit into from
May 18, 2020
Merged

Conversation

Dean-Coakley
Copy link
Contributor

Bug

Under certain conditions of invalid minions/master ingress the entire struct is logged out instead of just the name.

Case1.

  • Minons present with no master deployed

Case2.

  • Master in an undesirable state. Multiple Hosts, etc.
1 controller.go:607] 
Ignoring Ingress {{ } {cafe-ingress-tea-minion  default /apis/extensions/v1beta1/namespaces/default/ingresses/cafe-ingress-tea-minion 2e3abe60-716a-4e7f-bae6-9ebee0bca5d7 1934716 1 2020-05-15 13:41:37 +0000 UTC <nil> <nil> map[] map[kubernetes.io/ingress.class:nginx nginx.org/mergeable-ingress-type:minion] [] []  [{kubectl Update extensions/v1beta1 2020-05-15 13:41:37 +0000 UTC FieldsV1 &FieldsV1{Raw:*[123 34 102 58 109 101 116 97 100 97 116 97 34 58 123 34 102 58 97 110 110 111 116 97 116 105 111 110 115 34 58 123 34 46 34 58 123 125 44 34 102 58 107 117 98 101 114 110 101 116 101 115 46 105 111 47 105 110 103 114 101 115 115 46 99 108 97 115 115 34 58 123 125 44 34 102 58 110 103 105 110 120 46 111 114 103 47 109 101 114 103 101 97 98 108 101 45 105 110 103 114 101 115 115 45 116 121 112 101 34 58 123 125 125 125 44 34 102 58 115 112 101 99 34 58 123 34 102 58 114 117 108 101 115 34 58 123 125 125 125],}}]} {<nil> nil [] [{cafe.example.com {&HTTPIngressRuleValue{Paths:[]HTTPIngressPath{HTTPIngressPath{Path:/tea,Backend:IngressBackend{ServiceName:tea-svc,ServicePort:{0 80 },Resource:nil,},PathType:*ImplementationSpecific,},},}}}]} {{[]}}}(Minion): 
Could not find a Master for Minion: 'default/cafe-ingress-tea-minion'

Proposed changes

If you deploy a master ingress with no minion. It logs the entire Ingress name.

Ignoring Ingress cafe-ingress-tea-minion(Minion): 
Could not find a Master for Minion: 'default/cafe-ingress-tea-minion'

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@Dean-Coakley Dean-Coakley added the bug An issue reporting a potential bug label May 15, 2020
@Dean-Coakley Dean-Coakley self-assigned this May 15, 2020
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@lucacome lucacome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants