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

Treat initial and subsequent resync events identically for node ip #486

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

bcreane
Copy link
Contributor

@bcreane bcreane commented Aug 4, 2017

Description

Refactor parsing the KDD node syncer event so that common code between a new sync and an update sync event are treated the same. Prior to this fix the new sync event path sent incorrectly formatted node event to clients (e.g. felix).

See https://github.com/projectcalico/libcalico-go/issues/485 for details.

Note: a unit test is in the works.

Todos

  • Tests - manually tested the scenario outlined in the bug, and also confirmed that a hand run of a unit test also sees the correct syncer behavior.
  • Release note

Release Note

bugfix: properly resync node IPs during Felix restart in Kubernetes datastore driver

log.Panicf("Invalid node event. Type: %s, Object: %+v", e.Type, e.Object)
}

func splitNodeEvent(node *k8sapi.Node) (*model.KVPair, *model.KVPair) {
Copy link
Member

Choose a reason for hiding this comment

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

minor naming nit: I'd just call this splitNode since it's not actually taking an Event struct as an input, rather a Node.

@caseydavenport
Copy link
Member

OK LGTM - test's in a separate PR as discussed.

@caseydavenport caseydavenport reopened this Aug 4, 2017
@caseydavenport caseydavenport merged commit 2b80ed5 into projectcalico:master Aug 4, 2017
@bcreane bcreane deleted the kddsync branch August 5, 2017 00:04
@caseydavenport caseydavenport added this to the Calico v2.4.x milestone Aug 7, 2017
song-jiang pushed a commit to song-jiang/libcalico-go that referenced this pull request Jul 19, 2021
…lico#486)

* [SAAS-1407] Update PacketCapture with a status subresource

* [CODE REVIEW] Use named values instead of string as key

* [CODE REVIEW] Add directory and more comments

Co-authored-by: Alina Militaru <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants