Fix vPC peering default payload#801
Open
dacasti2mx wants to merge 4 commits into
Open
Conversation
* start of refactor * vpc working * split vrfs and networks * add deploy param to create vrfs and networks workflow * comment out vrfs and networks deploy param in create workflow * updates for vrfs and networks functionality * refactor deploy * enable create pipeline for policy * updates for tags and remove * refactor to abstract objs * Add update hostname pipeline step * initial updates for tor * modify action plugin executor * update create resources * update config save for mcfg * many updates - renames, tor, switch deploy, etc * close gaps on missing functionality for manual allocation and unmanaging policy * fix tag bug with tors and update data model check flag * cleanup and refactor imports * rename objects to resources * add banner for pipeline task to know where execution is in create and remove * update remove for ints, vrf, networks when diff run disabled * optimize config save runs * update resources * update display printing * updates for msd resources * updates for msd * update role tag issue * enable ebgp * update color * remove meta end play * Fix remove when config list empty with state overridden * Diff Run Fixes * Update ebgp fabric * update deferred msite overlay data render * update create and remove resources yaml * Update create_resources.yml * updates for fabric links * update data model check for ibgp vxlan * update for policy and fabric links * clean up lint * update vrf and network removal * fixes to vrfs and networks * fix for child fabric removal * update config save for fabric * adjust runtime status msgs * update vrf loopback attachment to execute only if valid loopback or freeform * update changed status check for vrf loopback attach * update msd and mcfg vrf loopback templates * update ebgp and bring in mcfg * update change flag for config save tasks * resolve remove for links and update data model guard for inventory config save * updates for deferred msd and mcfg overlay processing * enable edge connections * enable edge connections * Update existing_links_check.py (netascode#779) * updates for msite diff run * updates for mcfg * comment out config save request debugs * Refactor skip validation fabric (netascode#780) * Update pipeline_base.py Add Skip_validation for ISN fabric * Update ndfc_executor.py add skip_validation flag for dcnm_fabric * Update pipeline_base.py add use case for external fabric * Update pipeline_base.py add eBGP_VXLAN use case * Update create_resources.yml * Update pipeline_base.py * Update pipeline_base.py * Update ndfc_executor.py * updates to fabric deployer * add display in deployer * Improve role validate performance (netascode#789) * Improve role validate performance * Improve mark stage complete tasks * Build resources performance improvements * resolve lint & sanity errors * Update ndfc_vpc_domain_id_resource.j2 (netascode#792) * comment out unused discovery tasks * Refactor var name for underlay ip / bgw anycast (netascode#793) * Update ndfc_underlay_ip_address.j2 * Update ndfc_bgw_anycast_vip.j2 * Update create_resources.yml * Bulk Update Switch Hostname Policy (netascode#795) * Bulk API for Hostname Fabric Policy Get * Fix Sanity * Fix Pep8 * Diff underlay ip address (netascode#773) * Update create_resources.yml * Update manage_resources.py * Create underlay_ip_manual_allocation_filter.py * Update create_resources.yml * Update manage_resources.py * Update manage_resources.py * Update underlay_ip_manual_allocation_filter.py * Address PR netascode#773 review comments: single-pass optimization, remove Tier 3 fallback, fix verbosity, remove dead code - Merge extract/filter/index into single-pass loop (review comment netascode#1) - Move pools list logging from -vv to -vvv (review comment netascode#2) - Remove Tier 3 pool+resource fallback, keep two-tier only (review comment netascode#3) - Remove unused underlay_ip_audit_pools and underlay_ip_audit_scope_filter (review comment netascode#4) Note: After dcnm_resource_manager updates pool allocations, a Recalculate and Deploy is required for changes to be applied to device configuration. * fix lint errors * Update main.yml Enable CI tests on refactor_collection. Remove before merge to develop * Refactor - enhance diff controller links (netascode#794) * Update manage_resources.py * Move fabric links profile comparison into existing_links_check - Move value-level profile comparison from manage_resources.py prefilter into existing_links_check.py during endpoint matching (single pass) - Add _link_profile_changed() method with forward check (desired vs controller) and reverse check (field removal detection for peer1_cmds/peer2_cmds) - Remove redundant second-pass prefilter from manage_resources.py - Both YAML and Python pipeline callers now benefit from profile filtering Addresses review comments on PR netascode#794. * Update manage_resources.py * Refactor - Diff policies (netascode#784) * Update diff_compare.py for policy * Update manage_resources.py add remote policies diff * Update create_resources.yml * Update resource_types.yml * Update manage_resources.py * Update diff_compare.py * Update manage_resources.py * Address PR netascode#784 review: clean policy diff, resolve merge conflict, add use_desc_as_key - Remove extra }, in diff_compare.py (review comment netascode#1) - Rewrite manage_resources.py policy diff to use per-switch API (review comment netascode#2) - Remove dead code: _fetch_all_policy_pages, urlencode import, ndfc_internal_keys - Remove all DEBUG blocks from manage_resources.py and pipeline_base.py - Resolve merge conflict: integrate _underlay_ip_remote_diff from upstream - Add use_desc_as_key=True for dcnm_policy in ndfc_executor.py (fixes changed=False bug) * Update diff_compare.py * Update manage_resources.py * Fix E131 pep8: use parenthesized ternaries for hanging indent * Fix MCFG Fabric Handling (netascode#798) * Fix MCFG Fabric Handling * Fix Lint * remove docstring line --------- Co-authored-by: mwiebe <mwiebe@cisco.com> Co-authored-by: Charly Coueffe <75327499+ccoueffe@users.noreply.github.com> Co-authored-by: Akshayanat C S <83760554+AKDRG@users.noreply.github.com>
* Release Prep Changes * Nest bullet points in changelog * Nested bullet points and formatting * Nested bullet points and formatting * Update readme * changelog updates
Always render `useVirtualPeerlink` in `ndfc_vpc_peering_pairs.j2`, defaulting to `false` when `fabric_peering` is omitted. Previously, omitted `fabric_peering` caused the field to be dropped from the generated payload. In a fresh fabric, this can result in the vPC pair not being created/recognized by NDFC; later `dcnm_interface` fails when creating vPC interfaces with: Switch '<ip>' is not part of VPC pair, but given I/F 'vpc<N>' is of type VPC This aligns the template with the documented `dcnm_vpc_pair` default and existing validation behavior, both of which treat omitted `fabric_peering` as `false`.
ba8e2ee to
43e9e75
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Always render
useVirtualPeerlinkinroles/dtc/common/templates/ndfc_vpc/ndfc_vpc_peering_pairs.j2, defaulting tofalsewhenfabric_peeringis omitted from avpc_peersentry.Problem
When
fabric_peeringis not set on avpc_peersentry, the template currently skips theuseVirtualPeerlinkfield entirely:Against a freshly-built fabric, the resulting
dcnm_vpc_paircall has been observed to receive the pair as input but the artifact does not show a POST for it (the pair is absent fromresult.diff[0].mergedand fromresult.response). A subsequentdcnm_interfacestep then fails when it tries to create a vPC port-channel on a peer in that pair:Full evidence (artifact JSON snippets and reproducer data model) is in the linked issue.
Fix
useVirtualPeerlink: {{ vpc_peers_pair.fabric_peering | default(false) }}This aligns the rendered payload with:
dcnm_vpc_pairdefault —useVirtualPeerlink: { type: bool, default: false }.roles/validate/files/rules/ibgp_vxlan/208_manual_ipaddress_allocation.py, which already usespeer.get("fabric_peering", False).nac-fabric1, which setsfabric_peering: falseexplicitly and works end-to-end.Scope
roles/dtc/common/templates/ndfc_vpc/ndfc_vpc_peering_pairs.j2.fabric_peering(rendering for those is bit-identical).Verification
Manual Jinja render against three cases (
fabric_peering: true,fabric_peering: false, omitted):The third case is the fix: previously, the
useVirtualPeerlinkline would not be emitted at all.Related issue
Closes #800.