Skip to content
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

Fix cold reboot on no wake by rtc (BugFix) #1208

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

kissiel
Copy link
Contributor

@kissiel kissiel commented Apr 24, 2024

Description

This PR fixes two problems with the cold-reboot job.

  1. It introduces a new field reported by the RTC resource job that informs about presence of the wakealarm functionality necessary to boot the machine after it's shutdown (this is what cold-reboot job does).
  2. It changes the hard-coded two-minute alarm setting in favor of a variable that can be defined in configs, launcher, or the calling environment. The default behavior stays the sam - 120s. This fixes a problem where on slow devices it took longer to power off the host than what the delay was (inlcuding two sleeps). Now on those devices we can raise make the delay longer.

Resolved issues

Resolves: CHECKBOX-1425

Documentation

No documentation changes.

Tests

For the problem no 1. I tested the "happy case" only, because I have no access to a device with broken wakealarm.
The second problem I managed to test by adding sleeps before the poweroff call.

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.32%. Comparing base (84878c2) to head (3d08386).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1208      +/-   ##
==========================================
+ Coverage   43.21%   43.32%   +0.11%     
==========================================
  Files         356      356              
  Lines       38662    38658       -4     
  Branches     6561     6559       -2     
==========================================
+ Hits        16706    16750      +44     
+ Misses      21293    21245      -48     
  Partials      663      663              
Flag Coverage Δ
provider-base 16.58% <ø> (+0.29%) ⬆️
provider-resource 28.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, makes sense

@Hook25 Hook25 merged commit a49af10 into main Apr 29, 2024
17 checks passed
@Hook25 Hook25 deleted the fix-cold-reboot-on-no-wake-by-rtc branch April 29, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants