-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
nxos_vlan: fix broken purge behavior (issue #57101) #57229
Merged
trishnaguha
merged 5 commits into
ansible:devel
from
chrisvanheuveln:nxos_vlan-fix-57101
Jun 4, 2019
Merged
nxos_vlan: fix broken purge behavior (issue #57101) #57229
trishnaguha
merged 5 commits into
ansible:devel
from
chrisvanheuveln:nxos_vlan-fix-57101
Jun 4, 2019
Conversation
This file contains 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
Symptoms/Analysis: - `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1. - `nxos` devices do not allow removing vlan 1 and raise a cli exception error - Previous fix ansible#55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g. - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true` - results in proper purging but vlan 4 is not created Solutions: - ignore vlan 1 when purging - remove the `not purge` check from state present logic Added additional unit tests and integration tests. Tested against all regression platforms.
ansibot
added
affects_2.9
This issue/PR affects Ansible v2.9
bug
This issue/PR relates to a bug.
cisco
Cisco technologies
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
networking
Network category
nxos
Cisco NXOS community
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
support:network
This issue/PR relates to code supported by the Ansible Network Team.
test
This PR relates to tests.
labels
May 31, 2019
The test
The test
|
ansibot
added
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
labels
May 31, 2019
mikewiebe
reviewed
May 31, 2019
ansibot
removed
the
needs_triage
Needs a first human triage before being processed.
label
May 31, 2019
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Jun 3, 2019
trishnaguha
approved these changes
Jun 4, 2019
Thanks for the fix! |
@chrisvanheuveln & @trishnaguha : Thanks 👍 |
trishnaguha
pushed a commit
to trishnaguha/ansible
that referenced
this pull request
Jun 6, 2019
…7229) * nxos_vlan: fix broken purge behavior (issue ansible#57101) Symptoms/Analysis: - `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1. - `nxos` devices do not allow removing vlan 1 and raise a cli exception error - Previous fix ansible#55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g. - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true` - results in proper purging but vlan 4 is not created Solutions: - ignore vlan 1 when purging - remove the `not purge` check from state present logic Added additional unit tests and integration tests. Tested against all regression platforms. * PEP fixes * Add agg_show_vlan_brief.txt fixture * Add warning for removing vlan 1 * change method name check (cherry picked from commit 6bb13bb)
abadger
pushed a commit
that referenced
this pull request
Jun 12, 2019
* nxos_vlan: fix broken purge behavior (issue #57101) (#57229) * nxos_vlan: fix broken purge behavior (issue #57101) Symptoms/Analysis: - `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1. - `nxos` devices do not allow removing vlan 1 and raise a cli exception error - Previous fix #55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g. - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true` - results in proper purging but vlan 4 is not created Solutions: - ignore vlan 1 when purging - remove the `not purge` check from state present logic Added additional unit tests and integration tests. Tested against all regression platforms. * PEP fixes * Add agg_show_vlan_brief.txt fixture * Add warning for removing vlan 1 * change method name check (cherry picked from commit 6bb13bb) * changelog Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.9
This issue/PR affects Ansible v2.9
bug
This issue/PR relates to a bug.
cisco
Cisco technologies
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
networking
Network category
nxos
Cisco NXOS community
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
support:network
This issue/PR relates to code supported by the Ansible Network Team.
test
This PR relates to tests.
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
Fixes #57101
Symptoms/Analysis
Problem 1:
nxos_vlan
purge: true
would fail whenpurge
was trying to delete all unspecified vlans, including vlan 1.nxos
devices do not allow removing vlan 1 and raise a cli exception errorProblem 2:
purge
was used: vlan changes specified byaggregate
were ignored; e.g.aggregate: { vlan: 4 }, purge: true
Solution
not purge
check from state present logicAdded additional unit tests and integration tests.
ISSUE TYPE
COMPONENT NAME
nxos_vlan
ADDITIONAL INFORMATION
Tested against all regression platforms:
N3K,N6K,N7K,N9K,N3K-F,N9K-F