Hello,

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 
*paramiko.ssh_exception.ProxyCommandFailure: 
Broken pipe. *Earlier I though there is some issue with fabric api and 
opened an issue with fabric here 
https://github.com/fabric/fabric/issues/1734.

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 
*amazon-ebs: 
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.

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

Error:


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.
>


Bake.sh:

packer_home="/tmp/packer"
> 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.

Thanks
Yogesh

-- 
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 
https://groups.google.com/d/msgid/packer-tool/9a1a5fb2-49ae-4db3-ac29-847de1c702d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to