Closed kumarsenthil closed 8 years ago
Hey Can someone provide me steps to setup packer softlayer plugin?
Hey @kumarsenthil, thank you for reporting this.
Just to clarify, the issue you reported is related to a packer itself and not to the Softlayer builder. Based on the information you submitted the errors appear when you try to build the packer project.
I followed your steps on a Centos 7 vagrant box and I got the same error in the following test: TestProvision_waitForCommunicatorWithCancel
.
The error seems to be related to go 1.5: https://github.com/mitchellh/packer/issues/2312
Running with go 1.4 solved the problem for me.
Hey @leonidlm Thanks for helping me.
As you said, I have tried by installing go 1.4 and followed steps I have mentioned above. But still I am getting error.
[root@local packer]# make updatedeps
Parsing meta tags from https://google.golang.org/api?go-get=1 (status code 200) google.golang.org/api (download) ERROR: go get failed. Your git branch may have changed; you were on master (17cea4fa9570415005aad86ab85a5f18b157a11d). INFO: Currently on master (17cea4fa9570415005aad86ab85a5f18b157a11d)
[root@local packer]# make go get -v -d ./... go test ./... -timeout=15s ok github.com/mitchellh/packer 0.008s
builder/googlecompute/driver_gce.go:222: cannot use v (type string) as type *string in field value FAIL github.com/mitchellh/packer/builder/googlecompute [build failed] ok github.com/mitchellh/packer/builder/null 0.323s
builder/googlecompute/driver_gce.go:222: cannot use v (type string) as type *string in field value FAIL github.com/mitchellh/packer/plugin/builder-googlecompute [build failed] ok github.com/mitchellh/packer/plugin/builder-null 0.008s ok github.com/mitchellh/packer/plugin/builder-openstack 0.011s
ok github.com/mitchellh/packer/template 0.007s ok github.com/mitchellh/packer/template/interpolate 0.006s make: *\ [test] Error 2
[root@local packer]# make dev go get -v -d ./... ==> Getting dependencies... ==> Removing old directory... ==> Building... /root/work/src/github.com/mitchellh/packer/scripts/build.sh: line 42: gox: command not found find: './pkg': No such file or directory ==> Copying binaries for this platform... find: './pkg/linux_amd64': No such file or directory
==> Results: total 0 [root@local packer]#
Please take a look on this error. And If you can please provide me the steps you have followed. I will try and let you know
Hi leonidlm, I am able to bring up the instance using packer softlayer plugin. When creating the AMI it is throwing "Failed to get proper HTTP response from SoftLayer API" error. Please help me to resolve this error.
[root@softlayer bin]# ./packer build sl.json softlayer output will be in this color.
==> softlayer: Creating temporary ssh key for the instance... ==> softlayer: Created SSH key with id '355869' ==> softlayer: Creating an instance... ==> softlayer: Reading ***\ {packer-centos-2015-09-12T06:53:54Z provisioning.com sng01 %!s(int=1) %!s(int64=1024) %!s(bool=true) %!s(bool=true) %!s(int=25) %!s(int=10) %!s(int64=355869) UBUNTU_LATEST}... ==> softlayer: Created instance, id: '056d5d8a-7fa0-4e2f-b05a-473fd879f2de' ==> softlayer: Waiting for the instance to become ACTIVE... ==> softlayer: Waiting for SSH to become available... ==> softlayer: Connected to SSH! ==> softlayer: Provisioning with shell script: /tmp/packer-shell958835729 ==> softlayer: Preparing for capturing the instance image. Image snapshot type is 'flex'. ==> softlayer: Error while trying to capture an image from instance (id=056d5d8a-7fa0-4e2f-b05a-473fd879f2de). Error: Failed to get proper HTTP response from SoftLayer API ==> softlayer: Waiting for the instance to have no active transactions before destroying it... ==> softlayer: Destroying instance... ==> softlayer: Deleting temporary ssh key... Build 'softlayer' errored: Error while trying to capture an image from instance (id=056d5d8a-7fa0-4e2f-b05a-473fd879f2de). Error: Failed to get proper HTTP response from SoftLayer API
==> Some builds didn't complete successfully and had errors: --> softlayer: Error while trying to capture an image from instance (id=056d5d8a-7fa0-4e2f-b05a-473fd879f2de). Error: Failed to get proper HTTP response from SoftLayer API
==> Builds finished but no artifacts were created. [root@softlayer bin]#
Thanks in Advance. :)
Should be fixed with aaee0561423ff696e3f516895a9ef671b6d2afd6
Hi leonidlem/chulkilee/mitchellh,
I have been trying to build packer softlayer plugin on CentOS 7. I have followed below steps:
wget https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz tar -C /usr/local -xzf go1.5.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin mkdir work export GOPATH=$HOME/work cd work/ mkdir src bin pkg
Install Bazaar and Mercurial yum install bzr yum install mercurial
go get -u github.com/mitchellh/gox Next, clone this repository into $GOPATH/src/github.com/mitchellh/packer
cd $GOPATH/src/github.com/mitchellh git clone https://github.com/mitchellh/packer.git cd packer
[root@deskt packer]# make updatedeps
When running above command I am getting below error: ERROR: go get failed. Your git branch may have changed; you were on master (a55d2f1).
INFO: Currently on master (a55d2f1) [root@deskt packer]#
If I re run this above command it is working.
Then running next command. [root@deskt packer]# make
ok github.com/mitchellh/packer/provisioner/shell-local 0.005s 2015/08/24 05:10:18 ui: Restarting Machine 2015/08/24 05:10:18 ui: Waiting for machine to restart... 2015/08/24 05:10:18 Waiting for machine to reboot with timeout: 5m0s 2015/08/24 05:10:18 Waiting for machine to become available... 2015/08/24 05:10:18 ui: Machine successfully restarted, moving on 2015/08/24 05:10:18 ui: Restarting Machine 2015/08/24 05:10:18 ui: Waiting for machine to restart... 2015/08/24 05:10:18 Waiting for machine to reboot with timeout: 5m0s 2015/08/24 05:10:18 Waiting for machine to become available... 2015/08/24 05:10:18 ui: Machine successfully restarted, moving on 2015/08/24 05:10:18 ui: Restarting Machine 2015/08/24 05:10:18 ui: WinRM terminated 2015/08/24 05:10:18 ui: Restarting Machine 2015/08/24 05:10:18 ui: Waiting for machine to restart... 2015/08/24 05:10:18 Waiting for machine to reboot with timeout: 5m0s 2015/08/24 05:10:18 Waiting for machine to become available... 2015/08/24 05:10:18 ui error: Error waiting for WinRM: Machine did not restart properly 2015/08/24 05:10:18 ui: Restarting Machine 2015/08/24 05:10:18 ui: Waiting for machine to restart... 2015/08/24 05:10:18 Waiting for machine to reboot with timeout: 1ms 2015/08/24 05:10:18 Waiting for machine to become available... 2015/08/24 05:10:18 ui error: Timeout waiting for WinRM. 2015/08/24 05:10:18 Attempting to communicator to machine with: 'powershell.exe -EncodedCommand ZQBjAGgAbwAgACIAJAB7AGUAbgB2ADoAQwBPAE0AUABVAFQARQBSAE4AQQBNAEUAfQAgAHIAZQBzAHQAYQByAHQAZQBkAC4AIgA=' 2015/08/24 05:10:18 ui: WinRM terminated 2015/08/24 05:10:18 Connected to machine 2015/08/24 05:10:18 Received interrupt Cancel() --- FAIL: TestProvision_waitForCommunicatorWithCancel (0.01s) provisioner_test.go:285: Should have err 2015/08/24 05:10:18 Retryable error: Still waiting 1 more times... 2015/08/24 05:10:18 Communicator wait cancelled, exiting loop 2015/08/24 05:10:18 Retryable error: Still waiting 0 more times... 2015/08/24 05:10:18 Retryable error: Still waiting 1 more times... 2015/08/24 05:10:18 Retryable error: Still waiting 0 more times... 2015/08/24 05:10:18 Received interrupt Cancel() 2015/08/24 05:10:18 ui: Restarting Machine 2015/08/24 05:10:18 ui: Waiting for machine to restart... 2015/08/24 05:10:18 Waiting for machine to reboot with timeout: 5m0s 2015/08/24 05:10:18 Waiting for machine to become available... panic: test timed out after 15s
goroutine 68 [running]: testing.startAlarm.func1() /usr/local/go/src/testing/testing.go:703 +0x132 created by time.goFunc /usr/local/go/src/time/sleep.go:129 +0x3a goroutine 1 [chan receive]: testing.RunTests(0x8e22b0, 0xa223e0, 0xe, 0xe, 0x0) /usr/local/go/src/testing/testing.go:562 +0x8ad testing.(M).Run(0xc8200d3ed8, 0x2231df1) /usr/local/go/src/testing/testing.go:494 +0x70 main.main() github.com/mitchellh/packer/provisioner/windows-restart/_test/_testmain.go:80 +0x116 goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 goroutine 5 [syscall]: os/signal.loop() /usr/local/go/src/os/signal/signal_unix.go:22 +0x18 created by os/signal.init.1 /usr/local/go/src/os/signal/signal_unix.go:28 +0x37 goroutine 60 [chan receive]: github.com/mitchellh/packer/provisioner/windows-restart.TestProvision_Cancel(0xc82007ecf0) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner_test.go:351 +0x3ba testing.tRunner(0xc82007ecf0, 0xa22518) /usr/local/go/src/testing/testing.go:456 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:561 +0x86d goroutine 83 [chan receive]: github.com/mitchellh/packer/provisioner/windows-restart.TestProvision_Cancel.func1(0xc820100fc0, 0x0, 0x0) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner_test.go:336 +0x54 github.com/mitchellh/packer/provisioner/windows-restart.glob.func1.1(0xc8201251f0, 0xc820100fc0, 0xc82012bd50) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner.go:109 +0x56 created by github.com/mitchellh/packer/provisioner/windows-restart.glob.func1 /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner.go:111 +0x10d goroutine 51 [chan receive]: github.com/mitchellh/packer/provisioner/windows-restart.TestProvision_waitForRestartTimeout.func1(0xc820100c40, 0x0, 0x0) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner_test.go:201 +0x54 github.com/mitchellh/packer/provisioner/windows-restart.glob.func1.1(0xc820124a20, 0xc820100c40, 0xc82012ad20) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner.go:109 +0x56 created by github.com/mitchellh/packer/provisioner/windows-restart.glob.func1 /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner.go:111 +0x10d goroutine 61 [select]: github.com/mitchellh/packer/provisioner/windows-restart.glob.func1(0xc820100fc0, 0x0, 0x0) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner.go:119 +0x5b2 github.com/mitchellh/packer/provisioner/windows-restart.(Provisioner).Provision(0xc820100fc0, 0x7efff048cb08, 0xc820120c40, 0x7efff048cb50, 0xc820104dd0, 0x0, 0x0) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner.go:97 +0x352 github.com/mitchellh/packer/provisioner/windows-restart.TestProvision_Cancel.func2(0xc820124ed0, 0xc820100fc0, 0xc820120c40, 0xc820104dd0, 0xc8201292c0) /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner_test.go:344 +0xa5 created by github.com/mitchellh/packer/provisioner/windows-restart.TestProvision_Cancel /root/work/src/github.com/mitchellh/packer/provisioner/windows-restart/provisioner_test.go:346 +0x375 FAIL github.com/mitchellh/packer/provisioner/windows-restart 15.008s ok github.com/mitchellh/packer/provisioner/windows-shell 0.165s ok github.com/mitchellh/packer/template 0.005s ok github.com/mitchellh/packer/template/interpolate 0.004s make: *\ [test] Error 1 [root@deskt packer]#
Can someone please help me to resolve this error?