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

Move BGP community and BGP extended community match-set-options back to bgp-conditions #982

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

xuqma
Copy link
Contributor

@xuqma xuqma commented Oct 24, 2023

Change Scope

  • Move match-set-options of BGP community and BGP extended community back to policy-definitions/statements/.../bgp-conditions for consistency across sets. This fixes Inconsistencies in sets - openconfig-bgp-policy.yang #518.

    The original paths will be deprecated, including:

    • /routing-policy/defined-sets/bgp-defined-sets/community-sets/community-set/config/match-set-options
    • /routing-policy/defined-sets/bgp-defined-sets/community-sets/ext-community-set/config/match-set-options
    • /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/config/community-set
    • /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/config/ext-community-set

    The new paths are:

    • /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/match-community-set/config/match-set-options
    • /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/match-ext-community-set/config/match-set-options
    • /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/match-community-set/config/community-set
    • /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/match-ext-community-set/config/ext-community-set
  • This change is backwards compatible, as we mark the old paths as deprecated.

Platform Implementations

@xuqma xuqma requested a review from a team as a code owner October 24, 2023 00:31
@OpenConfigBot
Copy link

OpenConfigBot commented Oct 24, 2023

No major YANG version changes in commit 6104d63

@dplore
Copy link
Member

dplore commented Oct 26, 2023

Added to Oct 31 OC Operators review

Added to Nov 2, 2023 OC community meeting agenda for feedback:
https://docs.google.com/document/d/11sXUF2zujhbPs_bt-RFJhh2DcIbEvnOpd9GypE-u3cc/edit

@dplore
Copy link
Member

dplore commented Dec 7, 2023

Last call for this PR, to be merged on Dec 21, 2023

Copy link
Contributor

@rszarecki rszarecki left a comment

Choose a reason for hiding this comment

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

  1. I think we shall consider this as BRAKING change. Yes, old path are not removed (yet) but deprecated. Hence not required to be supported. I can imagine compliant new implementation that supports only new style, hence fail to accept old-style policy config.
  2. Under this proposal it is possible (using deprecated) leaf write policy with dual-inversion, or even ALL (match-community-set/config/match-set-options) && INVERT (in deprecated but still legal community-set/config/match-set-options). Which creates quite fragile situation. Perhaps smart server can detect it and return Error. But still not nice possibility.
    The concern 2) would be solved if this change would be declared as breaking.
  3. This change introduce ambiguity how community+policy could be configured. It is cleare that old is deprecated, but old style is still there and would be accepted.

@xuqma
Copy link
Contributor Author

xuqma commented Dec 12, 2023

Thanks for the suggestion! I have bumped the version to 7.0.0 to mark the change as breaking. Please let me know if there are other changes we can make to better reconcile/validate the values at old/new paths.

@dplore
Copy link
Member

dplore commented Dec 13, 2023

Deprecating the old paths and adding new is part of the definition of non-breaking changes. The major version increment is not required. The only function of a 'deprecating' a leaf is notification that it will be deleted in some future, major (breaking change) release. The leaf is still required to be supported by a network operating system (NOS).

To facilitate versioning in OC/Yang, a NOS must:

  • Assert which release of OpenConfig is supported
  • Assert differences in their model by publishing additional yang files that contain Yang defined deviations and augments.
  1. Say we start with a NOS release 1.0 that supports v2.0.0 of OC without yang deviations/augments.

  2. OC release is updated to v2.1.0 with adding leaves and deprecating others.

  3. In release 1.1 of the NOS, the OC release is v2.1.0. This NOS must still support the deprecated leafs. (They are present in OC v2.1.0).
    2. If the deprecated leafs are dropped, then that must be done with a NOS published yang deviation. This would be a breaking change to OC.

  4. In release 2.0 of the NOS, the OC release supported is v3.0.0.

v3.0.0 of OC is a new major release of OC. In this scenario some deprecated leaves were deleted, creating a breaking change and need for a major version increment. The major version increment notifies consumers that it contains breaking changes in OC and code changes are to be expected to use this OC release.

In an operational environment, a configuration generation system will need to support v2.2.0 of OC and v3.0.0 of OC. It will also need to know which NOS support which version in order to generate compatible OC. In OC we are commiting to making major releases infrequently, such as once per year. See https://www.openconfig.net/docs/guides/releases/

Copy link
Contributor

@rszarecki rszarecki left a comment

Choose a reason for hiding this comment

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

Xuquma,
I do have one more concern.

Why this match os not under /conditions/bg-conditions/ as all other that are based on BGP only attributes? You introduced inconsistency this way (while fixing the other inconsistency)

I belive grouping match conditions per-protocol would greatly improve/simplife validation or policy attachment. E.g. if policy w/ bgp-condition are attached to say ISIS, server can easly spot it and generate error.

@rszarecki
Copy link
Contributor

Thanks Darren for explanation.
Hmm. Do I get it right:

  • any new (greenfield) client MUST support all deprecated path in addition to all other path.
    AND
  • any new (greenfield) server MUST support all deprecated path in addition to all other path.

Or only one of above? Which one?
Then indeed this is not breaking change. But I'm not sure it is practical for implementers perspective.

@dplore
Copy link
Member

dplore commented Dec 13, 2023

Thanks Darren for explanation. Hmm. Do I get it right:

  • any new (greenfield) client MUST support all deprecated path in addition to all other path.
    AND
  • any new (greenfield) server MUST support all deprecated path in addition to all other path.

Or only one of above? Which one? Then indeed this is not breaking change. But I'm not sure it is practical for implementers perspective.

Yes, a server/network operating system release (brand new implementation or pre-existing with upgrade) is expected to support a given release of OC, including deprecated leafs. In practice, all NOS have Yang deviations/augments as well as deviations in behavior, some of which are captured in featureprofiles.

In practice, a client / network management system must accommodate the deviations for each NOS in a given OC release, plus deal with multiple OC releases, as any operational network will always have some variation of deployed NOS releases and therefore OC releases.

@dplore
Copy link
Member

dplore commented Dec 13, 2023

Xuquma, I do have one more concern.

Why this match os not under /conditions/bg-conditions/ as all other that are based on BGP only attributes? You introduced inconsistency this way (while fixing the other inconsistency)

I belive grouping match conditions per-protocol would greatly improve/simplife validation or policy attachment. E.g. if policy w/ bgp-condition are attached to say ISIS, server can easly spot it and generate error.

@xuqma I think I agree with @rszarecki here. The refactored match-community-set container should follow the same pattern as match-as-path-set. ie:

/routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/match-as-path-set

@xuqma xuqma force-pushed the master branch 2 times, most recently from 3bce9f8 to c9be1f6 Compare December 13, 2023 18:47
@xuqma
Copy link
Contributor Author

xuqma commented Dec 13, 2023

Xuquma, I do have one more concern.
Why this match os not under /conditions/bg-conditions/ as all other that are based on BGP only attributes? You introduced inconsistency this way (while fixing the other inconsistency)
I belive grouping match conditions per-protocol would greatly improve/simplife validation or policy attachment. E.g. if policy w/ bgp-condition are attached to say ISIS, server can easly spot it and generate error.

@xuqma I think I agree with @rszarecki here. The refactored match-community-set container should follow the same pattern as match-as-path-set. ie:

/routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/match-as-path-set

Good catch! I put the wrong paths in the PR description though the actual model change moved match-community-set and match-ext-community-set under bgp-conditions. I have updated the description. Thanks for the review and apologies for the confusion.

With Darren's help, I was able to generate the model diff using pyang from this PR and confirmed that the new paths are part of bgp-conditions:

> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set/config
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set/config/community-set
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set/config/match-set-options
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set/state
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set/state/community-set
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-community-set/state/match-set-options
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set/config
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set/config/ext-community-set
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set/config/match-set-options
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set/state
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set/state/ext-community-set
> /openconfig-routing-policy:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/openconfig-bgp-policy:bgp-conditions/match-ext-community-set/state/match-set-options

I also changed the version back to 6.3.0 since this change is non-breaking per Darren's nice explanation.

Let me know if you need further info. Thanks!

@rszarecki
Copy link
Contributor

I'm good.

…to policy-definitions/statements/.../bgp-conditions
@dplore dplore merged commit 06d159b into openconfig:master Dec 22, 2023
5 checks passed
@rszarecki
Copy link
Contributor

/cpbrun

romeyod pushed a commit to romeyod/aftNextHop that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Inconsistencies in sets - openconfig-bgp-policy.yang
4 participants