Skip to content

Commit

Permalink
Merge branch 'master' into fix-pending-state
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael authored Aug 4, 2017
2 parents c5c3b31 + 2cceedd commit e271c28
Show file tree
Hide file tree
Showing 746 changed files with 93,620 additions and 8,798 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ TODO.md
.terraform
*.tfstate*
rkt-*

./idea
*.iml
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
## 0.6.0 (Unreleased)
## 0.6.1 (Unreleased)

IMPROVEMENTS:
* core: `distinct_property` constraint can set the number of allocations that
are allowed to share a property value [GH-2942]
* driver/rkt: support read-only volume mounts [GH-2883]

BUG FIXES:
* core: Fix incorrect destructive update with `distinct_property` constraint
[GH-2939]
* cli: Fix autocmpleting global flags [GH-2928]
* cli: Fix panic when using 0.6.0 cli with an older cluster [GH-2929]
* driver/docker: Fix leaking plugin file used by syslog server [GH-2937]

## 0.6.0 (July 26, 2017)

__BACKWARDS INCOMPATIBILITIES:__
* cli: When given a prefix that does not resolve to a particular object,
commands now return exit code 1 rather than 0.

IMPROVEMENTS:
* core: Rolling updates based on allocation health [GH-2621, GH-2634, GH-2799]
Expand All @@ -14,19 +32,23 @@ IMPROVEMENTS:
* api: Add `verify_https_client` to require certificates from HTTP clients
[GH-2587]
* api/job: Ability to revert job to older versions [GH-2575]
* cli: Autocomplete for CLI commands [GH-2848]
* client: Use a random host UUID by default [GH-2735]
* client: Add `NOMAD_GROUP_NAME` environment variable [GH-2877]
* client: Environment variables for client DC and Region [GH-2507]
* client: Hash host ID so its stable and well distributed [GH-2541]
* client: GC dead allocs if total allocs > `gc_max_allocs` tunable [GH-2636]
* client: Persist state using bolt-db and more efficient write patterns
[GH-2610]
* client: Fingerprint all routable addresses on an interface including IPv6
addresses [GH-2536]
* client/artifact: Support .xz archives [GH-2836]
* client/artifact: Allow specifying a go-getter mode [GH-2781]
* client/artifact: Support non-Amazon S3-compatible sources [GH-2781]
* client/template: Support reading env vars from templates [GH-2654]
* config: Support Unix socket addresses for Consul [GH-2622]
* discovery: Advertise driver-specified IP address and port [GH-2709]
* discovery: Support `tls_skip_verify` for Consul HTTPS checks [GH-2467]
* driver/docker: Allow specifying extra hosts [GH-2547]
* driver/docker: Allow setting seccomp profiles [GH-2658]
* driver/docker: Support Docker credential helpers [GH-2651]
Expand All @@ -36,6 +58,9 @@ IMPROVEMENTS:
[GH-2535]
* driver/rkt: Support `no_overlay` [GH-2702]
* driver/rkt: Support `insecure_options` list [GH-2695]
* server: Allow tuning of node heartbeat TTLs [GH-2859]
* server/networking: Shrink dynamic port range to not overlap with majority of
operating system's ephemeral port ranges to avoid port conflicts [GH-2856]

