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

Breakpoints in boot steps #164

Open
jacob-carlborg opened this issue Feb 12, 2024 · 0 comments
Open

Breakpoints in boot steps #164

jacob-carlborg opened this issue Feb 12, 2024 · 0 comments

Comments

@jacob-carlborg
Copy link
Contributor

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

It would be nice if Packer supported breakpoints in boot steps. I imagine it working as follows:

To pause the execution before a given boot step, you would write <breakpoint> somewhere in a boot step (boot_steps). The execution would pause in the same way as occurring when the -debug flag is passed to Packer. It would then be possible to either single step, which is what happens today with the -debug flag, i.e. Packer would pause after each step. Or it would be possible to continue the execution. This means Packer would not pause the execution anymore until it hits another breakpoint.

Not sure if it makes sens to support this in boot_command.

Use Case(s)

The use case is similar to #103. That is, the installation process is interactive and requires a lot of steps to complete. Say that there are 50 steps to complete the installation and you have somehow verified that everything works up to step 25 and after that something breaks. It would then be ideal to but a breakpoint at step 25 instead of having to use the -debug flag and single step 25+ times before it hits the potential problem. Also, there are like 10-15 steps before Packer even starts the VM and executes the boot command/boot steps, where there usually are no problems.

Potential configuration

boot_steps = [
  ["1<wait20s>", "Boot normally"],
  ["a<enter><wait5>", "Installation messages in English"]
  ["a<enter><wait5>", "Install NetBSD to hard disk"],
  
  ["<breakpoint>", "Separate step with breakpoint"],
  ["<breakpoint>b<enter><wait5>", "Breakpoint within a step"],
  
  ["b<enter><wait5>", "Yes"],
  ["a<enter><wait5>", "Available disks: sd0"],
  ["a<enter><wait5>", "Guid Partition Table"],
],

Potential References

#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant