Add test case for k8s cleanup container#18404
Closed
lixiaoyuner wants to merge 8 commits intosonic-net:masterfrom
Closed
Add test case for k8s cleanup container#18404lixiaoyuner wants to merge 8 commits intosonic-net:masterfrom
lixiaoyuner wants to merge 8 commits intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
zbud-msft
reviewed
May 15, 2025
| --skip_sanity --disable_loganalyzer \ | ||
| --log-file={log_file} --junit-xml={log_xml}" | ||
| --log-file={log_file} --junit-xml={log_xml} \ | ||
| --containers={containers}" |
Contributor
There was a problem hiding this comment.
Could you verify this change doesn't affect other containers/testcases that don't need this as part of their tests? I don't think it would but just to confirm.
zbud-msft
approved these changes
May 15, 2025
qiluo-msft
reviewed
May 15, 2025
tests/kubesonic/test_k8s_cleanup.py
Outdated
| exec_watchdog_cmd = f"docker exec {CLEANUP_CONTAINER_NAME} /watchdog.sh" | ||
| exec_watchdog_status = duthost.shell(exec_watchdog_cmd, module_ignore_errors=True) | ||
| if exec_watchdog_status["rc"] != 0: | ||
| pytest.fail("Kubesonic cleanup container watchdog script exited with non-zero status") |
Contributor
qiluo-msft
reviewed
May 15, 2025
tests/kubesonic/test_k8s_cleanup.py
Outdated
| exec_cleanup_script_cmd = f"docker exec {CLEANUP_CONTAINER_NAME} /image_cleanup.sh" | ||
| exec_cleanup_script_status = duthost.shell(exec_cleanup_script_cmd, module_ignore_errors=True) | ||
| if exec_cleanup_script_status["rc"] != 0: | ||
| pytest.fail("Kubesonic cleanup container cleanup script exited with non-zero status") |
Contributor
qiluo-msft
reviewed
May 15, 2025
| "docker-bmp-watchdog": { | ||
| "parameters": "--pid=host --net=host -v /etc/localtime:/etc/localtime:ro -v /etc/sonic:/etc/sonic:ro" | ||
| }, | ||
| "kubesonic-cleanup": { |
Contributor
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
zbud-msft
reviewed
May 16, 2025
tests/kubesonic/test_k8s_cleanup.py
Outdated
| if not containers: | ||
| pytest.skip("Skipping test as this test is not called from container upgrade test") | ||
|
|
||
| if CLEANUP_CONTAINER_IMAGE not in containers: |
Contributor
There was a problem hiding this comment.
Perhaps you can check docker images or running dockers to see if kubesonic cleanup container was installed directly instead of seeing if its a parameter to a test? Does this satisfy your use case? Container upgrade test should have installed this container before you run this test.
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Add the test case for cleanup container, this test case will verify the cleanup container functionality.
Cleanup container is to help cleanup the old version container images during container upgrade via k8s.
Type of change
Back port request
Approach
What is the motivation for this PR?
Need test case to verify the cleanup container's functionality.
How did you do it?
Call this test case in container upgrade test framework.
How did you verify/test it?
Run it in testbed
Any platform specific information?
No
Supported testbed topology if it's a new test case?
Yes