I don't have any opinion yet, but please open an issue and request that
feature or at least that the docs should be corrected.

Rickard

On 20 October 2017 at 08:12, <[email protected]> wrote:

> So do you think that the issue to correct the behavior (as opposed to to
> correct the docks) might be accepted on github? Thanks!
>
> On Friday, 20 October 2017 17:38:21 UTC+13, Rickard von Essen wrote:
>>
>> you see no value whatsoever in adding an ability to preserve the VM after
>>> post-processor starts running and then fails in order to investigate the VM
>>> state?
>>
>>
>> I didn't say that, just that the docs doesn't reflect current behaviour.
>>
>> On 19 October 2017 at 22:45, <[email protected]> wrote:
>>
>>> Thank you, Rickard,
>>>
>>> just to confirm I understood you correctly, you see no value whatsoever
>>> in adding an ability to preserve the VM after post-processor starts running
>>> and then fails in order to investigate the VM state? To me it's surprising
>>> because it's a) inconsistent (why you can preserve it with builder but not
>>> post-processor) and b) impeding any issues investigation during
>>> post-provisioning phase.
>>>
>>> Since this is surprising to me, I'd like to check maybe I misunderstood
>>> you, and there is a value in actually making it consistently work all the
>>> way through?
>>>
>>> Cheers,
>>> Andrew
>>>
>>> On Thursday, 19 October 2017 17:37:42 UTC+13, Rickard von Essen wrote:
>>>>
>>>> 1) the -on-error only influence the execution of builders (which
>>>> provisioning is a part of). That should be made clear in the docs.
>>>>
>>>> 2) unfortunately stdout/stderr gets swallowed, it looks like someone
>>>> intended it to be passed to packer but did it wrong. (in the meantime the
>>>> best way to troubleshoot is to run the command manually)
>>>>
>>>> Can you file two issues on github one for each of these. Thanks!
>>>>
>>>> / Rickard
>>>>
>>>>
>>>>
>>>> On Oct 19, 2017 04:09, <[email protected]> wrote:
>>>>
>>>>> Hello all,
>>>>>
>>>>> I'm running packer as follows:
>>>>>
>>>>> packer build -on-error=ask -var-file="rancheros-config.json" -var-file
>>>>> ="vsphere.json" -var-file="vsphere_password.json" rancheros.json
>>>>>
>>>>> The config files and packer log are available here:
>>>>> https://gist.github.com/AndrewSav/c2fa438f82701b9826e3800fad516ec5
>>>>>
>>>>> Questions:
>>>>>
>>>>> 1) Why am I not asked on failure if I'd like to clean up? Instead
>>>>> packer goes ahead and deletes the built VM leaving me with know means to
>>>>> diagnose.
>>>>>
>>>>> https://www.packer.io/docs/commands/build.html#on-error-cleanup says:
>>>>>
>>>>> -on-error=cleanup
>>>>> <https://www.packer.io/docs/commands/build.html#on-error-cleanup>
>>>>>  (default), -on-error=abort, -on-error=ask - Selects what to do when
>>>>> the build fails. cleanupcleans up after the previous steps, deleting
>>>>> temporary files and virtual machines. abort exits without any
>>>>> cleanup, which might require the next build to use -force. ask presents
>>>>> a prompt and waits for you to decide to clean up, abort, or retry the
>>>>> failed step.
>>>>>
>>>>> As you can see above I do specify ask, the build fails but there is no
>>>>> prompt to cleanup/abort. What am I doing wrong?
>>>>>
>>>>> 2) The reason why the build fails is a error code from ovftool.
>>>>> ovftool also writes stderr/stdout output that give more diagnostic
>>>>> information as to why it failed. This output cannot be found anywhere. How
>>>>> do I see it?
>>>>>
>>>>> Andrew
>>>>>
>>>>> --
>>>>> 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/c0452937-caca-
>>>>> 4650-b1a6-d5a0e34c5aef%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/packer-tool/c0452937-caca-4650-b1a6-d5a0e34c5aef%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/ms
>>> gid/packer-tool/47d2c9f5-623b-4cfa-b9b1-0fd2687bc6d4%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/47d2c9f5-623b-4cfa-b9b1-0fd2687bc6d4%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/18437f9b-10b4-42dc-9f73-47def692892f%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/18437f9b-10b4-42dc-9f73-47def692892f%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/CALz9Rt-pt03ct%3Dk45ziRYtkY_FjdBjNeQhQswiH1Ent5FRXHAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to