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

Two issues related to sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt #21952

Open
eddieruan-alibaba opened this issue Mar 7, 2025 · 1 comment
Labels
Triaged this issue has been triaged

Comments

@eddieruan-alibaba
Copy link
Collaborator

First issue:

Due to recent sonic-net/sonic-mgmt@1628450 's change

DOCKER_SONIC_MGMT is change from original "docker-sonic-mgmt" to "docker-sonic-mgmt:latest".

This changes breaks the check in pull_sonic_mgmt_docker_image() at

https://github.com/sonic-net/sonic-mgmt/blob/master/setup-container.sh#L143
https://github.com/sonic-net/sonic-mgmt/blob/master/setup-container.sh#L146

which leads always pulling docker image from docker registry. This is the first issue.

Second Issue

But this issue expose a more serious issue how to version control this image sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt

Currently, we always use "latest" version. The above two lines check "latest" as keyword, can't really verify if it is a really latest.

The one we cached is almost two years ago.
sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt latest 0c6bcf119fc8 22 months ago 2.82GB

which would use the following line to install needed python packages from /var/AzDevOps/env-python3/bin/pip to ${HOME}/env-python3 for none AzDevOps user.

https://github.com/sonic-net/sonic-mgmt/blob/master/setup-container.sh#L259

ubuntu@ubuntu:$ docker run -it sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt
AzDevOps@27225f73787d:
$ cd /var/
AzDevOps@27225f73787d:/var$ cd AzDevOps/
AzDevOps@27225f73787d:~$ ls -l
total 8
drwxr-xr-x 2 AzDevOps gAzDevOps 4096 May 4 2023 bin
drwxr-xr-x 6 AzDevOps gAzDevOps 4096 May 4 2023 env-python3

But the latest image pulled from docker registry is the following

sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt latest 4a1aaf29ad26 2 weeks ago 3.92GB
ubuntu@ubuntu:$ docker run -it sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt
azureuser@81d51bef95ce:
$ cd /var
azureuser@81d51bef95ce:/var$ ls
azureuser backups cache lib local lock log mail opt run spool tmp

The needed folder is no longer there.

That causes none AzDevOps user can't run sonic-mgmt test cases anymore since the needed packages are not in.

We might need to have a better version control on this image.

@arlakshm
Copy link
Contributor

@yxieca and @wangxin, please help triage

@arlakshm arlakshm added the Triaged this issue has been triaged label Mar 12, 2025
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
None yet
Development

No branches or pull requests

2 participants