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

Fix idempotency issue where ospfv2 module was un idempotent when set interface was set true #1137

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Girish5tri
Copy link
Member

@Girish5tri Girish5tri commented Nov 21, 2024

Description

This PR updates documentation to clarify non-idempotent behavior of set_interface parameter in cisco.ios.ios_ospfv2 module.

Problem

The module doesn't properly document that set_interface parameter is not idempotent on subsequent runs.

When configuring passive interfaces, the module was reporting changes even when the configuration remained unchanged, it was due to the set_interface parameter being not included in state comparison.

When running a playbook with set_interface multiple times:

passive_interfaces:
  interface:
    set_interface: true  # Flag only needed for initial setup

The module shows changed and triggers unnecessary commands because the playbook configuration contains set_interface: true while the running configuration doesn't (since it's only a setup flag). This mismatch causes the module to incorrectly detect a configuration difference, leading to:

changed: true
commands: ["router ospf 1"]  # Unnecessary command triggered by false change detection

FIX

Updated module documentation to clearly indicate set_interface's non-idempotent behavior:

set_interface:
  description:
    - Suppress/Un-Suppress routing updates
    - Since set_interface is not shown in running-config, idempotency won't be maintained for subsequent playbook runs.
  type: bool

Fixes: #1130

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

cisco.ios.ios_ospfv2

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.06%. Comparing base (c9841b5) to head (2500b64).
Report is 37 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1137      +/-   ##
==========================================
+ Coverage   86.90%   87.06%   +0.16%     
==========================================
  Files         193      199       +6     
  Lines       11904    12083     +179     
==========================================
+ Hits        10345    10520     +175     
- Misses       1559     1563       +4     

see 81 files with indirect coverage changes

@Girish5tri Girish5tri marked this pull request as ready for review November 28, 2024 20:47
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.

set_interface of cisco.ios.ios_ospfv2 module is un-idempotent
1 participant