Skip to content

Commit

Permalink
Merge pull request #1 from mitchellh/master
Browse files Browse the repository at this point in the history
updating local fork
  • Loading branch information
marklap committed Aug 7, 2015
2 parents cabbe00 + 211817c commit 0c369af
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 19 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ generate:
go generate ./...

test:
@echo "Running tests on:"; git symbolic-ref HEAD; git rev-parse HEAD
go test $(TEST) $(TESTARGS) -timeout=10s
@$(MAKE) vet

Expand All @@ -29,6 +30,7 @@ testrace:
go test -race $(TEST) $(TESTARGS)

updatedeps:
@echo "Updating deps on:"; git symbolic-ref HEAD; git rev-parse HEAD
go get -u github.com/mitchellh/gox
go get -u golang.org/x/tools/cmd/stringer
go list ./... \
Expand All @@ -37,8 +39,10 @@ updatedeps:
| grep -v '/internal/' \
| sort -u \
| xargs go get -f -u -v
@echo "Finished updating deps, now on:"; git symbolic-ref HEAD; git rev-parse HEAD

vet:
@echo "Running go vet on:"; git symbolic-ref HEAD; git rev-parse HEAD
@go vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
go get golang.org/x/tools/cmd/vet; \
fi
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ install:

build_script:
- go test -v ./...
- go vet ./...
- git rev-parse HEAD

test: off

Expand Down
2 changes: 1 addition & 1 deletion builder/amazon/common/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (a *Artifact) Destroy() error {
if len(errors) == 1 {
return errors[0]
} else {
return &packer.MultiError{errors}
return &packer.MultiError{Errors: errors}
}
}

Expand Down
2 changes: 0 additions & 2 deletions builder/amazon/common/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {

time.Sleep(time.Duration(sleepSeconds) * time.Second)
}

return
}

func isTransientNetworkError(err error) bool {
Expand Down
2 changes: 0 additions & 2 deletions builder/openstack/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,4 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress)
time.Sleep(2 * time.Second)
}

return
}
8 changes: 4 additions & 4 deletions packer/rpc/server.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package rpc

import (
"fmt"
"github.com/hashicorp/go-msgpack/codec"
"github.com/mitchellh/packer/packer"
"io"
"log"
"net/rpc"
"sync/atomic"

"github.com/hashicorp/go-msgpack/codec"
"github.com/mitchellh/packer/packer"
)

var endpointId uint64
Expand Down Expand Up @@ -149,7 +149,7 @@ func (s *Server) Serve() {
func registerComponent(server *rpc.Server, name string, rcvr interface{}, id bool) string {
endpoint := name
if id {
fmt.Sprintf("%s.%d", endpoint, atomic.AddUint64(&endpointId, 1))
log.Printf("%s.%d", endpoint, atomic.AddUint64(&endpointId, 1))
}

server.RegisterName(endpoint, rcvr)
Expand Down
1 change: 0 additions & 1 deletion provisioner/windows-restart/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ WaitLoop:
case <-p.cancel:
close(waitDone)
return fmt.Errorf("Interrupt detected, quitting waiting for machine to restart")
break WaitLoop
}
}

Expand Down
3 changes: 3 additions & 0 deletions website/source/docs/builders/virtualbox-iso.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ builder.
- `ssh_username` (string) - The username to use to SSH into the machine once
the OS is installed.

- `ssh_password` (string) - The password to use to SSH into the machine once
the OS is installed.

### Optional:

- `boot_command` (array of strings) - This is an array of commands to type
Expand Down
12 changes: 5 additions & 7 deletions website/source/docs/builders/virtualbox-ovf.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ image).
When exporting from VirtualBox make sure to choose OVF Version 2, since Version
1 is not compatible and will generate errors like this:

==&gt; virtualbox-ovf: Progress state: VBOX\_E\_FILE\_ERROR ==&gt;
virtualbox-ovf: VBoxManage: error: Appliance read failed ==&gt; virtualbox-ovf:
VBoxManage: error: Error reading "source.ova": element "Section" has no "type"
attribute, line 21 ==&gt; virtualbox-ovf: VBoxManage: error: Details: code
VBOX\_E\_FILE\_ERROR (0x80bb0004), component Appliance, interface IAppliance
==&gt; virtualbox-ovf: VBoxManage: error: Context: "int
handleImportAppliance(HandlerArg\*)" at line 304 of file VBoxManageAppliance.cpp
==> virtualbox-ovf: Progress state: VBOX_E_FILE_ERROR
==> virtualbox-ovf: VBoxManage: error: Appliance read failed
==> virtualbox-ovf: VBoxManage: error: Error reading "source.ova": element "Section" has no "type" attribute, line 21
==> virtualbox-ovf: VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Appliance, interface IAppliance
==> virtualbox-ovf: VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 304 of file VBoxManageAppliance.cpp

The builder builds a virtual machine by importing an existing OVF or OVA file.
It then boots this image, runs provisioners on this new VM, and exports that VM
Expand Down
2 changes: 2 additions & 0 deletions website/source/docs/builders/vmware-iso.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ the required `remote_*` configurations:
Additionally, there are some optional configurations that you'll likely have to
modify as well:

- `remote_port` - The SSH port of the remote machine

- `remote_datastore` - The path to the datastore where the VM will be stored
on the ESXi machine.

Expand Down
4 changes: 2 additions & 2 deletions website/source/docs/other/debugging.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ usually will stop between each step, waiting for keyboard input before
continuing. This will allow you to inspect state and so on.

In debug mode once the remote instance is instantiated, Packer will emit to the
current directory an emphemeral private ssh key as a .pem file. Using that you
current directory an ephemeral private ssh key as a .pem file. Using that you
can `ssh -i <key.pem>` into the remote build instance and see what is going on
for debugging. The emphemeral key will be deleted at the end of the packer run
for debugging. The ephemeral key will be deleted at the end of the packer run
during cleanup.

### Windows
Expand Down

0 comments on commit 0c369af

Please sign in to comment.