Add debuggability for reboot function#14341
Add debuggability for reboot function#14341JibinBao wants to merge 1 commit intosonic-net:masterfrom
Conversation
45c9ba3 to
7df7160
Compare
7df7160 to
2653915
Compare
|
/azpw run Azure.sonic-mgmt |
|
/AzurePipelines run Azure.sonic-mgmt |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-mgmt |
|
/AzurePipelines run Azure.sonic-mgmt |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-mgmt |
|
/AzurePipelines run Azure.sonic-mgmt |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-mgmt |
|
/AzurePipelines run Azure.sonic-mgmt |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The concern for this change is we may see test failure if the console connection is not right or not working fine, even though it's not related to the reboot feature. |
|
When console connection is not right, it will not affect the reboot function, it just does not collect the console logs |
|
Hi @JibinBao, I still have concern on this change. It's because there are various console types and some of them are not stable enough. We don't want to fail the reboot test for a console connection issue. |
Hi @bingwang-ms , You are right, I have the same conncern. So, we use try to create the dutconsole. If fail to create dutconsole, we will not collect the logs. so it will not affect the original test logic. You can check the funciton of try_create_dut_console |
|
@JibinBao please resolve the conflicts |
Will handle it. Thanks |
| logger.warning("dut console is not ready, we can get log by console") | ||
|
|
||
|
|
||
| def collect_mgmt_config_by_console(duthost, localhost): |
There was a problem hiding this comment.
@JibinBao what is the objective of collecting this?
There was a problem hiding this comment.
Sometimes, when dut is not up, i am not sure if it is the mgmt netowrk issue, so check if the mgmt ip is pingable and
the mgmt config is correct or not.
| return False | ||
|
|
||
|
|
||
| def try_create_dut_console(duthost, localhost, conn_graph_facts, creds): |
There was a problem hiding this comment.
@JibinBao How are you ensuring the reboot command is issued via console connection? What if the reboot is issued via SSH connection and there is no console connection?
There was a problem hiding this comment.
The function is to create dut_console to collect conosle logs, and it is not related to reboot test logic.
If there is no console connection, it will not collect the console logs, and it does not affect the original reboot test.
It is an enhancement. If there is a console connection and the console connection can be created successfully, it collect the console logs, otherwise, it will do nothing.
1. Add function to collect console log from starting reboot to dut up 2. When dut is not up, check if dut is pingable and collect the mgmt interface config Change-Id: I700340d3fbfc00d61bc6e508ac5be4e4dc0a25e6
2653915 to
b5dcc6f
Compare
|
Hi @bingwang-ms , |
bingwang-ms
left a comment
There was a problem hiding this comment.
Hi @JibinBao, I don't agree to merge this change.
Unstable console connection can lead to test_reboot failure.
Can you keep the change in your internal repo?
Hi @bingwang-ms ,
Thanks |
|
and lets please resolve conflict so we can approve and merge |
|
cannot reopen |
|
reopen it |
|
When pushing the new fix it is hung in "processing-updates" status. So close it and open new PR: #15868 |

Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Enhance the debugability for reboot fucntion
How did you do it?
How did you verify/test it?
Run reboot cases
Any platform specific information?
Any
Supported testbed topology if it's a new test case?
Documentation