mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-03-02 01:30:26 +00:00
Merge pull request #727 from yordis/fix-spelling
chore: fix misspelling
This commit is contained in:
@@ -170,7 +170,7 @@ Jan 2 03:04:05 kernel: [2.000000] 3
|
||||
}
|
||||
}
|
||||
// The log channel should have already been drained
|
||||
// There could stil be future messages sent into the channel, but the chance is really slim.
|
||||
// There could still be future messages sent into the channel, but the chance is really slim.
|
||||
timeout := time.After(100 * time.Millisecond)
|
||||
select {
|
||||
case log := <-logCh:
|
||||
|
||||
@@ -66,7 +66,7 @@ func TestTranslate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGoroutineLeak(t *testing.T) {
|
||||
orignal := runtime.NumGoroutine()
|
||||
original := runtime.NumGoroutine()
|
||||
w := NewJournaldWatcher(types.WatcherConfig{
|
||||
Plugin: "journald",
|
||||
PluginConfig: map[string]string{"source": "not-exist-service"},
|
||||
@@ -75,5 +75,5 @@ func TestGoroutineLeak(t *testing.T) {
|
||||
})
|
||||
_, err := w.Watch()
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, orignal, runtime.NumGoroutine())
|
||||
assert.Equal(t, original, runtime.NumGoroutine())
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ func (dc *diskCollector) collect() {
|
||||
|
||||
// to make sure that the rows are not duplicated
|
||||
// we display only the only one row even if there are
|
||||
// mutiple rows for the same disk.
|
||||
// multiple rows for the same disk.
|
||||
seen := make(map[string]bool)
|
||||
for _, partition := range partitions {
|
||||
if seen[partition.Device] {
|
||||
|
||||
@@ -38,7 +38,7 @@ func NewOsFeatureCollectorOrDie(osFeatureConfig *ssmtypes.OSFeatureStatsConfig,
|
||||
procPath: procPath,
|
||||
}
|
||||
var err error
|
||||
// Use metrics.Last aggregation method to ensure the metric is a guage metric.
|
||||
// Use metrics.Last aggregation method to ensure the metric is a gauge metric.
|
||||
if osFeatureConfig.MetricsConfigs["system/os_feature"].DisplayName != "" {
|
||||
oc.osFeature, err = metrics.NewInt64Metric(
|
||||
metrics.OSFeatureID,
|
||||
|
||||
@@ -63,7 +63,7 @@ type Condition struct {
|
||||
Transition time.Time `json:"transition"`
|
||||
// Reason is a short reason of why node goes into this condition.
|
||||
Reason string `json:"reason"`
|
||||
// Message is a human readable message of why node goes into this condition.
|
||||
// Message is a human-readable message of why node goes into this condition.
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ type Event struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
// Reason is a short reason of why the event is generated.
|
||||
Reason string `json:"reason"`
|
||||
// Message is a human readable message of why the event is generated.
|
||||
// Message is a human-readable message of why the event is generated.
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ type Monitor interface {
|
||||
|
||||
// Exporter exports machine health data to certain control plane.
|
||||
type Exporter interface {
|
||||
// Export problems to the control plane.
|
||||
// ExportProblems Export problems to the control plane.
|
||||
ExportProblems(*Status)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -50,7 +50,7 @@ func GetStartTime(now time.Time, uptimeDuration time.Duration, lookbackStr strin
|
||||
startTime = startTime.Add(delay)
|
||||
}
|
||||
|
||||
// Addjust startTime according to lookback duration
|
||||
// Adjust startTime according to lookback duration
|
||||
lookbackStartTime := now
|
||||
if lookbackStr != "" {
|
||||
lookback, err := time.ParseDuration(lookbackStr)
|
||||
|
||||
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -53,7 +53,7 @@ func TestPrometheusMetricsParsingAndMatching(t *testing.T) {
|
||||
},
|
||||
},
|
||||
notExpectedMetrics: []Float64MetricRepresentation{
|
||||
// Metric with non-existant label.
|
||||
// Metric with non-existent label.
|
||||
{
|
||||
Name: "host_uptime",
|
||||
Labels: map[string]string{"non-existant-version": "0.0.1"},
|
||||
@@ -63,7 +63,7 @@ func TestPrometheusMetricsParsingAndMatching(t *testing.T) {
|
||||
Name: "host_uptime",
|
||||
Labels: map[string]string{"kernel_version": "mismatched-version"},
|
||||
},
|
||||
// Non-existant metric.
|
||||
// Non-existent metric.
|
||||
{
|
||||
Name: "host_downtime",
|
||||
Labels: map[string]string{},
|
||||
@@ -99,17 +99,17 @@ func TestPrometheusMetricsParsingAndMatching(t *testing.T) {
|
||||
Name: "host_uptime",
|
||||
Labels: map[string]string{},
|
||||
},
|
||||
// Metric with non-existant label.
|
||||
// Metric with non-existent label.
|
||||
{
|
||||
Name: "host_uptime",
|
||||
Labels: map[string]string{"non-existant-version": "0.0.1"},
|
||||
Labels: map[string]string{"non-existent-version": "0.0.1"},
|
||||
},
|
||||
// Metric with incorrect label.
|
||||
{
|
||||
Name: "host_uptime",
|
||||
Labels: map[string]string{"kernel_version": "mismatched-version"},
|
||||
},
|
||||
// Non-existant metric.
|
||||
// Non-existent metric.
|
||||
{
|
||||
Name: "host_downtime",
|
||||
Labels: map[string]string{},
|
||||
|
||||
@@ -56,7 +56,7 @@ func CmdlineArgs(cmdlineFilePath string) ([]CmdlineArg, error) {
|
||||
return nil, fmt.Errorf("error reading the file %s, %v", cmdlineFilePath, err)
|
||||
}
|
||||
if len(lines) < 1 {
|
||||
return nil, fmt.Errorf("no lines are retured")
|
||||
return nil, fmt.Errorf("no lines are returned")
|
||||
}
|
||||
cmdlineArgs := strings.FieldsFunc(lines[0], splitAfterSpace)
|
||||
var result = make([]CmdlineArg, 0, len(cmdlineArgs))
|
||||
|
||||
Reference in New Issue
Block a user