Skip to content

Commit

Permalink
Merge f764bec into fc81b7f
Browse files Browse the repository at this point in the history
  • Loading branch information
rgooch authored Dec 6, 2018
2 parents fc81b7f + f764bec commit d27f115
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
24 changes: 14 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ language: go

# go1.11beta1 breaks the tests for lib/net/reverseconnection
go:
- "1.10"
- "1.10"

before_install:
- REPO_NAME=$(basename $PWD)
- GITHUB_PATH=$(dirname $(dirname $PWD))
- SYMANTEC_PROJECT_DIR=${GITHUB_PATH}/Symantec/${REPO_NAME}
- mkdir -p ${SYMANTEC_PROJECT_DIR}
- rsync -az ${TRAVIS_BUILD_DIR}/ ${SYMANTEC_PROJECT_DIR}/
- export TRAVIS_BUILD_DIR=${SYMANTEC_PROJECT_DIR}
- cd ${SYMANTEC_PROJECT_DIR}
- go get ./...
- go get github.com/mattn/goveralls
- REPO_NAME=$(basename $PWD)
- GITHUB_PATH=$(dirname $(dirname $PWD))
- SYMANTEC_PROJECT_DIR=${GITHUB_PATH}/Symantec/${REPO_NAME}
- mkdir -p ${SYMANTEC_PROJECT_DIR}
- rsync -az ${TRAVIS_BUILD_DIR}/ ${SYMANTEC_PROJECT_DIR}/
- export TRAVIS_BUILD_DIR=${SYMANTEC_PROJECT_DIR}
- cd ${SYMANTEC_PROJECT_DIR}
- go get ./...

script: make all test
script:
- go test -covermode=count -coverprofile=coverage.out ./...
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
- make all test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Dominator
[![Build Status](https://travis-ci.org/Symantec/Dominator.svg?branch=master)](https://travis-ci.org/Symantec/Dominator)
The Dominator Config Management and Image Deployment System. This system can
push image updates to a large fleet of machines and keep them in sync.

Expand Down
3 changes: 2 additions & 1 deletion cmd/installer/configureNetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ func (netconf *networkConfig) writeDebian(ipGateway net.IP) error {
writer := bufio.NewWriter(file)
defer writer.Flush()
fmt.Fprintln(writer,
"# /etc/network/interfaces -- created by SmallStack installer\n")
"# /etc/network/interfaces -- created by SmallStack installer")
fmt.Fprintln(writer)
fmt.Fprintln(writer, "auto lo")
fmt.Fprintln(writer, "iface lo inet loopback")
for _, iface := range netconf.normalInterfaces {
Expand Down
2 changes: 1 addition & 1 deletion cmd/installer/configureStorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func readInt(filename string) (uint64, error) {
if nVal, err := fmt.Fscanf(file, "%d\n", &value); err != nil {
return 0, err
} else if nVal != 1 {
return 0, fmt.Errorf("read %2 values, expected 1", nVal)
return 0, fmt.Errorf("read %d values, expected 1", nVal)
} else {
return value, nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/vm-control/migrateVm.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func requestCommit(conn *srpc.Conn, encoder srpc.Encoder) error {
case "commit":
response.Commit = true
default:
return fmt.Errorf("invalid response: %s", response)
return fmt.Errorf("invalid response: %s", userResponse)
}
if err := encoder.Encode(response); err != nil {
return err
Expand Down
6 changes: 4 additions & 2 deletions fleetmanager/hypervisors/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ func sendEmail(user string, vms []*vmInfoType) error {
buffer := &bytes.Buffer{}
fmt.Fprintf(buffer, "From: %s\n", fromAddress)
fmt.Fprintf(buffer, "To: %s\n", toAddress)
fmt.Fprintln(buffer, "Subject: Please migrate your VMs\n")
fmt.Fprintln(buffer, "Subject: Please migrate your VMs")
fmt.Fprintln(buffer)
fmt.Fprintln(buffer,
"You own the following VMs which are on unhealthy Hypervisors.")
fmt.Fprintln(buffer,
"Please migrate your VMs to healthy Hypervisors ASAP.")
fmt.Fprintln(buffer, "Below is the list of your VMs which are affected:\n")
fmt.Fprintln(buffer, "Below is the list of your VMs which are affected:")
fmt.Fprintln(buffer)
for _, vm := range vms {
fmt.Fprintf(buffer, "IP: %s name: %s Hypervisor: %s status: %s\n",
vm.Address.IpAddress, vm.Tags["Name"],
Expand Down
2 changes: 1 addition & 1 deletion hypervisor/manager/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (m *Manager) commitImportedVm(ipAddr net.IP,
}
defer vm.mutex.Unlock()
if !vm.Uncommitted {
return fmt.Errorf("%s is already committed")
return fmt.Errorf("%s is already committed", ipAddr)
}
if err := m.registerAddress(vm.Address); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion lib/filesystem/tar/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func writeRegularFile(tarWriter *tar.Writer, fileSystem *filesystem.FileSystem,
}
defer reader.Close()
if size != inode.Size {
return fmt.Errorf("%s inode size: %u, object size: %d",
return fmt.Errorf("%s inode size: %d, object size: %d",
name, inode.Size, size)
}
nCopied, err := io.Copy(tarWriter, reader)
Expand Down

0 comments on commit d27f115

Please sign in to comment.