-
Notifications
You must be signed in to change notification settings - Fork 4
fix(v3.8.x): rpi_boot.update_firmware: ensure /tmp
folder exists when doing flash-kernel
#498
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
Conversation
for more information, see https://pre-commit.ci
/tmp
folder exists when doing flash-kernel/tmp
folder exists when doing flash-kernel
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.
LGTM, thank you 🎉 I understood that flash-kernel
is used only in rasp pi.
logger.info( | ||
f"tryboot reboot to standby slot({self.standby_slot}) in {reboot_wait=}s ..." | ||
) | ||
time.sleep(reboot_wait) |
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.
(nits) I wonder, if we can use flush instead of waiting for constant time like the following code.
for handler in logger.handlers:
handler.flush()
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.
Emmm currently our _LogTeeHandler
at otaclient._logging
in otaclient v3.8.x
doesn't implement the flush
API.
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.
So for v3.8.x, let's make the thing easier, just wait for 6 seconds.
And in the main branch, let's implement the flush
API in the otaclient LogHandler
👍
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.
Yes, this is nits comment. Please feel free to ignore as necessary. And I agree with waiting for constant value for this hot-fix.
Emmm currently our _LogTeeHandler at otaclient._logging in otaclient v3.8.x doesn't implement the flush API.
Oh..., I understood we need to implement it by ourselves. the original logging.Handler.flush()
just pass the function...
To be honest, I think OTA image should preserve the top-level folder that being defined in the Linux file system layout. Currently the default ignore setting not only ignoring everything under But because we are in a hurry now, let's discuss this topic later. |
@airkei What do you think above? |
|
@Bodong-Yang Good points. I also consider if it should be fixed in image side. But this is from |
@airkei Yes I agree 👍 , so I just do this hotfix in I think fixing the problem at OTA image side is more reasonable. Let's later talk to CI/CD team about this issue, and let them adjust the default ignore setting. |
Introduction
Starting from otaclient v3.8.x, a new mechanism is used to replace the previous two-stage reboot mechanism for executing
flash-kernel
. This new mechanism will chroot into the standby slot, and callflash-kernel
on standby slot directly to deploy new dtbs, kernel and initrd img.However, current OTA image is configured to ignore with pattern
/tmp
, which means even the top-level/tmp
folder will be ignored. When OTA just updates the standby slot, there will be no/tmp
folder existed on it, causingflash-kernel
failed due toflash-kernel
needs/tmp
folder during execution.This PR fixes this problem by ensuring
/tmp
folder on standby slot.Other changes:
Tests
https://tier4.atlassian.net/browse/RT4-15340