I am trying to create AMI from a remote EC2 machine via python fabric using 
packer. While I run 

*run('packer build -var-file=var.json build.json)*, I get 
Broken pipe. *Earlier I though there is some issue with fabric api and 
opened an issue with fabric here 

However, except packer all other works flawlessly using fabric run. 

On further checking, I found, when AMI is successfully created in host 
region and copy operations to other region starts, it return -1 after 
Waiting for all copies to complete... *and process fails.

This works fine, if we run it locally on EC2 machine where packer is 
running as stdout. Howeer, it does not work if we execute packer build 
using *ssh ip "command"  *or using fabric run.

[] out: ==> amazon-ebs: Creating the AMI: 
> osgigw-aws-packer-1523896044
> [] out:     amazon-ebs: AMI: ami-3dbed345
> [] out: ==> amazon-ebs: Waiting for AMI to become ready...
> [] out: ==> amazon-ebs: Copying AMI (ami-3dbed345) to other 
> regions...
> [] out:     amazon-ebs: Copying to: us-east-1
> [] out:     amazon-ebs: Copying to: us-east-2
> [] out:     amazon-ebs: Waiting for all copies to complete...


Fatal error: run() received nonzero return code -1 while executing!
> Requested: ./bake.sh
> Executed: /bin/bash -l -c "cd /tmp/servicesfabric_apigw_packer/ >/dev/null 
> && ./bake.sh"
> Aborting.


> var_file="var.json"
> build_file="build.json"
> var_json_cmd="-var-file=$var_file"
> update_build_cmd="$packer_home build $var_json_cmd $build_file"
> $update_build_cmd | tee -a build.log

Please help understanding what could be the issue.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to