-
Notifications
You must be signed in to change notification settings - Fork 47
RDKB-63899 : Zebra restart marker observed in selfheal #296
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
base: develop
Are you sure you want to change the base?
Changes from all commits
ff3d690
2a9c85a
ad348e7
22e8b07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,7 +162,9 @@ case "$1" in | |
| fi | ||
| ;; | ||
| ipv4_*-status) | ||
| echo_t "LAN HANDLER : Received $1 event with status $2" | ||
| if [ x"up" = x${2} ]; then | ||
| echo_t "LAN HANDLER : Handling LAN up event for instance ${1}" | ||
| INST=${1#*_} | ||
| INST=${INST%-*} | ||
| RG_MODE=`syscfg get last_erouter_mode` | ||
|
|
@@ -172,7 +174,6 @@ case "$1" in | |
| SYSCFG_last_erouter_mode=`syscfg get last_erouter_mode` | ||
| echo "lan_handler.sh last_erouter_mode: $SYSCFG_last_erouter_mode" | ||
|
|
||
|
|
||
| if [ "1" = "$SYSCFG_last_erouter_mode" ]; then | ||
| echo 0 > /proc/sys/net/ipv6/conf/$LAN_IFNAME/autoconf # Do not do SLAAC | ||
| else | ||
|
|
@@ -184,12 +185,14 @@ case "$1" in | |
|
|
||
|
|
||
| if [ xbrlan0 = x${LAN_IFNAME} ]; then | ||
| echo_t "LAN HANDLER : Handling LAN up event for brlan0, configuring IPv6 address if needed" | ||
| SYSEVT_lan_ipaddr_v6_prev=`sysevent get lan_ipaddr_v6_prev` | ||
|
|
||
| if [ "1" = "$(sysevent get ula_ipv6_enabled)" ] && [ "1" != "$(syscfg get Device_Mode)" ]; then | ||
| SYSEVT_lan_ipaddr_v6=$(sysevent get ipv6_prefix_ula | cut -d "/" -f 1) | ||
| SYSEVT_lan_ipaddr_v6=${SYSEVT_lan_ipaddr_v6}1 | ||
| else | ||
| echo_t "LAN HANDLER : Using global IPv6 address for LAN" | ||
| SYSEVT_lan_ipaddr_v6=`sysevent get lan_ipaddr_v6` | ||
| fi | ||
| SYSEVT_lan_prefix_v6=`sysevent get lan_prefix_v6` | ||
|
|
@@ -206,7 +209,7 @@ case "$1" in | |
| sysevent set current_lan_ipaddr `sysevent get ipv4_${INST}-ipv4addr` | ||
|
|
||
| if [ "$RG_MODE" = "2" -a x"ready" != x`sysevent get start-misc` ]; then | ||
| echo_t "LAN HANDLER : Triggering DHCP server using LAN status based on RG_MODE:2" | ||
| echo_t "LAN HANDLER : Triggering DHCP server using LAN status based on RG_MODE:2" | ||
| sysevent set lan-status started | ||
| firewall | ||
| if [ ! -f "$POSTD_START_FILE" ]; | ||
|
|
@@ -253,8 +256,10 @@ case "$1" in | |
| fi | ||
|
|
||
| elif [ x"ready" != x`sysevent get start-misc` ] && ( [ "$MANUFACTURE" = "Technicolor" ] || [ "$MANUFACTURE" = "Sercomm" ] ) ; then | ||
| echo_t "LAN HANDLER : box is from Technicolor or Sercomm, setting lan-status to started" | ||
| #TCH XBx/TCCBR based startup post.d scripts which includes Firewall restart and dhcp start. | ||
| sysevent set lan-status started | ||
| echo_t "LAN HANDLER : lan status set to started" | ||
| firewall | ||
| if [ ! -f "$POSTD_START_FILE" ]; | ||
| then | ||
|
|
@@ -264,6 +269,7 @@ case "$1" in | |
| else | ||
| echo_t "LAN HANDLER : Triggering DHCP server using LAN status" | ||
| sysevent set lan-status started | ||
| echo_t "LAN HANDLER : lan status set to started" | ||
| echo_t "LAN HANDLER : Triggering RDKB_FIREWALL_RESTART" | ||
| t2CountNotify "RF_INFO_RDKB_FIREWALL_RESTART" | ||
| sysevent set firewall-restart | ||
|
|
@@ -282,11 +288,11 @@ case "$1" in | |
| #disable dnsmasq when ipv6 only mode and DSlite is disabled | ||
| DSLITE_ENABLED=`sysevent get dslite_enabled` | ||
| DHCP_PROGRESS=`sysevent get dhcp_server-progress` | ||
| echo_t "LAN HANDLER : DHCP configuration status got is : $DHCP_PROGRESS" | ||
| echo_t "LAN HANDLER : DHCP configuration status got is : $DHCP_PROGRESS" | ||
| if [ "2" = "$SYSCFG_last_erouter_mode" ] && [ "x1" != x$DSLITE_ENABLED ]; then | ||
| sysevent set dhcp_server-stop | ||
| elif [ "0" != "$SYSCFG_last_erouter_mode" ] && [ "$DHCP_PROGRESS" != "inprogress" ] ; then | ||
| echo_t "LAN HANDLER : Triggering dhcp start based on last erouter mode" | ||
| echo_t "LAN HANDLER : Triggering dhcp start based on last erouter mode" | ||
| sysevent set dhcp_server-start | ||
| fi | ||
|
|
||
|
|
@@ -314,6 +320,8 @@ case "$1" in | |
| sysevent set firewall-restart | ||
| if [ -e "/usr/bin/print_uptime" ]; then | ||
| /usr/bin/print_uptime "Laninit_complete" | ||
| echo_t "LAN HANDLER : Laninit_complete uptime: $(cut -d. -f1 /proc/uptime)" | ||
| echo_t "LAN HANDLER : Checking lan-status after lan init complete, lan-status = $(sysevent get lan-status)" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lan init complete will be after lan-status started , remove extra sysevent get
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this log because I observed two Laninit_complete uptime entries in the logs. In the boottime.log, the first occurrence was considered even though LAN was not started at that point, while only during the second occurrence the LAN actually gets started. This check was added to confirm the lan-status during both instances. |
||
| fi | ||
|
|
||
| uptime=$(cut -d. -f1 /proc/uptime) | ||
|
|
@@ -344,7 +352,7 @@ case "$1" in | |
| pnm-status | bring-lan) | ||
| if [ -e "/usr/bin/print_uptime" ]; then | ||
| /usr/bin/print_uptime "Lan_init_start" | ||
| fi | ||
| fi | ||
| uptime=$(cut -d. -f1 /proc/uptime) | ||
| if [ -e "/usr/bin/onboarding_log" ]; then | ||
| /usr/bin/onboarding_log "Lan_init_start:$uptime" | ||
|
|
@@ -354,7 +362,6 @@ case "$1" in | |
| if [ -z "$INST" ] | ||
| then | ||
| echo_t "THE INSTANT=$INST" | ||
| echo_t "THE INSTANT=$INST" | ||
| #(use a simpler test than this -- but Hacky, since it assumes everything we want is not XB3!!)if [ "$BOX_TYPE" = "TCCBR" ] || [ "$BOX_TYPE" = "XB6" -a "$MANUFACTURE" = "Technicolor" ] || [ "$BOX_TYPE" = "XB7" -a "$MANUFACTURE" = "Technicolor" ] ; then | ||
| if ( [ "$BOX_TYPE" != "XB3" ] && ( [ "$MANUFACTURE" = "Technicolor" ] || [ "$MANUFACTURE" = "Sercomm" ] ) ) || [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then | ||
| COUNTER=1 | ||
|
|
@@ -371,7 +378,7 @@ case "$1" in | |
| echo_t "THE COUNTER =$COUNTER" | ||
| done | ||
| else | ||
| echo_t "RDKB_SYSTEM_BOOT_UP_LOG : INST rerurned null, retrying" | ||
| echo_t "RDKB_SYSTEM_BOOT_UP_LOG : INST returned null, retrying" | ||
| INST=`psmcli get dmsb.MultiLAN.PrimaryLAN_l3net` | ||
| fi | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this comment to verify whether execution is reaching this point. This helps identify where the flow is breaking in cases where the LAN is not getting started.