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

bdp oscillation recovery mechanism with tie-breaking fixes #585

Merged
merged 13 commits into from
Oct 17, 2017

Conversation

arifogel
Copy link
Member

@arifogel arifogel commented Oct 16, 2017

  • allows convergence in certain cases where no unique fixed point exists
  • fixes to BGP tie-breaking
  • fix VirtualRouter instantiation arguments in some tests
  • redo BGP debugging settings to allow finely-tuned recovery, use sane defaults

@arifogel arifogel requested review from dhalperi and removed request for dhalperi October 16, 2017 06:55
@arifogel arifogel changed the title bdp oscillation recovery mechanism bdp oscillation recovery mechanism (not ready) Oct 16, 2017
- allows convergence in certain cases where no unique fixed point exists
- clean up bdp debugging settings and references therof
- fix switched start/end iterations passed to handleOscillation
- add setting to limit max oscillation recovery attempts
- re-add BdpOscillationException and associated test
- re-add bdp iteration debugging information when exception is thrown
- record and dump iteration hash codes for each recovery attempt
@arifogel arifogel changed the title bdp oscillation recovery mechanism (not ready) bdp oscillation recovery mechanism with tie-breaking fixes Oct 17, 2017
Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

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

Some basic thoughts. Suggest @progwriter does another readthrough with an eye towards the tests (which he probably understands better at this junction).

vr._prevOspfExternalType2Rib = vr._ospfExternalType2Rib;
vr._ospfExternalType2Rib = new OspfExternalType2Rib(vr);

vr._prevBgpRib = vr._bgpMultipathRib;
Copy link
Member

Choose a reason for hiding this comment

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

should this be named _prevBgpMultipathRib?

vr._bgpMultipathRib = new BgpMultipathRib(vr);

vr._prevBgpBestPathRib = vr._bgpBestPathRib;
vr._prevBgpBestPathRib._prev = null;
Copy link
Member

Choose a reason for hiding this comment

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

add comment: BestPathRibs save a pointer to the previous RIB in order to implement oldest-route-wins. Once a RIB moves from the "current" RIB to the "previous" RIB, null out its "previous" RIB to not keep full history of RIBs and enable GC.

Consider whether the nulling logic has a better place (e.g., in the importRib function, .... or somewhere else.)

vr._ibgpBestPathRib = new BgpBestPathRib(vr, vr._prevIbgpBestPathRib);
vr.importRib(vr._ibgpBestPathRib, vr._baseIbgpRib);

vr._prevIbgpRib = vr._ibgpMultipathRib;
Copy link
Member

Choose a reason for hiding this comment

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

same Q re name of prev RIB.

@@ -309,12 +759,14 @@ private void computeFibs(Map<String, Node> nodes) {
});
}

private void computeFixedPoint(
private boolean computeFixedPoint(
Copy link
Member

Choose a reason for hiding this comment

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

what's the return value? (javadoc)

@@ -264,6 +270,43 @@ public boolean computeInterAreaSummaries() {
return changed;
}

/**
* Whether or not a given remote neighbor is allowed to advertise to this neighbor this iteration.
* Lexicographically-lower neighbors are allowed to advertise in odd iterations, while
Copy link
Member

Choose a reason for hiding this comment

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

you say this comment is wrong. allowed vs priority.

* @return Whether or not a given remote neighbor is allowed to advertise to this neighbor this
* iteration.
*/
private boolean hasAdvertisementPriority(
Copy link
Member

Choose a reason for hiding this comment

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

consider renaming function something like hasAdvPriorityDuringRecovery?

setDefaultProperty(BfConsts.ARG_BDP_DEBUG_MAX_RECORDED_ITERATIONS, 12);
setDefaultProperty(BfConsts.ARG_BDP_DEBUG_REPEAT_ITERATIONS, false);
setDefaultProperty(BfConsts.ARG_BDP_DETAIL, false);
setDefaultProperty(BfConsts.ARG_BDP_MAX_OSCILLATION_RECOVERY_ATTEMPTS, 1);
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest making this default to 0 until we have more experience with recovery. Esp as we think we've fixed existing oscillation bugs in other ways.

oscillatingPrefixes,
neighbor,
remoteBgpNeighbor)) {
synchronized (markedPrefixes) {
Copy link
Member

Choose a reason for hiding this comment

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

was wondering if we should move the synchronization into the markPrefix function.

@arifogel arifogel merged commit f6572b0 into master Oct 17, 2017
@arifogel arifogel deleted the ari-oscillation-repair branch October 17, 2017 19:11
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.

None yet

3 participants