-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add ImageService.set_next_boot for GNOI Activate OS. #207
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
host_modules/image_service.py:180
- The error message handling might miss relevant error messages that do not contain the word 'Error'. Consider capturing all lines from stderr.
if "Error" in line:
/azp run |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Azure Pipelines successfully started running 1 pipeline(s). |
Could you provide some sample test result in PR description? |
logger.info("Setting the next boot image to {}".format(image)) | ||
cmd = ["/usr/local/bin/sonic-installer", "set-next-boot", image] | ||
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
msg = "" |
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.
There is no successful message?
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
msg = "" | ||
if result.returncode: | ||
msg = result.stderr.decode() |
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.
Also, recommend to log error.
Add a method set_next_boot to the ImageService interface.
This method will set the next boot image to the specified image.
This is used to implement GNOI OS.Activate.