Skip to content

examine nil pointer before applying backend protocol configurations - #678

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
freehan:nil-pointer
Mar 15, 2019
Merged

k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
freehan:nil-pointer

Conversation

@freehan

@freehan freehan commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

Mitigates #675

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 12, 2019
@k8s-ci-robot
k8s-ci-robot requested review from MrHohn and thockin March 12, 2019 00:27
Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what do you mean by exiting?

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"..caused by an application..."

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"...revert the change on the application..."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"Please revert the change on application protocol to avoid this error message."
"Please revert the change on the application's protocol to avoid this error message."

I don't have a lot of insight into how the ingress-gce works internally, but I think a TODO on handling this type of change would be helpful. I think progressing from HTTP-1.1 to HTTP-2 (soon HTTP-3) or introducing changes on the protocol to adopt a service mesh will be a common occurrence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah. Agreed. In the long run we want to support this. But currently, due to GCE api changes, it was broken. So we need to put this short term fix in place so that it can be cherry picked.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add the TODO just so we remember to do it?

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"This is usually caused by application protocol changed. " +
"This is usually caused by a change of the application's protocol." +

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"Please revert the change on application protocol to avoid this error message."
"Please revert the change on the application's protocol to avoid this error message."

I don't have a lot of insight into how the ingress-gce works internally, but I think a TODO on handling this type of change would be helpful. I think progressing from HTTP-1.1 to HTTP-2 (soon HTTP-3) or introducing changes on the protocol to adopt a service mesh will be a common occurrence.

@freehan

freehan commented Mar 12, 2019

Copy link
Copy Markdown
Contributor Author

fixed.

@mariantalla

Copy link
Copy Markdown

Hi, is there anything missing for this to be /lgtmed?
cc @MrHohn @thockin

@mariantalla

Copy link
Copy Markdown

Assigning for lgtm (please reassign if I've done this wrong):
/assign @MrHohn

@MrHohn

MrHohn commented Mar 14, 2019

Copy link
Copy Markdown
Member

This LGTM, but will defer to @rramkumar1 to make the final call.
/assign @rramkumar1

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we give the name of the actual field involved, this error is a bit vague sounding. are we talking about the GCP object, the protocol used by the app itself, etc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

HealthCheck object contains HTTPHealthCheck configurations. It has bunch of fields.

In this case, the controller thinks that HTTP2HealthCheck configuration is nil because it was not vendored.

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we not return immediately (same in all case above)

@freehan

freehan commented Mar 14, 2019

Copy link
Copy Markdown
Contributor Author

Ready for next round

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"the %v health check configuration..."

Comment thread pkg/healthchecks/healthchecks.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add the TODO just so we remember to do it?

@rramkumar1 rramkumar1 changed the title examine nil pointer before applying configurations examine nil pointer before applying backend protocol configurations Mar 14, 2019
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 14, 2019
@freehan

freehan commented Mar 15, 2019

Copy link
Copy Markdown
Contributor Author

Done

@rramkumar1

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 15, 2019
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: freehan, rramkumar1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
k8s-ci-robot merged commit d2150fc into kubernetes:master Mar 15, 2019
rramkumar1 added a commit that referenced this pull request Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants