Post-processor with Openstack builder not being executed (Packer + Foreman + OpenStack)

37 views
Skip to first unread message

Lorena Lobato

unread,
Nov 10, 2016, 5:49:56 AM11/10/16
to Packer
Hello all,

You might have the answer to this. I have the following configuration:

  • packer version 0.10.1
  • Openstack builder
  • Provisioners connecting to Foreman to register the temporary VM in a specific HG
  • Puppet to get configuration of the temporary VM being created
  • Rundeck that controls packer

I am not getting too many details because everything is working as expected but my surprise is with the post-processor. It seems that packer does not execute the command established inside. While the provisioners are registering correctly the VM in Foreman, the post-processor does not do anything. They only thing that it needs to do is un-register the VM in Foreman, hence I have to do it manually..

I do not get any error as you can see below:

11:24:252016/11/10 11:24:25 ui: ==> openstack: Deleting temporary keypair: packer 58244840-76cd-8224-f43b-2c75308eb458 ...
11:24:25==> openstack: Running post-processor: shell-local
11:24:252016/11/10 11:24:25 ui: ==> openstack: Running post-processor: shell-local
11:24:252016/11/10 11:24:25 Flagging to keep original artifact from post-processor 'shell-local'
11:24:252016/11/10 11:24:25 ui: Build 'openstack' finished.
11:24:25Build 'openstack' finished.
11:24:252016/11/10 11:24:25 Builds completed. Waiting on interrupt barrier...
11:24:25
11:24:252016/11/10 11:24:25 ui:
11:24:25==> Builds finished. The artifacts of successful builds are:
11:24:25==> Builds finished. The artifacts of successful builds are:
11:24:252016/11/10 11:24:25 machine readable: openstack,artifact-count []string{"2"}
11:24:252016/11/10 11:24:25 machine readable: openstack,artifact []string{"0", "builder-id", "mitchellh.openstack"}
11:24:252016/11/10 11:24:25 machine readable: openstack,artifact []string{"0", "id", "dc0bb78f-4064-4155-b49d-35fb46921fc5"}
11:24:252016/11/10 11:24:25 machine readable: openstack,artifact []string{"0", "string", "An image was created: dc0bb78f-4064-4155-b49d-35fb46921fc5"}
11:24:252016/11/10 11:24:25 machine readable: openstack,artifact []string{"0", "files-count", "0"}
11:24:25--> openstack: An image was created: dc0bb78f-4064-4155-b49d-35fb46921fc5
 
I am asking because I am lost with this and I know that OS post-processor is quite new. Do you have any idea about what I am doing wrong ?

Thanks in advance

Cheers
Lore

Rickard von Essen

unread,
Nov 10, 2016, 5:59:08 AM11/10/16
to packe...@googlegroups.com
Shell-local post-processor runs once per file in the artifact, the openstack builder have 0 files so it's not very useful. We want to change this but it haven't been done yet. For mor info see https://github.com/mitchellh/packer/issues/3671

--
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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/9f60de0e-f58f-4468-beaf-ae8573ed77c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lorena Lobato

unread,
Nov 11, 2016, 10:23:39 AM11/11/16
to Packer
Thanks Rickard for the information :)

Cheers
Lore
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages