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

[master][chassis][multiasic] Linecard Asic database# start failed due to sonic-db-cli -n asic0 PING failed #18395

Closed
mlok-nokia opened this issue Mar 19, 2024 · 0 comments · Fixed by sonic-net/sonic-swss-common#866
Assignees
Labels
Triaged this issue has been triaged

Comments

@mlok-nokia
Copy link
Contributor

Description

On Master, Linecard Asic database# failed to start due to the sonic-db-cli -n asic# PING failed. It looks like sonic-db-cli behavior has been changed. soinc-db-cli -n asic0 PING failed which results in the /usr/bin/database.sh wait forever in the postStartAction(). The following code: Example for asic0 --- "$SONIC_DB_CLI PING" = "sonci-db-cli -n asic0 PING"

until [[ ($(docker exec -i database$DEV pgrep -x -c supervisord) -gt 0) && ($($SONIC_DB_CLI PING | grep -c PONG) -gt 0) &&
                 ($(docker exec -i database$DEV sonic-db-cli PING | grep -c PONG) -gt 0) ]]; do
          sleep 1;
        done

Steps to reproduce the issue:

  1. Boot up a multasic chassis, linecard Asic database# failed to start and stay in a loop

Describe the results you received:

asic database# failed to start

Describe the results you expected:

asic database# should start without any error.

Output of show version:

Issue exists in the latest Master branch

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@rlhui rlhui added the Triaged this issue has been triaged label Mar 20, 2024
qiluo-msft pushed a commit to sonic-net/sonic-swss-common that referenced this issue Mar 29, 2024
…o start up in LC (#866)

### Why I did it
On multiasic LC,  instance database# failed to start due to the sonic-db-cli -n asic# PING failed.  soinc-db-cli -n asic0 PING failed which results in the /usr/bin/database.sh wait forever in the postStartAction(). Fixes sonic-net/sonic-buildimage#18395

#### How I did it
On multiasic LC,  sonic-db-cli -n asic0 PING has been fixed/changed by PR   #797.  But when execute "sonic-db-cli -n asic0 PING" command, it will fail to ping the CHASSIS_STATE_DB and CHASSIS_APP_DB in the database-chassis on the supervisor card.  The existing code uses db_name to check against 
 "redis_chassis.server" identify if it is for database-chassis is wrong.  This commit uses  variable "host" instead of db_name.  This will fix the issue.

#### How to verify it
1. Boot up the chassis, execuet " docker ps" to verify the instance database0 and database1 containers are up.
```
admin@ixre-egl-board40:~$ docker ps 
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS          PORTS     NAMES
d2dc397d420a   docker-macsec:latest                 "/usr/local/bin/supe?"   34 minutes ago   Up 34 minutes             macsec
fd60a96fcb67   docker-snmp:latest                   "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                snmp
168cf9ae286d   docker-platform-monitor:latest       "/usr/bin/docker_ini?"   6 hours ago      Up 6 hours                pmon
9f1c69112fdb   docker-sonic-mgmt-framework:latest   "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                mgmt-framework
01cb833ab7b6   docker-lldp:latest                   "/usr/bin/docker-lld?"   6 hours ago      Up 6 hours                lldp1
ec6a965669eb   docker-lldp:latest                   "/usr/bin/docker-lld?"   6 hours ago      Up 6 hours                lldp0
16dd25d29d7b   docker-lldp:latest                   "/usr/bin/docker-lld?"   6 hours ago      Up 6 hours                lldp
46ce9b823873   docker-sonic-gnmi:latest             "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                gnmi
5f36560338e0   docker-fpm-frr:latest                "/usr/bin/docker_ini?"   6 hours ago      Up 6 hours                bgp1
3b1abe66e7a1   docker-fpm-frr:latest                "/usr/bin/docker_ini?"   6 hours ago      Up 6 hours                bgp0
85cd5b6cdd05   docker-router-advertiser:latest      "/usr/bin/docker-ini?"   6 hours ago      Up 6 hours                radv
ca8f79f69122   docker-teamd:latest                  "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                teamd0
5fe4b55ac62e   docker-syncd-brcm-dnx:latest         "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                syncd1
81b6ef493818   docker-syncd-brcm-dnx:latest         "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                syncd0
4e32dd244b65   docker-teamd:latest                  "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                teamd1
4f83bee7ffba   docker-orchagent:latest              "/usr/bin/docker-ini?"   6 hours ago      Up 6 hours                swss0
4e2c047effa8   docker-orchagent:latest              "/usr/bin/docker-ini?"   6 hours ago      Up 6 hours                swss1
0b6d7e742c0f   docker-eventd:latest                 "/usr/local/bin/supe?"   6 hours ago      Up 6 hours                eventd
5c77bae968e0   docker-database:latest               "/usr/local/bin/dock?"   6 hours ago      Up 6 hours                database1
d4616de64435   docker-database:latest               "/usr/local/bin/dock?"   6 hours ago      Up 6 hours                database0
27403c8acffa   docker-database:latest               "/usr/local/bin/dock?"   6 hours ago      Up 6 hours                database
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
Archived in project
2 participants