-
Notifications
You must be signed in to change notification settings - Fork 26
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 retries to autoboot in ipxe script: #87
Conversation
9388fcc
to
c7a5864
Compare
Codecov Report
@@ Coverage Diff @@
## main #87 +/- ##
=======================================
Coverage 97.25% 97.25%
=======================================
Files 5 5
Lines 437 437
=======================================
Hits 425 425
Misses 8 8
Partials 4 4 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This gives the autoboot a chance to overcome transient network issues or similiar. Signed-off-by: Jacob Weinstock <[email protected]>
c7a5864
to
bf57c99
Compare
Pending a basic test from @nshalman , thanks Nahum! |
It's actually not behaving as expected for me. I'll see if I can figure out why. |
binary/script/embed.ipxe
Outdated
autoboot | ||
set attempt:int32 0 | ||
:retry | ||
iseq ${attempt} 5 && error-with-autoboot |
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 this be iseq ${attempt} 5 && goto error-with-autoboot
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.
ah, yes! good catch. will update
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
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.
Didn't work when tested as written. comment with a possible fix.
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
The more I think about this, the less I like the automated retries, but I do like the offer of a shell after a failure. Also, I've been unable to get the retry logic to work. :( |
Agreed, i think this is part of the reason i had this on hold for a while. the trade-offs of retrying weren't sitting right with me. |
I'm glad you never merged it as-is. |
I did test the following which did appear to behave as I would expect: diff --git a/binary/script/embed.ipxe b/binary/script/embed.ipxe
index b2c582b..5c85080 100644
--- a/binary/script/embed.ipxe
+++ b/binary/script/embed.ipxe
@@ -25,7 +25,9 @@ echo Booting from net${idx}...
autoboot net${idx}
:autoboot
-autoboot
+autoboot ||
+prompt --key 0x02 --timeout 2000 autoboot failed. Press Ctrl-B for the iPXE command line... && shell
+exit
:boot-with-vlan
set idx:int32 0 So I think I'm a 👎 on both the idea and the implementation of the retry logic, but I would be open to the brief offer of a shell after failure. |
closing, please see conversation above. |
Description
This gives the
autoboot
(in the embedded script) a chance to overcome transient network issues or similiar.Why is this needed
Fixes: #
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: