Speling police

This commit is contained in:
Sean Chittenden
2016-05-15 09:41:34 -07:00
parent 769989ef44
commit 29be52f762
25 changed files with 52 additions and 52 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 {

View File

@@ -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]

View File

@@ -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

View File

@@ -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 {

View File

@@ -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))
}

View File

@@ -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{}

View File

@@ -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)

View File

@@ -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

View File

@@ -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))

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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) {

View File

@@ -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{

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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{

View File

@@ -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 <a id="options_map"></a>
@@ -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`