BUG FIXES:
* core: Protect against nil job in new allocation, avoiding panic [GH-2592]
Expand All @@ -50,6 +75,7 @@ BUG FIXES:
* client: Client syncs allocation state with server before waiting for
allocation destroy fixing a corner case in which an allocation may be blocked
till destroy [GH-2563]
* client: Improved state file handling and reduced write volume [GH-2878]
* client/artifact: Honor netrc [GH-2524]
* client/artifact: Handle tars where file in directory is listed before
directory [GH-2524]
Expand Down
1 change: 0 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PACKAGES = $(shell go list ./... | grep -v '/vendor/')
EXTERNAL_TOOLS=\
github.com/kardianos/govendor \
github.com/mitchellh/gox \
golang.org/x/tools/cmd/cover \
github.com/axw/gocov/gocov \
gopkg.in/matm/v1/gocov-html \
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Nomad [![Build Status](https://travis-ci.org/hashicorp/nomad.svg)](https://travis-ci.org/hashicorp/nomad) [![Build status](https://ci.appveyor.com/api/projects/status/i748vuqet037ojo3?svg=true)](https://ci.appveyor.com/project/hashicorp/nomad) [![Join the chat at https://gitter.im/hashicorp-nomad/Lobby](https://badges.gitter.im/hashicorp-nomad/Lobby.svg)](https://gitter.im/hashicorp-nomad/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Nomad [![Build Status](https://travis-ci.org/hashicorp/nomad.svg)](https://travis-ci.org/hashicorp/nomad) [![Join the chat at https://gitter.im/hashicorp-nomad/Lobby](https://badges.gitter.im/hashicorp-nomad/Lobby.svg)](https://gitter.im/hashicorp-nomad/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
=========
- Website: https://www.nomadproject.io
- Mailing list: [Google Groups](https://groups.google.com/group/nomad-tool)

* Website: [www.nomadproject.io](https://www.nomadproject.io)
* Mailing list: [Google Groups](https://groups.google.com/group/nomad-tool)

<p align="center" style="text-align:center;">
<img src="https://cdn.rawgit.com/hashicorp/nomad/master/website/source/assets/images/logo-text.svg" width="500" />
Expand Down Expand Up @@ -61,7 +62,7 @@ machine (version 1.8+ is *required*).

**Developing with Vagrant**
There is an included Vagrantfile that can help bootstrap the process. The
created virtual machine is based off of Ubuntu 14, and installs several of the
created virtual machine is based off of Ubuntu 16, and installs several of the
base libraries that can be used by Nomad.

To use this virtual machine, checkout Nomad and run `vagrant up` from the root
Expand All @@ -78,7 +79,7 @@ needed dependencies.

**Developing locally**
For local dev first make sure Go is properly installed, including setting up a
[GOPATH](https://golang.org/doc/code.html#GOPATH). After setting up Go, clone this
[GOPATH](https://golang.org/doc/code.html#GOPATH). After setting up Go, clone this
repository into `$GOPATH/src/github.com/hashicorp/nomad`. Then you can
download the required build tools such as vet, cover, godep etc by bootstrapping
your environment.
Expand Down
7 changes: 7 additions & 0 deletions api/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
)

func TestAgent_Self(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()

Expand All @@ -33,6 +34,7 @@ func TestAgent_Self(t *testing.T) {
}

func TestAgent_NodeName(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
a := c.Agent()
Expand All @@ -48,6 +50,7 @@ func TestAgent_NodeName(t *testing.T) {
}

func TestAgent_Datacenter(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
a := c.Agent()
Expand All @@ -63,6 +66,7 @@ func TestAgent_Datacenter(t *testing.T) {
}

func TestAgent_Join(t *testing.T) {
t.Parallel()
c1, s1 := makeClient(t, nil, nil)
defer s1.Stop()
a1 := c1.Agent()
Expand Down Expand Up @@ -92,6 +96,7 @@ func TestAgent_Join(t *testing.T) {
}

func TestAgent_Members(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
a := c.Agent()
Expand All @@ -112,6 +117,7 @@ func TestAgent_Members(t *testing.T) {
}

func TestAgent_ForceLeave(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
a := c.Agent()
Expand All @@ -129,6 +135,7 @@ func (a *AgentMember) String() string {
}

func TestAgents_Sort(t *testing.T) {
t.Parallel()
var sortTests = []struct {
in []*AgentMember
out []*AgentMember
Expand Down
3 changes: 3 additions & 0 deletions api/allocations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
)

func TestAllocations_List(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
a := c.Allocations()
Expand Down Expand Up @@ -53,6 +54,7 @@ func TestAllocations_List(t *testing.T) {
}

func TestAllocations_PrefixList(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
a := c.Allocations()
Expand Down Expand Up @@ -100,6 +102,7 @@ func TestAllocations_PrefixList(t *testing.T) {
}

func TestAllocations_CreateIndexSort(t *testing.T) {
t.Parallel()
allocs := []*AllocationListStub{
&AllocationListStub{CreateIndex: 2},
&AllocationListStub{CreateIndex: 1},
Expand Down
8 changes: 8 additions & 0 deletions api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func makeClient(t *testing.T, cb1 configCallback,
}

func TestRequestTime(t *testing.T) {
t.Parallel()
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
time.Sleep(100 * time.Millisecond)
d, err := json.Marshal(struct{ Done bool }{true})
Expand Down Expand Up @@ -90,6 +91,7 @@ func TestRequestTime(t *testing.T) {
}

func TestDefaultConfig_env(t *testing.T) {
t.Parallel()
url := "http://1.2.3.4:5678"
auth := []string{"nomaduser", "12345"}

Expand All @@ -115,6 +117,7 @@ func TestDefaultConfig_env(t *testing.T) {
}

func TestSetQueryOptions(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()

Expand Down Expand Up @@ -142,6 +145,7 @@ func TestSetQueryOptions(t *testing.T) {
}

func TestSetWriteOptions(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()

Expand All @@ -157,6 +161,7 @@ func TestSetWriteOptions(t *testing.T) {
}

func TestRequestToHTTP(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()

Expand All @@ -179,6 +184,7 @@ func TestRequestToHTTP(t *testing.T) {
}

func TestParseQueryMeta(t *testing.T) {
t.Parallel()
resp := &http.Response{
Header: make(map[string][]string),
}
Expand All @@ -203,6 +209,7 @@ func TestParseQueryMeta(t *testing.T) {
}

func TestParseWriteMeta(t *testing.T) {
t.Parallel()
resp := &http.Response{
Header: make(map[string][]string),
}
Expand All @@ -219,6 +226,7 @@ func TestParseWriteMeta(t *testing.T) {
}

func TestQueryString(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()

Expand Down
1 change: 1 addition & 0 deletions api/compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func TestCompose(t *testing.T) {
t.Parallel()
// Compose a task
task := NewTask("task1", "exec").
SetConfig("foo", "bar").
Expand Down
1 change: 1 addition & 0 deletions api/constraint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
)

func TestCompose_Constraints(t *testing.T) {
t.Parallel()
c := NewConstraint("kernel.name", "=", "darwin")
expect := &Constraint{
LTarget: "kernel.name",
Expand Down
5 changes: 5 additions & 0 deletions api/evaluations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func TestEvaluations_List(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
e := c.Evaluations()
Expand Down Expand Up @@ -49,6 +50,7 @@ func TestEvaluations_List(t *testing.T) {
}

func TestEvaluations_PrefixList(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
e := c.Evaluations()
Expand Down Expand Up @@ -88,6 +90,7 @@ func TestEvaluations_PrefixList(t *testing.T) {
}

func TestEvaluations_Info(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
e := c.Evaluations()
Expand Down Expand Up @@ -121,6 +124,7 @@ func TestEvaluations_Info(t *testing.T) {
}

func TestEvaluations_Allocations(t *testing.T) {
t.Parallel()
c, s := makeClient(t, nil, nil)
defer s.Stop()
e := c.Evaluations()
Expand All @@ -139,6 +143,7 @@ func TestEvaluations_Allocations(t *testing.T) {
}

func TestEvaluations_Sort(t *testing.T) {
t.Parallel()
evals := []*Evaluation{
&Evaluation{CreateIndex: 2},
&Evaluation{CreateIndex: 1},
Expand Down
2 changes: 2 additions & 0 deletions api/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func TestFS_FrameReader(t *testing.T) {
t.Parallel()
// Create a channel of the frames and a cancel channel
framesCh := make(chan *StreamFrame, 3)
cancelCh := make(chan struct{})
Expand Down Expand Up @@ -76,6 +77,7 @@ func TestFS_FrameReader(t *testing.T) {
}

func TestFS_FrameReader_Unblock(t *testing.T) {
t.Parallel()
// Create a channel of the frames and a cancel channel
framesCh := make(chan *StreamFrame, 3)
cancelCh := make(chan struct{})
Expand Down
Loading

0 comments on commit e271c28

Please sign in to comment.