mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-19 04:06:24 +00:00
chore: fix misspelling
This commit is contained in:
+2
-2
@@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Windows build now supported.
|
||||
- Added metrics to retrieve stats such as `procs_running` and `procs_blocked`.
|
||||
- Added metrics to retrieve network stats.
|
||||
- Added metric to retrieve guest OS features such as unknwon modules, ktd,
|
||||
- Added metric to retrieve guest OS features such as unknown modules, ktd,
|
||||
and kernel integrity.
|
||||
|
||||
### Changed
|
||||
@@ -237,7 +237,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Added resource limites to NPD deployment.
|
||||
- Added log-counter to dockerfile.
|
||||
- Added `enable_message_change_based_condition_update` option to enable
|
||||
condition update when messages cahnge for custom plugin.
|
||||
condition update when messages change for custom plugin.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ ifeq ($(ENABLE_JOURNALD), 1)
|
||||
CGO_ENABLED:=1
|
||||
LOGCOUNTER=./bin/log-counter
|
||||
else
|
||||
# Hack: Don't copy over log-counter, use a wildcard path that shouldnt match
|
||||
# Hack: Don't copy over log-counter, use a wildcard path that shouldn't match
|
||||
# anything in COPY command.
|
||||
LOGCOUNTER=*dont-include-log-counter
|
||||
endif
|
||||
|
||||
@@ -20,8 +20,7 @@ if systemctl -q is-active "$SERVICE"; then
|
||||
echo "$SERVICE is running"
|
||||
exit $OK
|
||||
else
|
||||
# Does not differenciate stopped/failed service from non-existent
|
||||
# Does not differentiate stopped/failed service from non-existent
|
||||
echo "$SERVICE is not running"
|
||||
exit $NONOK
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# Custom Plugin Monitor
|
||||
|
||||
## Configuration
|
||||
|
||||
### Plugin Config
|
||||
|
||||
* `invoke_interval`: Interval at which custom plugins will be invoked.
|
||||
* `timeout`: Time after which custom plugins invokation will be terminated and considered timeout.
|
||||
* `timeout`: Time after which custom plugins invocation will be terminated and considered timeout.
|
||||
* `max_output_length`: The maximum standard output size from custom plugins that NPD will be cut and use for condition status message.
|
||||
* `concurrency`: The plugin worker number, i.e., how many custom plugins will be invoked concurrently.
|
||||
* `enable_message_change_based_condition_update`: Flag controls whether message change should result in a condition update.
|
||||
|
||||
@@ -14,11 +14,11 @@ itself.
|
||||
viewing the changes on GitHub ([example:
|
||||
https://github.com/kubernetes/node-problem-detector/compare/v0.8.6...master](https://github.com/kubernetes/node-problem-detector/compare/v0.8.6...master)).
|
||||
|
||||
1. Based on the changes to be included in the release, determine what the next
|
||||
2. Based on the changes to be included in the release, determine what the next
|
||||
release number should be. We strive to follow [SemVer](https://semver.org/)
|
||||
as much as possible.
|
||||
|
||||
1. Update [CHANGELOG](https://github.com/kubernetes/node-problem-detector/blob/master/CHANGELOG.md)
|
||||
3. Update [CHANGELOG](https://github.com/kubernetes/node-problem-detector/blob/master/CHANGELOG.md)
|
||||
with all significant changes.
|
||||
|
||||
## Create release
|
||||
@@ -31,11 +31,11 @@ body of the release:
|
||||
release (e.g.
|
||||
[https://github.com/kubernetes/node-problem-detector/compare/v0.8.5...v0.8.6](https://github.com/kubernetes/node-problem-detector/compare/v0.8.5...v0.8.6)).
|
||||
|
||||
1. There is no need to duplicate everything from the CHANGELOG, but include the
|
||||
2. There is no need to duplicate everything from the CHANGELOG, but include the
|
||||
most significant things so someone just viewing the release entry will have
|
||||
an idea of what it includes.
|
||||
|
||||
1. Provide a link to the new image release (e.g. `Image:
|
||||
3. Provide a link to the new image release (e.g. `Image:
|
||||
k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.6`)
|
||||
|
||||
## Post release steps
|
||||
|
||||
@@ -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,
|
||||
|
||||
+3
-3
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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))
|
||||
|
||||
@@ -32,6 +32,6 @@ func makeFilesystemError() {
|
||||
msg := []byte("fake filesystem error from problem-maker")
|
||||
err := ioutil.WriteFile(ext4ErrorTrigger, msg, 0200)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed writting log to %q: %v", ext4ErrorTrigger, err)
|
||||
glog.Fatalf("Failed writing log to %q: %v", ext4ErrorTrigger, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func writeKernelMessageOrDie(msg string) {
|
||||
for _, line := range strings.Split(msg, "\n") {
|
||||
err := ioutil.WriteFile(kmsgPath, []byte(line), 0644)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed writting to %q: %v", kmsgPath, err)
|
||||
glog.Fatalf("Failed writing to %q: %v", kmsgPath, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# This script generate kernel log in given rate.
|
||||
# Note that this only works for journald.
|
||||
# Note that this script can't be used to test multi-line patterns, because
|
||||
# the test kernel log lines may be splitted by real kernel log.
|
||||
# the test kernel log lines may be split by real kernel log.
|
||||
|
||||
# PROBLEM is the path to the problem log.
|
||||
PROBLEM=${PROBLEM:-""}
|
||||
|
||||
Reference in New Issue
Block a user