-
Notifications
You must be signed in to change notification settings - Fork 125
[Smartswitch] Fix the values being set for reboot_status call during smartswitch DPU reboot #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: gpunathilell <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
tests/host_modules/reboot_test.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also change the test case
test_get_reboot_status_active
and
test_get_reboot_status_inactive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated test
host_modules/reboot.py
Outdated
@@ -53,7 +53,7 @@ def __init__(self, mod_name): | |||
self.populate_reboot_status_flag() | |||
super(Reboot, self).__init__(mod_name) | |||
|
|||
def populate_reboot_status_flag(self, active = False, when = 0, reason = "", method = "", status = RebootStatus.STATUS_UNKNOWN): | |||
def populate_reboot_status_flag(self, active = False, when = 0, reason = "", method = "", status = RebootStatus.STATUS_UNKNOWN.value): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpunathilell self.reboot_status_flag can sometimes be None, Can you please handle that case also? Do the same everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rameshraghupathy self.reboot_status_flag
should ideally never be empty. since we are populating it with default values on initialization of reboot class
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
@vvolam I have changed the output of the status to display the name of the status instead of the value because it is more readable, let me know if it affects anything else and I can revert it
|
During smartswitch DPU reboot we query the rebootstatus call to check the current status. This is currently failing on DPU because the RebootStatus enum is not serializable:
So setting it to value everywhere to fix the issue