RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#87
RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#87
Conversation
There was a problem hiding this comment.
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.
71ea196 to
ca9e6e3
Compare
ca9e6e3 to
6e917fd
Compare
There was a problem hiding this comment.
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.
6e917fd to
728cfd4
Compare
|
|
||
| echo_t "[DHCP Manager PSM Check] Running the script to check psm records" >> $LOG_FILE | ||
|
|
||
| virtifcount=$(psmcli get dmsb.wanmanager.if.1.VirtualInterfaceifcount) |
There was a problem hiding this comment.
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
728cfd4 to
0ea162c
Compare
There was a problem hiding this comment.
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.
0ea162c to
2c362ab
Compare
|
b'## Copyright scan failure |
| # If not stated otherwise in this file or this component's LICENSE | ||
| # file the following copyright and licenses apply: | ||
| # | ||
| # Copyright 2024 Deutsche Telekom AG. |
There was a problem hiding this comment.
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
2c362ab to
6b7d9b0
Compare
There was a problem hiding this comment.
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; } |
There was a problem hiding this comment.
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.
| [ "$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 |
…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
6b7d9b0 to
b0fd464
Compare
…rio.