Skip to content

Comments

RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#87

Open
vpriya623 wants to merge 1 commit intodevelopfrom
feature/RDKB-63270
Open

RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#87
vpriya623 wants to merge 1 commit intodevelopfrom
feature/RDKB-63270

Conversation

@vpriya623
Copy link

…rio.

Added a line in RdkWanManager.service file to check for the script before
to execute

@vpriya623 vpriya623 requested a review from a team as a code owner February 5, 2026 17:16
Copilot AI review requested due to automatic review settings February 5, 2026 17:16
@vpriya623 vpriya623 requested a review from a team as a code owner February 5, 2026 17:16
@vpriya623 vpriya623 requested a review from hpatel006c February 5, 2026 17:17
@vpriya623 vpriya623 requested a review from aadhithan01 February 5, 2026 17:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for testing migration scenarios from non-DHCP-manager to DHCP-manager configurations by conditionally executing a PSM value check script during the WAN Manager service startup.

Changes:

  • Added a pre-start check in RdkWanManager.service that conditionally executes DHCPMgrPSMValueCheck.sh if the script exists and is executable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 16, 2026 10:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


echo_t "[DHCP Manager PSM Check] Running the script to check psm records" >> $LOG_FILE

virtifcount=$(psmcli get dmsb.wanmanager.if.1.VirtualInterfaceifcount)
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be done for all interfaces (and their virtual interfaces). The current script only operates on the first interface, which means it won’t address scenarios such as a second WAN interface (WANoE).
We can keep the virtual interface count hardcoded to 1 for now (since we don’t currently have devices with multiple virtual interfaces), but the script must loop through all interfaces.

Please check dmsb.wanmanager.wan.interfacecount and iterate all dmsb.wanmanager.if.%d

Copy link
Author

Choose a reason for hiding this comment

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

Done the changes

Copilot AI review requested due to automatic review settings February 20, 2026 13:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rdkcmf-jenkins
Copy link
Contributor

b'## Copyright scan failure
Commit: 2c362ab
Report detail: https://gist.github.com/rdkcmf-jenkins/e5660598f95252e36437cec3947945ba'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/common-library/87/rdkb/components/opensource/ccsp/CcspCommonLibrary

  • Commit: 2c362ab

Report detail: gist'

# If not stated otherwise in this file or this component's LICENSE
# file the following copyright and licenses apply:
#
# Copyright 2024 Deutsche Telekom AG.

Choose a reason for hiding this comment

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

Hi @vpriya623 : If this file is correctly attributes to DT, please append a credit to top-level NOTICE as follows:

Copyright 2024 Deutsche Telekom AG.
Licensed under the Apache License, Version 2.0

Otherwise, use Comcast (or RDK if written by RDK)

Thank you

Copilot AI review requested due to automatic review settings February 20, 2026 18:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

exit 1
fi

[ "$wanifcount" -lt 1 ] || [ "$wanifcount" -gt 10 ] && { echo_t "[DHCP Manager PSM Check] wan interface count is out of range" >> $LOG_FILE; exit 1; }
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The range validation logic has a subtle issue. The condition [ "$wanifcount" -lt 1 ] || [ "$wanifcount" -gt 10 ] will exit if the count is less than 1 OR greater than 10, which is correct. However, the use of || with && in a single line can be confusing. Consider rewriting this for clarity as: if [ "$wanifcount" -lt 1 ] || [ "$wanifcount" -gt 10 ]; then echo_t "[DHCP Manager PSM Check] wan interface count is out of range" >> $LOG_FILE; exit 1; fi

This makes the logic more explicit and easier to understand.

Suggested change
[ "$wanifcount" -lt 1 ] || [ "$wanifcount" -gt 10 ] && { echo_t "[DHCP Manager PSM Check] wan interface count is out of range" >> $LOG_FILE; exit 1; }
if [ "$wanifcount" -lt 1 ] || [ "$wanifcount" -gt 10 ]; then
echo_t "[DHCP Manager PSM Check] wan interface count is out of range" >> $LOG_FILE
exit 1
fi

Copilot uses AI. Check for mistakes.
…rio.

    Added new script that checks for PSM records of dhcpv4 and dhcpv6
    virtual interface of respective WAN actual interface and updates with
    proper values for the empty records
    Added a line in RdkWanManager.service file to check for the script before
    to execute
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.

4 participants