-
Notifications
You must be signed in to change notification settings - Fork 135
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 ability to reboot the machine after workflow is finished #71
Comments
it seems that we now have a documented way to do a reboot from an action at https://docs.tinkerbell.org/actions/action-architecture/#namespace:
It this issue about improving on that? |
This is fixed in tink-worker. This can probably be closed! 😀 |
@thebsdbox, by fixed, you mean using an action with having a docs example on how to reboot from a workflow would also be really nice :-) I found a reboot example at https://docs.tinkerbell.org/deploying-operating-systems/examples-win/#creating-a-reboot-action-dockerfile:
is that it? we just need to create a new file named |
Creating a file named Here's the workflow status:
|
Ah this needs hook.. hook has the logic to watch for the reboot. |
Can we use sysrq-r from an action? https://hub.docker.com/r/mlafeldt/sysrq/ for example.
Does the action need to be Tinkerbell specific and act as the worker to signal success? |
Built a docker image as per the example @rgl mentioned here already to no avail: The "touch" is going nowhere and thus the rebootWatch() never fires. A manual touch in the getty container to "/run/worker/reboot" works, so the watch is active. Just looks the volume mapping is wrong? (/worker:/worker) Edit: it works; just the workflow was hanging somehow. recreated that and works as advertised: profi...reboot :) |
- name: "reboot into Windows"
image: reboot:latest
timeout: 90
volumes:
- /worker:/worker I encountered the same issue in rebooting into Windows, the action failed (STATE_FAILED). Is there any place I can lookup for the error message? |
It turns out the document is incorrect. I just sent out a PR to fix it. |
We intend on drawing up a proposal for embedding restart capabilities into workflows so we don't need to rely on actions. This will compliment a want to see workflows consistently transition to an end state which doesn't happen if the restart beats the restart actions update currently. |
tinkerbell/roadmap#29 will see this come to fruition. |
While tinkerbell/roadmap#29 will add builtin capabilities for rebooting, https://github.com/jacobweinstock/waitdaemon can achieve this from an action and still allow the Workflow to report successful. I'm going to close this. If https://github.com/jacobweinstock/waitdaemon is not an acceptable solution please watch tinkerbell/roadmap#29. |
For workflows, which provision the OS, it would be nice if the workflow itself could reboot the machine, after it's done, so the machine can boot itself into target OS, so the upper orchestration system (e.g. person who monitors provisioning process, some kind of logic which use IPMI etc.) don't need to care about that.
Things to consider:
reboot
parameter totrue
.The text was updated successfully, but these errors were encountered: