Skip to content

[setup-container] Allow ptrace for sonic-mgmt container#22232

Merged
wangxin merged 1 commit intosonic-net:masterfrom
lolyu:add_sys_ptrace_cap
Feb 24, 2026
Merged

[setup-container] Allow ptrace for sonic-mgmt container#22232
wangxin merged 1 commit intosonic-net:masterfrom
lolyu:add_sys_ptrace_cap

Conversation

@lolyu
Copy link
Collaborator

@lolyu lolyu commented Feb 3, 2026

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
  • 202511

Approach

What is the motivation for this PR?

Add SYS_PTRACE when starting sonic-mgmt docker to allow debuggers to trace.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?

Add the flag to docker run.

How did you verify/test it?

Any platform specific information?

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

Documentation

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@mssonicbld
Copy link
Collaborator

/azp run

@lolyu lolyu requested a review from Copilot February 3, 2026 11:55
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lolyu lolyu added the Request for 202511 branch Request to backport a change to 202511 branch label Feb 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the sonic-mgmt container startup to grant the SYS_PTRACE capability so that debuggers can attach to processes inside the container.

Changes:

  • Modify the docker run invocation in start_local_container to include --cap-add=SYS_PTRACE when creating the sonic-mgmt container.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lolyu lolyu requested a review from yxieca February 3, 2026 12:02
@wangxin wangxin merged commit 44b79c9 into sonic-net:master Feb 24, 2026
28 of 29 checks passed
aronovic pushed a commit to aronovic/sonic-mgmt that referenced this pull request Mar 3, 2026
)

What is the motivation for this PR?
Add SYS_PTRACE when starting sonic-mgmt docker to allow debuggers to trace.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?
Add the flag to docker run.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Mihut Aronovici <aronovic@cisco.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#22232)

#### Why I did it
src/sonic-utilities
```
* a6fcf564 - (HEAD -> 202411, origin/202411) [show][interfaces] Add proposal for show interfaces flap (sonic-net#3627) (sonic-net#3823) (8 hours ago) [vdahiya12]
```
#### How I did it
#### How to verify it
#### Description for the changelog
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
)

What is the motivation for this PR?
Add SYS_PTRACE when starting sonic-mgmt docker to allow debuggers to trace.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?
Add the flag to docker run.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Abhishek <abhishek@nexthop.ai>
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
)

What is the motivation for this PR?
Add SYS_PTRACE when starting sonic-mgmt docker to allow debuggers to trace.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?
Add the flag to docker run.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Request for 202511 branch Request to backport a change to 202511 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants