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

Various service fixes #1839

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Conversation

trozet
Copy link
Contributor

@trozet trozet commented Nov 13, 2020

Code was accidentally doing an add for localPortWatcher when it should
be deleting. Also, the comparison for if a service needs update was
insufficient. Changed it to use the same check as ovnkube-master uses
for services.

Note, a separate commit will be coming to fix shared gw mode.

Signed-off-by: Tim Rozet trozet@redhat.com

@trozet
Copy link
Contributor Author

trozet commented Nov 13, 2020

@dave-tucker @dcbw @danwinship PTAL

@coveralls
Copy link

coveralls commented Nov 13, 2020

Coverage Status

Coverage decreased (-0.03%) to 55.148% when pulling b93b52e on trozet:fix_node_service_watching into cc0c252 on ovn-org:master.

@trozet
Copy link
Contributor Author

trozet commented Nov 13, 2020

/hold

@@ -119,7 +119,13 @@ func (l *localPortWatcher) AddService(svc *kapi.Service) {
}

func (l *localPortWatcher) UpdateService(old, new *kapi.Service) {
if reflect.DeepEqual(new.Spec, old.Spec) {
if reflect.DeepEqual(new.Spec.Ports, old.Spec.Ports) &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM....

But just a though. Could we move this check up to gateway.AddService?
Then we'd only need to do it once, and not have it done in multiple places?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about that, but I saw other handlers have different checks like look at port claim watcher:

	if reflect.DeepEqual(old.Spec.ExternalIPs, new.Spec.ExternalIPs) && reflect.DeepEqual(old.Spec.Ports, new.Spec.Ports) {
		return
	}

Code was accidentally doing an add for localPortWatcher when it should
be deleting. Also, the comparison for if a service needs update was
insufficient. Changed it to use the same check as ovnkube-master uses
for services.

Note, a separate commit will be coming to fix shared gw mode.

Signed-off-by: Tim Rozet <trozet@redhat.com>
@trozet
Copy link
Contributor Author

trozet commented Nov 13, 2020

Tested it locally and now I'm able to reach the lb ingress service.

/hold cancel

@trozet
Copy link
Contributor Author

trozet commented Nov 13, 2020

/retest

@dcbw
Copy link
Contributor

dcbw commented Nov 13, 2020

/lgtm

@trozet trozet merged commit c2225bd into ovn-org:master Nov 13, 2020
kyrtapz pushed a commit to kyrtapz/ovn-kubernetes that referenced this pull request Sep 6, 2023
OCPBUGS-17731: move clearInitialNodeNetworkUnavailableCondition to clustermanager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants