Skip to content

Commit

Permalink
Speling police
Browse files Browse the repository at this point in the history
  • Loading branch information
sean- committed May 15, 2016
1 parent 769989e commit 29be52f
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BUG FIXES:
* core: Updated User, Meta or Resources in a task cause create/destroy updates
[GH-1128, GH-1153]
* dicovery: Ensure service and check names are unique [GH-1143, GH-1144]
* discovery: Ensure service and check names are unique [GH-1143, GH-1144]

## 0.3.2 (April 22, 2016)

Expand Down
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type QueryOptions struct {
WaitIndex uint64

// WaitTime is used to bound the duration of a wait.
// Defaults to that of the Config, but can be overriden.
// Defaults to that of the Config, but can be overridden.
WaitTime time.Duration

// If set, used as prefix for resource list searches
Expand Down
4 changes: 2 additions & 2 deletions api/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type ServiceCheck struct {
Timeout time.Duration
}

// The Service model represents a Consul service defintion
// The Service model represents a Consul service definition
type Service struct {
Id string
Name string
Expand Down Expand Up @@ -150,7 +150,7 @@ func (t *Task) SetLogConfig(l *LogConfig) *Task {
}

// TaskState tracks the current state of a task and events that caused state
// transistions.
// transitions.
type TaskState struct {
State string
Events []*TaskEvent
Expand Down
8 changes: 4 additions & 4 deletions client/alloc_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
const (
// taskReceivedSyncLimit is how long the client will wait before sending
// that a task was received to the server. The client does not immediately
// send that the task was received to the server because another transistion
// send that the task was received to the server because another transition
// to running or failed is likely to occur immediately after and a single
// update will transfer all past state information. If not other transistion
// has occured up to this limit, we will send to the server.
// update will transfer all past state information. If not other transition
// has occurred up to this limit, we will send to the server.
taskReceivedSyncLimit = 30 * time.Second
)

Expand Down Expand Up @@ -218,7 +218,7 @@ func (r *AllocRunner) Alloc() *structs.Allocation {
r.allocLock.Lock()
alloc := r.alloc.Copy()

// The status has explicitely been set.
// The status has explicitly been set.
if r.allocClientStatus != "" || r.allocClientDescription != "" {
alloc.ClientStatus = r.allocClientStatus
alloc.ClientDescription = r.allocClientDescription
Expand Down
4 changes: 2 additions & 2 deletions client/allocdir/alloc_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (d *AllocDir) Build(tasks []*structs.Task) error {
return fmt.Errorf("Failed to make the alloc directory %v: %v", d.AllocDir, err)
}

// Make the shared directory and make it availabe to all user/groups.
// Make the shared directory and make it available to all user/groups.
if err := os.MkdirAll(d.SharedDir, 0777); err != nil {
return err
}
Expand Down Expand Up @@ -172,7 +172,7 @@ func (d *AllocDir) Build(tasks []*structs.Task) error {
// Embed takes a mapping of absolute directory or file paths on the host to
// their intended, relative location within the task directory. Embed attempts
// hardlink and then defaults to copying. If the path exists on the host and
// can't be embeded an error is returned.
// can't be embedded an error is returned.
func (d *AllocDir) Embed(task string, entries map[string]string) error {
taskdir, ok := d.TaskDirs[task]
if !ok {
Expand Down
4 changes: 2 additions & 2 deletions client/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (c *Config) ReadBoolDefault(id string, defaultValue bool) bool {
return val
}

// ReadStringListToMap tries to parse the specified option as a comma seperated list.
// ReadStringListToMap tries to parse the specified option as a comma separated list.
// If there is an error in parsing, an empty list is returned.
func (c *Config) ReadStringListToMap(key string) map[string]struct{} {
s := strings.TrimSpace(c.Read(key))
Expand All @@ -175,7 +175,7 @@ func (c *Config) ReadStringListToMap(key string) map[string]struct{} {
return list
}

// ReadStringListToMap tries to parse the specified option as a comma seperated list.
// ReadStringListToMap tries to parse the specified option as a comma separated list.
// If there is an error in parsing, an empty list is returned.
func (c *Config) ReadStringListToMapDefault(key, defaultValue string) map[string]struct{} {
val, ok := c.Options[key]
Expand Down
2 changes: 1 addition & 1 deletion client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type DockerDriverConfig struct {
UTSMode string `mapstructure:"uts_mode"` // The UTS mode of the container - host and none
PortMapRaw []map[string]int `mapstructure:"port_map"` //
PortMap map[string]int `mapstructure:"-"` // A map of host port labels and the ports exposed on the container
Privileged bool `mapstructure:"privileged"` // Flag to run the container in priviledged mode
Privileged bool `mapstructure:"privileged"` // Flag to run the container in privileged mode
DNSServers []string `mapstructure:"dns_servers"` // DNS Server for containers
DNSSearchDomains []string `mapstructure:"dns_search_domains"` // DNS Search domains for containers
Hostname string `mapstructure:"hostname"` // Hostname for containers
Expand Down
12 changes: 6 additions & 6 deletions client/driver/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ const (
// MemLimit is the environment variable with the tasks memory limit in MBs.
MemLimit = "NOMAD_MEMORY_LIMIT"

// CpuLimit is the enviroment variable with the tasks CPU limit in MHz.
// CpuLimit is the environment variable with the tasks CPU limit in MHz.
CpuLimit = "NOMAD_CPU_LIMIT"

// AllocID is the enviroment variable for passing the allocation ID.
// AllocID is the environment variable for passing the allocation ID.
AllocID = "NOMAD_ALLOC_ID"

// AllocName is the enviroment variable for passing the allocation name.
// AllocName is the environment variable for passing the allocation name.
AllocName = "NOMAD_ALLOC_NAME"

// TaskName is the enviroment variable for passing the task name.
// TaskName is the environment variable for passing the task name.
TaskName = "NOMAD_TASK_NAME"

// AllocIndex is the enviroment variable for passing the allocation index.
// AllocIndex is the environment variable for passing the allocation index.
AllocIndex = "NOMAD_ALLOC_INDEX"

// AddrPrefix is the prefix for passing both dynamic and static port
Expand Down Expand Up @@ -112,7 +112,7 @@ func (t *TaskEnvironment) ParseAndReplace(args []string) []string {
return replaced
}

// ReplaceEnv takes an arg and replaces all occurences of environment variables
// ReplaceEnv takes an arg and replaces all occurrences of environment variables
// and nomad variables. If the variable is found in the passed map it is
// replaced, otherwise the original string is returned.
func (t *TaskEnvironment) ReplaceEnv(arg string) string {
Expand Down
4 changes: 2 additions & 2 deletions client/driver/rkt.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
cmdArgs = append(cmdArgs, "--insecure-options=all")
}

// Inject enviornment variables
// Inject environment variables
for k, v := range d.taskEnv.EnvMap() {
cmdArgs = append(cmdArgs, fmt.Sprintf("--set-env=%v=%v", k, v))
}

// Check if the user has overriden the exec command.
// Check if the user has overridden the exec command.
if execCmd, ok := task.Config["command"]; ok {
cmdArgs = append(cmdArgs, fmt.Sprintf("--exec=%v", execCmd))
}
Expand Down
2 changes: 1 addition & 1 deletion client/fingerprint/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type Fingerprint interface {
Periodic() (bool, time.Duration)
}

// StaticFingerprinter can be embeded in a struct that has a Fingerprint method
// StaticFingerprinter can be embedded in a struct that has a Fingerprint method
// to make it non-periodic.
type StaticFingerprinter struct{}

Expand Down
2 changes: 1 addition & 1 deletion client/getter/getter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func TestGetArtifact_Archive(t *testing.T) {
defer ts.Close()

// Create a temp directory to download into and create some of the same
// files that exist in the artifact to ensure they are overriden
// files that exist in the artifact to ensure they are overridden
taskDir, err := ioutil.TempDir("", "nomad-test")
if err != nil {
t.Fatalf("failed to make temp directory: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion command/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ type ServerConfig struct {
Enabled bool `mapstructure:"enabled"`

// BootstrapExpect tries to automatically bootstrap the Consul cluster,
// by witholding peers until enough servers join.
// by withholding peers until enough servers join.
BootstrapExpect int `mapstructure:"bootstrap_expect"`

// DataDir is the directory to store our state in
Expand Down
2 changes: 1 addition & 1 deletion command/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (c *AgentCheckCommand) checkServerHealth(info map[string]interface{}, minPe
return HealthPass
}

// checkClientHealth retuns the health of a client
// checkClientHealth returns the health of a client
func (c *AgentCheckCommand) checkClientHealth(info map[string]interface{}, minServers int) int {
clientStats := info["client"].(map[string]interface{})
knownServers, err := strconv.Atoi(clientStats["known_servers"].(string))
Expand Down
2 changes: 1 addition & 1 deletion helper/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var (
envRe = regexp.MustCompile(`\${[a-zA-Z0-9_\-\.]+}`)
)

// ReplaceEnv takes an arg and replaces all occurences of environment variables.
// ReplaceEnv takes an arg and replaces all occurrences of environment variables.
// If the variable is found in the passed map it is replaced, otherwise the
// original string is returned.
func ReplaceEnv(arg string, environments ...map[string]string) string {
Expand Down
4 changes: 2 additions & 2 deletions nomad/blocked_evals.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ func (b *BlockedEvals) unblock(computedClass string) {
}
}

// We unblock any eval that is explicitely eligible for the computed class
// We unblock any eval that is explicitly eligible for the computed class
// and also any eval that is not eligible or uneligible. This signifies that
// when the evaluation was originally run through the scheduler, that it
// never saw a node with the given computed class and thus needs to be
// unblocked for correctness.
for id, eval := range b.captured {
if elig, ok := eval.ClassEligibility[computedClass]; ok && !elig {
// Can skip because the eval has explicitely marked the node class
// Can skip because the eval has explicitly marked the node class
// as ineligible.
continue
}
Expand Down
2 changes: 1 addition & 1 deletion nomad/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ WAIT:

// establishLeadership is invoked once we become leader and are able
// to invoke an initial barrier. The barrier is used to ensure any
// previously inflight transactions have been commited and that our
// previously inflight transactions have been committed and that our
// state is up-to-date.
func (s *Server) establishLeadership(stopCh chan struct{}) error {
// Disable workers to free half the cores for use in the plan queue and
Expand Down
2 changes: 1 addition & 1 deletion nomad/node_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (n *Node) Register(args *structs.NodeRegisterRequest, reply *structs.NodeUp
}

// Deregister is used to remove a client from the client. If a client should
// just be made unavailable for scheduling, a status update is prefered.
// just be made unavailable for scheduling, a status update is preferred.
func (n *Node) Deregister(args *structs.NodeDeregisterRequest, reply *structs.NodeUpdateResponse) error {
if done, err := n.srv.forward("Node.Deregister", args, args, reply); done {
return err
Expand Down
4 changes: 2 additions & 2 deletions nomad/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
serverMaxStreams = 64

// raftLogCacheSize is the maximum number of logs to cache in-memory.
// This is used to reduce disk I/O for the recently commited entries.
// This is used to reduce disk I/O for the recently committed entries.
raftLogCacheSize = 512

// raftRemoveGracePeriod is how long we wait to allow a RemovePeer
Expand Down Expand Up @@ -221,7 +221,7 @@ func NewServer(config *Config) (*Server, error) {
return nil, fmt.Errorf("Failed to start serf: %v", err)
}

// Intialize the scheduling workers
// Initialize the scheduling workers
if err := s.setupWorkers(); err != nil {
s.Shutdown()
logger.Printf("[ERR] nomad: failed to start workers: %s", err)
Expand Down
10 changes: 5 additions & 5 deletions nomad/structs/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ type TaskGroupDiff struct {
}

// Diff returns a diff of two task groups. If contextual diff is enabled,
// objects' fields will be stored even if no diff occured as long as one field
// objects' fields will be stored even if no diff occurred as long as one field
// changed.
func (tg *TaskGroup) Diff(other *TaskGroup, contextual bool) (*TaskGroupDiff, error) {
diff := &TaskGroupDiff{Type: DiffTypeNone}
Expand Down Expand Up @@ -263,7 +263,7 @@ func (tg *TaskGroupDiff) GoString() string {
}

// TaskGroupDiffs diffs two sets of task groups. If contextual diff is enabled,
// objects' fields will be stored even if no diff occured as long as one field
// objects' fields will be stored even if no diff occurred as long as one field
// changed.
func taskGroupDiffs(old, new []*TaskGroup, contextual bool) ([]*TaskGroupDiff, error) {
oldMap := make(map[string]*TaskGroup, len(old))
Expand Down Expand Up @@ -460,7 +460,7 @@ func (t TaskDiffs) Swap(i, j int) { t[i], t[j] = t[j], t[i] }
func (t TaskDiffs) Less(i, j int) bool { return t[i].Name < t[j].Name }

// serviceDiff returns the diff of two service objects. If contextual diff is
// enabled, all fields will be returned, even if no diff occured.
// enabled, all fields will be returned, even if no diff occurred.
func serviceDiff(old, new *Service, contextual bool) *ObjectDiff {
diff := &ObjectDiff{Type: DiffTypeNone, Name: "Service"}
var oldPrimitiveFlat, newPrimitiveFlat map[string]string
Expand Down Expand Up @@ -526,7 +526,7 @@ func serviceDiffs(old, new []*Service, contextual bool) []*ObjectDiff {
}

// serviceCheckDiff returns the diff of two service check objects. If contextual
// diff is enabled, all fields will be returned, even if no diff occured.
// diff is enabled, all fields will be returned, even if no diff occurred.
func serviceCheckDiff(old, new *ServiceCheck, contextual bool) *ObjectDiff {
diff := &ObjectDiff{Type: DiffTypeNone, Name: "Check"}
var oldPrimitiveFlat, newPrimitiveFlat map[string]string
Expand Down Expand Up @@ -752,7 +752,7 @@ func portDiffs(old, new []Port, dynamic bool, contextual bool) []*ObjectDiff {
}

// configDiff returns the diff of two Task Config objects. If contextual diff is
// enabled, all fields will be returned, even if no diff occured.
// enabled, all fields will be returned, even if no diff occurred.
func configDiff(old, new map[string]interface{}, contextual bool) *ObjectDiff {
diff := &ObjectDiff{Type: DiffTypeNone, Name: "Config"}
if reflect.DeepEqual(old, new) {
Expand Down
14 changes: 7 additions & 7 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ const (
PeriodicSpecCron = "cron"

// PeriodicSpecTest is only used by unit tests. It is a sorted, comma
// seperated list of unix timestamps at which to launch.
// separated list of unix timestamps at which to launch.
PeriodicSpecTest = "_internal_test"
)

Expand Down Expand Up @@ -1478,7 +1478,7 @@ var (
AgentServicePrefix = fmt.Sprintf("%s-%s", NomadConsulPrefix, "agent")
)

// The Service model represents a Consul service defintion
// The Service model represents a Consul service definition
type Service struct {
Name string // Name of the service, defaults to id
Tags []string // List of tags for the service
Expand Down Expand Up @@ -1835,12 +1835,12 @@ const (
)

// TaskState tracks the current state of a task and events that caused state
// transistions.
// transitions.
type TaskState struct {
// The current state of the task.
State string

// Series of task events that transistion the state of the task.
// Series of task events that transition the state of the task.
Events []*TaskEvent
}

Expand Down Expand Up @@ -1924,7 +1924,7 @@ type TaskEvent struct {
RestartReason string

// Driver Failure fields.
DriverError string // A driver error occured while starting the task.
DriverError string // A driver error occurred while starting the task.

// Task Terminated Fields.
ExitCode int // The exit code of the task.
Expand Down Expand Up @@ -2588,7 +2588,7 @@ type Evaluation struct {
// This is used to support rolling upgrades, where we need a chain of evaluations.
PreviousEval string

// ClassEligibility tracks computed node classes that have been explicitely
// ClassEligibility tracks computed node classes that have been explicitly
// marked as eligible or ineligible.
ClassEligibility map[string]bool

Expand Down Expand Up @@ -2683,7 +2683,7 @@ func (e *Evaluation) NextRollingEval(wait time.Duration) *Evaluation {
}

// BlockedEval creates a blocked evaluation to followup this eval to place any
// failed allocations. It takes the classes marked explicitely eligible or
// failed allocations. It takes the classes marked explicitly eligible or
// ineligible and whether the job has escaped computed node classes.
func (e *Evaluation) BlockedEval(classEligibility map[string]bool, escaped bool) *Evaluation {
return &Evaluation{
Expand Down
2 changes: 1 addition & 1 deletion scheduler/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ type ComputedClassFeasibility byte

const (
// EvalComputedClassUnknown is the initial state until the eligibility has
// been explicitely marked to eligible/ineligible or escaped.
// been explicitly marked to eligible/ineligible or escaped.
EvalComputedClassUnknown ComputedClassFeasibility = iota

// EvalComputedClassIneligible is used to mark the computed class as
Expand Down
2 changes: 1 addition & 1 deletion scheduler/feasible.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func checkVersionConstraint(ctx Context, lVal, rVal interface{}) bool {
return false
}

// Parse the verison
// Parse the version
vers, err := version.NewVersion(versionStr)
if err != nil {
return false
Expand Down
2 changes: 1 addition & 1 deletion scheduler/select.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scheduler

// LimitIterator is a RankIterator used to limit the number of options
// that are returned before we artifically end the stream.
// that are returned before we artificially end the stream.
type LimitIterator struct {
ctx Context
source RankIterator
Expand Down
2 changes: 1 addition & 1 deletion website/source/assets/stylesheets/_announcement-bnr.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $enterprise-bnr-nomad-color: $green;
$enterprise-color-dark-white: #A9B1B5;

body{
// when _announcment-bnr.erb is being used in layout we need to push down content to accomodate
// when _announcment-bnr.erb is being used in layout we need to push down content to accommodate
// add this class to body
&.-displaying-bnr{
#header{
Expand Down
Loading

0 comments on commit 29be52f

Please sign in to comment.