Skip to content

[202305] Compatibility fixes for docker-sonic-mgmt based on Ubuntu 24.04 (#21045) (#21271)#21289

Merged
StormLiangMS merged 2 commits intosonic-net:202305from
wangxin:202305-cp-21045
Nov 13, 2025
Merged

[202305] Compatibility fixes for docker-sonic-mgmt based on Ubuntu 24.04 (#21045) (#21271)#21289
StormLiangMS merged 2 commits intosonic-net:202305from
wangxin:202305-cp-21045

Conversation

@wangxin
Copy link
Copy Markdown
Collaborator

@wangxin wangxin commented Nov 11, 2025

Cherry pick #21045 and #21271 to 202305 branch.

What is the motivation for this PR?
This PR is to continue the effort made by @yutongzhang-microsoft in #18339

The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues.

All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt.

How did you do it?
Fix the snmp code caused by pysnmp upgrade.
Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it?
Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in #20851 Verified that the code change works with the current docker-sonic-mgmt in this PR.

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

…c-net#21045)

What is the motivation for this PR?
This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339

The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues.

All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt.

How did you do it?
Fix the snmp code caused by pysnmp upgrade.
Fix json dump of ansible result caused by pytest-ansible upgrade.
How did you verify/test it?
Take advantage of the current sonic-mgmt PR testing.
Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851
Verified that the code change works with the current docker-sonic-mgmt in this PR.
PR sonic-net#21045 for fixing compatibility issues of docker-sonic-mgmt upgrade removed the hook for setting log levels of couple of loggers.

The code for setting log level of ansible loggers is no longer needed after previous ansible upgrade a few years ago.

However, setting log level for the 'dataplane' logger is still necessary.

This change added back the code to set log level for the 'dataplane' logger to avoid unnessary logs when 'ptfadapter' is used in test script.

Signed-off-by: Xin Wang <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@wangxin wangxin changed the title [202305] Compatibility fixes for docker-sonic-mgmt based on Ubuntu 24.04 (#21045) [202305] Compatibility fixes for docker-sonic-mgmt based on Ubuntu 24.04 (#21045) (#21271) Nov 11, 2025
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit 3d22b05 into sonic-net:202305 Nov 13, 2025
3 checks passed
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.

3 participants