Skip to content

Fix for issue #199 [BUG] vPC pair destroy/deletion fails #200

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

akabhask
Copy link
Collaborator

@akabhask akabhask commented Jun 4, 2025

Issue:

Vpc pair get is not part of a single fabric; it is across fabrics. If we delete the only vpc pair in one fabric, the get command would still return vpc pair info if it is present in other fabrics. During deletion, we retrieve vpc pair info to verify if the vpc pair has been deleted properly. There is a logic mismatch in this case, which is causing the delete operation to fail.

Fix:
Check if vpc pair given in config is not seen in vpc pair get after delete.

Added cases to acceptance testing.

@akabhask akabhask requested a review from mdmohan June 4, 2025 18:08
@akabhask akabhask force-pushed the fix_for_vpc_pair_delete_failing branch from 1d9f3fa to a28ef5e Compare June 4, 2025 18:11
@akabhask akabhask self-assigned this Jun 5, 2025
@akabhask akabhask force-pushed the fix_for_vpc_pair_delete_failing branch 3 times, most recently from 21cb421 to 283d357 Compare June 13, 2025 09:32
tflog.Error(ctx, "RscDeleteVpcPair: Failed to get vPC Pair after delete")
dg.AddError("Failed to get vPC Pair after delete", fmt.Sprintf("Error %v", err))
if err != nil && err.Error() != ErrVpcPairNotFound {
tflog.Error(ctx, "RscDeleteVpcPair: Failed to get vPC Pair data after delete")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This error is not clear - err not "Not Found" - what can it be?
Say Deletion failed - give the error details

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually confusing condition.
Pls break it down:

error() == Not_Found => Good return ok may be
else { Error in delete}

@akabhask akabhask force-pushed the fix_for_vpc_pair_delete_failing branch 4 times, most recently from e440763 to df7266c Compare June 27, 2025 11:46
@akabhask akabhask force-pushed the fix_for_vpc_pair_delete_failing branch from df7266c to 7a86c5f Compare June 27, 2025 12:29
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.

2 participants