Skip to content

Enhance database container process monitoring test for multi-ASIC support#4

Open
bpar9 wants to merge 1 commit into
masterfrom
devin/1765964838-database-process-monitoring-multi-asic
Open

Enhance database container process monitoring test for multi-ASIC support#4
bpar9 wants to merge 1 commit into
masterfrom
devin/1765964838-database-process-monitoring-multi-asic

Conversation

@bpar9
Copy link
Copy Markdown
Owner

@bpar9 bpar9 commented Dec 17, 2025

Description of PR

Summary:
This PR enables testing of database container critical processes on multi-ASIC devices. Previously, the database container was always skipped in process monitoring tests (line 527). This change adds support for testing database processes (redis-server) across all ASIC namespaces.

Key changes:

  • Modified get_skip_containers() to accept include_database parameter for conditional database testing
  • Enhanced get_containers_namespace_ids() with special handling for database container on multi-ASIC devices
  • Added validate_database_processes_multi_asic() helper to verify database processes across all ASICs
  • Added new recover_critical_processes_database fixture for database-specific recovery
  • Added new test_database_critical_process_monitoring_multi_asic() test function

Reviewer focus areas:

  1. Verify the database container naming convention (database{asic_index}) is correct for multi-ASIC
  2. Verify the ip netns exec command pattern for multi-ASIC namespace operations
  3. The validation failure in recovery fixture only logs a warning - confirm this is acceptable

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?

The database container runs Redis processes critical for SONiC's operation. Testing these processes across multiple ASIC namespaces on multi-ASIC devices was not previously supported.

How did you do it?

  • Added include_database parameter to get_skip_containers() to conditionally include database container
  • Enhanced namespace ID collection to include all ASIC namespaces for database container on multi-ASIC devices
  • Created dedicated test function and recovery fixture for database container testing

How did you verify/test it?

  • Lint checks passed (flake8 --select=E9,F63,F7,F82)
  • Code follows existing patterns in the test file

Any platform specific information?

Works on both single-ASIC and multi-ASIC devices.

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

Supports topologies: any, t1-multi-asic (same as existing tests in this file)

Documentation

N/A - Test case enhancement


Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/1854d5db06984a86a9bf5dffdfa23528
Requested by: bhavani@cisco.com (@bpar9)

…port

- Update get_skip_containers() to support include_database parameter
- Enhance get_containers_namespace_ids() for multi-ASIC database handling
- Add validate_database_processes_multi_asic() helper function
- Create test_database_critical_process_monitoring_multi_asic() test function
- Add recover_critical_processes_database fixture for database recovery

Co-Authored-By: bhavani@cisco.com <bhavani@cisco.com>
@devin-ai-integration
Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

1 participant