How could I use packer functions to launch a command through SSH? My plan is to change the step_shutdown to use an SSH-based shutdown first and then using an API call as a last resort. https://github.com/hashicorp/packer/blob/master/builder/scaleway/step_shutdown.go#L21
Le jeu. 3 mai 2018 à 18:25, Rickard von Essen <[email protected]> a écrit : > I assume that sends a ACPI poweroff which should shutdown graceful. At > least that is how all other cloud providers works. The local builders don't > have so much control over the environment and instead have an explicit > "shutdown_command" which is usually set to something like "echo 'packer' | > sudo -S shutdown -P now". > > // Rickard > > On 3 May 2018 at 17:46, Rémy Léone <[email protected]> wrote: > >> Hello, >> >> The Scaleway provisioner for Packer uses a poweroff call to shut down the >> image builder machine. >> >> https://github.com/hashicorp/packer/blob/master/builder/scaleway/step_shutdown.go#L21 >> >> While this is simple approach it does not guarantee that all buffers are >> emptied. At the moment a workaround could be to run sync to ensure that all >> data are persisted on disk. >> I would like to ask you what would be the recommended Packer way to >> handle graceful shutdown? Are there Packer abstractions around this? >> Would it be running a shutdown command through ssh for instance to >> perform a graceful shutdown? Do you have other recommendations? >> >> Best regards >> >> Rémy >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/86986f70-ab56-492c-a242-2f08beb5ff31%40googlegroups.com >> <https://groups.google.com/d/msgid/packer-tool/86986f70-ab56-492c-a242-2f08beb5ff31%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/CALz9Rt87DMdSjVq1f4XqNAkGDnA9SXnZyH7JCyBMVe%3DodWonaA%40mail.gmail.com > <https://groups.google.com/d/msgid/packer-tool/CALz9Rt87DMdSjVq1f4XqNAkGDnA9SXnZyH7JCyBMVe%3DodWonaA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHCejjWAqKVGjvkF2A97yV6y_%2BbKwsW5VZpKWJsK7iVmzXwmUw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
