-
Notifications
You must be signed in to change notification settings - Fork 50
fix for issue NewValidation: CSCwp95515 - Policydist crash-loop on upgrade if configpushShardCont headTx is non-zero while tailTx is zero #253 #260
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
Merged
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4a2940e
fix for issue NewValidation: CSCwp95515 - Policydist crash-loop on up…
jeestr4d 1098b6c
Welkin issue 245 (#263)
welkinhe 69da617
Add ISIS DTEP Check (#247)
joelebla 3f0cf6c
bump to v2.6.0
monrog2 d14a798
PUV updates (#254)
monrog2 f69d8c0
bump to v3.0.0
monrog2 fe09e86
fix for issue NewValidation: CSCwp95515 - Policydist crash-loop on up…
jeestr4d b1d14e1
testchange
jeestr4d 8cce3d8
changes based on version3
jeestr4d bc70cfe
merge master
monrog2 3ddd729
logic + pytest cleanup
monrog2 2aab5dc
changed the query and content of pos file to match with bug coditions.
jeestr4d 423d29f
fix query + cleanup docs
monrog2 d42fa12
title consistency
monrog2 5b3767c
fix doc link
monrog2 bdcfcfa
merge master
monrog2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| [ | ||
| { | ||
| "configpushShardCont": { | ||
| "attributes": { | ||
| "childAction": "", | ||
| "dn": "configpush/sh-22", | ||
| "headTx": "576460752318322171", | ||
| "lcOwn": "local", | ||
| "modTs": "2025-06-28T21:32:58.754+00:00", | ||
| "shard": "2", | ||
| "status": "", | ||
| "tailTx": "0" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "configpushShardCont": { | ||
| "attributes": { | ||
| "childAction": "", | ||
| "dn": "configpush/sh-31", | ||
| "headTx": "516460756318314171", | ||
| "lcOwn": "local", | ||
| "modTs": "2025-06-23T18:12:06.867+00:00", | ||
| "shard": "3", | ||
| "status": "", | ||
| "tailTx": "0" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "configpushShardCont": { | ||
| "attributes": { | ||
| "childAction": "", | ||
| "dn": "configpush/sh-2", | ||
| "headTx": "0", | ||
| "lcOwn": "local", | ||
| "modTs": "2025-06-28T21:32:58.754+00:00", | ||
| "shard": "2", | ||
| "status": "", | ||
| "tailTx": "576460752318322171" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "configpushShardCont": { | ||
| "attributes": { | ||
| "childAction": "", | ||
| "dn": "configpush/sh-3", | ||
| "headTx": "0", | ||
| "lcOwn": "local", | ||
| "modTs": "2025-06-23T18:12:06.867+00:00", | ||
| "shard": "3", | ||
| "status": "", | ||
| "tailTx": "516460756318314171" | ||
| } | ||
| } | ||
| } | ||
| ] |
56 changes: 56 additions & 0 deletions
56
tests/configpush_shard_check/test_configpush_shard_check.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import os | ||
| import pytest | ||
| import logging | ||
| import importlib | ||
| from helpers.utils import read_data | ||
|
|
||
| script = importlib.import_module("aci-preupgrade-validation-script") | ||
|
|
||
| log = logging.getLogger(__name__) | ||
| dir = os.path.dirname(os.path.abspath(__file__)) | ||
|
|
||
| # icurl queries | ||
| configpushShardCont_api = 'configpushShardCont.json' | ||
| configpushShardCont_api += '?query-target-filter=or(ne(configpushShardCont.tailTx,"0"),ne(configpushShardCont.headTx,"0"))' | ||
|
|
||
| @pytest.mark.parametrize( | ||
| "icurl_outputs, tversion, expected_result", | ||
| [ | ||
| # tversion not given | ||
| ( | ||
| {configpushShardCont_api: []}, | ||
| None, | ||
| script.MANUAL, | ||
| ), | ||
| # Non-fixed Versions | ||
| ( | ||
| # affected tversion, configpushShardCont_api has non-zero headTx / tailTx | ||
| {configpushShardCont_api: read_data(dir, "configpushShardCont_pos.json")}, | ||
| "6.0(3a)", | ||
| script.FAIL_O, | ||
| ), | ||
| ( | ||
| # affected tversion, all configpushShardCont_api tx are 0 | ||
| {configpushShardCont_api: []}, | ||
| "5.2(6a)", | ||
| script.PASS, | ||
| ), | ||
| # Fixed Versions | ||
| ( | ||
| # non-affected tversion, configpushShardCont_api has non-zero headTx / tailTx | ||
| {configpushShardCont_api: read_data(dir, "configpushShardCont_pos.json")}, | ||
| "6.1(6b)", | ||
| script.NA, | ||
| ), | ||
| ( | ||
| # non-affected tversion, all configpushShardCont_api tx are 0 | ||
| {configpushShardCont_api: []}, | ||
| "6.1(4b)", | ||
| script.NA, | ||
| ), | ||
| ], | ||
| ) | ||
| def test_logic(mock_icurl, tversion, expected_result): | ||
| tversion = script.AciVersion(tversion) if tversion else None | ||
| result = script.configpush_shard_check(1, 1, tversion) | ||
| assert result == expected_result |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If both scenarios to be covered, title must change