From 29be52f7629f7db087eed10ef5326dc03c4581eb Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Sun, 15 May 2016 09:41:34 -0700 Subject: [PATCH] Speling police --- CHANGELOG.md | 2 +- api/api.go | 2 +- api/tasks.go | 4 ++-- client/alloc_runner.go | 8 ++++---- client/allocdir/alloc_dir.go | 4 ++-- client/config/config.go | 4 ++-- client/driver/docker.go | 2 +- client/driver/env/env.go | 12 ++++++------ client/driver/rkt.go | 4 ++-- client/fingerprint/fingerprint.go | 2 +- client/getter/getter_test.go | 2 +- command/agent/config.go | 2 +- command/check.go | 2 +- helper/args/args.go | 2 +- nomad/blocked_evals.go | 4 ++-- nomad/leader.go | 2 +- nomad/node_endpoint.go | 2 +- nomad/server.go | 4 ++-- nomad/structs/diff.go | 10 +++++----- nomad/structs/structs.go | 14 +++++++------- scheduler/context.go | 2 +- scheduler/feasible.go | 2 +- scheduler/select.go | 2 +- .../assets/stylesheets/_announcement-bnr.scss | 2 +- website/source/docs/agent/config.html.md | 8 ++++---- 25 files changed, 52 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 058bd5cc6..9078ae8f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/api/api.go b/api/api.go index 32d9b87b0..ab3ea981c 100644 --- a/api/api.go +++ b/api/api.go @@ -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 diff --git a/api/tasks.go b/api/tasks.go index c31ed0d28..e0fd67bac 100644 --- a/api/tasks.go +++ b/api/tasks.go @@ -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 @@ -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 diff --git a/client/alloc_runner.go b/client/alloc_runner.go index 60e7ae66e..3a0300b11 100644 --- a/client/alloc_runner.go +++ b/client/alloc_runner.go @@ -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 ) @@ -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 diff --git a/client/allocdir/alloc_dir.go b/client/allocdir/alloc_dir.go index b4937abd4..4665ba5a9 100644 --- a/client/allocdir/alloc_dir.go +++ b/client/allocdir/alloc_dir.go @@ -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 } @@ -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 { diff --git a/client/config/config.go b/client/config/config.go index 2b8a3c4aa..e3e54547c 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -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)) @@ -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] diff --git a/client/driver/docker.go b/client/driver/docker.go index 6d3fd9816..b1f29d292 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -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 diff --git a/client/driver/env/env.go b/client/driver/env/env.go index 36d0d28bb..460c8e22e 100644 --- a/client/driver/env/env.go +++ b/client/driver/env/env.go @@ -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 @@ -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 { diff --git a/client/driver/rkt.go b/client/driver/rkt.go index 998b93789..7aa6f8d00 100644 --- a/client/driver/rkt.go +++ b/client/driver/rkt.go @@ -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)) } diff --git a/client/fingerprint/fingerprint.go b/client/fingerprint/fingerprint.go index 318d478a3..f349e059a 100644 --- a/client/fingerprint/fingerprint.go +++ b/client/fingerprint/fingerprint.go @@ -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{} diff --git a/client/getter/getter_test.go b/client/getter/getter_test.go index 24db5f1c2..463c2fe7a 100644 --- a/client/getter/getter_test.go +++ b/client/getter/getter_test.go @@ -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) diff --git a/command/agent/config.go b/command/agent/config.go index 7a0a47cba..6e5f8de49 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -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 diff --git a/command/check.go b/command/check.go index 0eba98c1e..ce54b2717 100644 --- a/command/check.go +++ b/command/check.go @@ -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)) diff --git a/helper/args/args.go b/helper/args/args.go index e97ec5f58..f3caa05f0 100644 --- a/helper/args/args.go +++ b/helper/args/args.go @@ -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 { diff --git a/nomad/blocked_evals.go b/nomad/blocked_evals.go index 1e627c591..ecb845c12 100644 --- a/nomad/blocked_evals.go +++ b/nomad/blocked_evals.go @@ -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 } diff --git a/nomad/leader.go b/nomad/leader.go index 077a2cad5..3bf6ea4a6 100644 --- a/nomad/leader.go +++ b/nomad/leader.go @@ -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 diff --git a/nomad/node_endpoint.go b/nomad/node_endpoint.go index a232dc544..e115e6659 100644 --- a/nomad/node_endpoint.go +++ b/nomad/node_endpoint.go @@ -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 diff --git a/nomad/server.go b/nomad/server.go index ea1105725..1aad13948 100644 --- a/nomad/server.go +++ b/nomad/server.go @@ -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 @@ -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) diff --git a/nomad/structs/diff.go b/nomad/structs/diff.go index 6cd8a5be2..d2646c519 100644 --- a/nomad/structs/diff.go +++ b/nomad/structs/diff.go @@ -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} @@ -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)) @@ -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 @@ -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 @@ -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) { diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index f0bfc4510..42e177238 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -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" ) @@ -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 @@ -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 } @@ -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. @@ -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 @@ -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{ diff --git a/scheduler/context.go b/scheduler/context.go index 5c972eb2e..7c9c4bc25 100644 --- a/scheduler/context.go +++ b/scheduler/context.go @@ -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 diff --git a/scheduler/feasible.go b/scheduler/feasible.go index cad2e4f48..9ff2d2b36 100644 --- a/scheduler/feasible.go +++ b/scheduler/feasible.go @@ -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 diff --git a/scheduler/select.go b/scheduler/select.go index bea525123..f5b25e244 100644 --- a/scheduler/select.go +++ b/scheduler/select.go @@ -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 diff --git a/website/source/assets/stylesheets/_announcement-bnr.scss b/website/source/assets/stylesheets/_announcement-bnr.scss index 225538c02..3100a4cb1 100755 --- a/website/source/assets/stylesheets/_announcement-bnr.scss +++ b/website/source/assets/stylesheets/_announcement-bnr.scss @@ -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{ diff --git a/website/source/docs/agent/config.html.md b/website/source/docs/agent/config.html.md index 7b34686df..4df2895d4 100644 --- a/website/source/docs/agent/config.html.md +++ b/website/source/docs/agent/config.html.md @@ -324,9 +324,9 @@ configured on server nodes. * `cpu`: `cpu` is given as MHz to reserve. * `memory`: `memory` is given as MB to reserve. * `disk`: `disk` is given as MB to reserve. - * `reserved_ports`: `reserved_ports` is a comma seperated list of ports + * `reserved_ports`: `reserved_ports` is a comma separated list of ports to reserve on all fingerprinted network devices. Ranges can be - specified by using a hyphen seperated the two inclusive ends. + specified by using a hyphen separated the two inclusive ends. ### Client Options Map @@ -358,9 +358,9 @@ documentation [here](/docs/drivers/index.html) applicable. * `env.blacklist`: Nomad passes the host environment variables to `exec`, - `raw_exec` and `java` tasks. `env.blacklist` is a comma seperated list of + `raw_exec` and `java` tasks. `env.blacklist` is a comma separated list of environment variable keys not to pass to these tasks. If specified, the - defaults are overriden. The following are the default: + defaults are overridden. The following are the default: * `CONSUL_TOKEN` * `VAULT_TOKEN`