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

[common API] Check for is container 'running' rather than 'exists' #2980

Merged
merged 2 commits into from
Feb 12, 2021

Conversation

smaheshm
Copy link
Contributor

@smaheshm smaheshm commented Feb 12, 2021

Summary:
The API "is_container_present" uses incorrect docker query to check if container is present. Fixed the docker command.

Type of change

Bug fix

  • [x ] Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Fix the bug where after downloading syncd rpc, syncd might still end up with old container.

How did you do it?

fix the docker command

How did you verify/test it?

After running swap syncd fixture:

admin@svcstr-nmasic-acs-1:~$ docker images
REPOSITORY                                               TAG                 IMAGE ID            CREATED             SIZE
acs-repo.corp.microsoft.com:5000/docker-syncd-brcm-rpc   20191130.58         0e4bcff2eb9c        5 weeks ago         683MB
docker-syncd-brcm                                        latest              0e4bcff2eb9c        5 weeks ago         683MB
docker-snmp-sv2                                          20191130.58         46de4ef67f1f        5 weeks ago         348MB
.
.

admin@svcstr-nmasic-acs-1:~$ docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS               NAMES
365b48aba2a3        docker-syncd-brcm:latest          "/usr/bin/supervisord"   3 minutes ago       Up 3 minutes                            syncd3
b30ddc269212        docker-syncd-brcm:latest          "/usr/bin/supervisord"   3 minutes ago       Up 3 minutes                            syncd4
b28dbfac3a6d        docker-syncd-brcm:latest          "/usr/bin/supervisord"   3 minutes ago       Up 3 minutes                            syncd2

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@smaheshm smaheshm requested a review from a team as a code owner February 12, 2021 00:05
@smaheshm smaheshm requested a review from daall February 12, 2021 00:06
@smaheshm smaheshm changed the title [common API] Fix "is container exists" API [common API] Check for is container 'running' rather than 'exists' Feb 12, 2021
@smaheshm smaheshm merged commit e1d9265 into sonic-net:master Feb 12, 2021
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