Skip to content

inventory_mac: Skip IP assignment if already configured#245

Open
abhilashraju wants to merge 1 commit into
ibm-openbmc:1210from
abhilashraju:assinging_one_time_ip
Open

inventory_mac: Skip IP assignment if already configured#245
abhilashraju wants to merge 1 commit into
ibm-openbmc:1210from
abhilashraju:assinging_one_time_ip

Conversation

@abhilashraju
Copy link
Copy Markdown

Add check to prevent unnecessary IP deletion and reassignment when the target IP address and prefix length are already configured on the network interface. This optimization avoids disrupting existing network connections and reduces unnecessary operations.

Changes:

  • Check if IP address and prefix are already assigned before deletion
  • Skip deleteAll() and ip() calls if IP already exists
  • Add informative logging when skipping assignment
  • Maintain ipAssigned flag for both new and existing IP cases

This prevents network disruption when the same IP configuration is applied multiple times to the same interface.

Add check to prevent unnecessary IP deletion and reassignment when
the target IP address and prefix length are already configured on
the network interface. This optimization avoids disrupting existing
network connections and reduces unnecessary operations.

Changes:
- Check if IP address and prefix are already assigned before deletion
- Skip deleteAll() and ip() calls if IP already exists
- Add informative logging when skipping assignment
- Maintain ipAssigned flag for both new and existing IP cases

This prevents network disruption when the same IP configuration is
applied multiple times to the same interface.

Signed-off-by: Abhilash Raju <abhilash.kollam@gmail.com>
@jenkins-openbmc-ibm
Copy link
Copy Markdown

Can one of the admins verify this patch?

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