1
0
mirror of https://github.com/moby/moby.git synced 2025-04-18 20:44:11 +03:00

Fix typos

Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
This commit is contained in:
Nathan Baulch 2024-08-28 09:17:49 +10:00
parent a22a2875a1
commit 59eba0ae13
No known key found for this signature in database
116 changed files with 173 additions and 173 deletions

View File

@ -57,7 +57,7 @@ jobs:
## push semver tag v23.0.0
# moby/moby-bin:23.0.0
# moby/moby-bin:latest
## push semver prelease tag v23.0.0-beta.1
## push semver prerelease tag v23.0.0-beta.1
# moby/moby-bin:23.0.0-beta.1
## push on master
# moby/moby-bin:master

View File

@ -94,7 +94,7 @@ issues:
# (unlike the "include" option), the "exclude" option does not take exclusion
# ID's.
#
# These exclusion patterns are copied from the default excluses at:
# These exclusion patterns are copied from the default excludes at:
# https://github.com/golangci/golangci-lint/blob/v1.46.2/pkg/config/issues.go#L10-L104
# EXC0001

View File

@ -90,7 +90,7 @@ DOCKER_ENVS := \
# note: BINDDIR is supported for backwards-compatibility here
BIND_DIR := $(if $(BINDDIR),$(BINDDIR),$(if $(DOCKER_HOST),,bundles))
# DOCKER_MOUNT can be overriden, but use at your own risk!
# DOCKER_MOUNT can be overridden, but use at your own risk!
ifndef DOCKER_MOUNT
DOCKER_MOUNT := $(if $(BIND_DIR),-v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/docker/docker/$(BIND_DIR)")
DOCKER_MOUNT := $(if $(DOCKER_BINDDIR_MOUNT_OPTS),$(DOCKER_MOUNT):$(DOCKER_BINDDIR_MOUNT_OPTS),$(DOCKER_MOUNT))

View File

@ -75,13 +75,13 @@ func (e invalidRequestError) Error() string {
func (e invalidRequestError) InvalidParameter() {}
type ambigousResultsError string
type ambiguousResultsError string
func (e ambigousResultsError) Error() string {
func (e ambiguousResultsError) Error() string {
return "network " + string(e) + " is ambiguous"
}
func (ambigousResultsError) InvalidParameter() {}
func (ambiguousResultsError) InvalidParameter() {}
func (n *networkRouter) getNetwork(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
@ -182,7 +182,7 @@ func (n *networkRouter) getNetwork(ctx context.Context, w http.ResponseWriter, r
}
}
if len(listByFullName) > 1 {
return errors.Wrapf(ambigousResultsError(term), "%d matches found based on name", len(listByFullName))
return errors.Wrapf(ambiguousResultsError(term), "%d matches found based on name", len(listByFullName))
}
// Find based on partial ID, returns true only if no duplicates
@ -192,7 +192,7 @@ func (n *networkRouter) getNetwork(ctx context.Context, w http.ResponseWriter, r
}
}
if len(listByPartialID) > 1 {
return errors.Wrapf(ambigousResultsError(term), "%d matches found based on ID prefix", len(listByPartialID))
return errors.Wrapf(ambiguousResultsError(term), "%d matches found based on ID prefix", len(listByPartialID))
}
return libnetwork.ErrNoSuchNetwork(term)

View File

@ -393,7 +393,7 @@ definitions:
Make the mount non-recursively read-only, but still leave the mount recursive
(unless NonRecursive is set to `true` in conjunction).
Addded in v1.44, before that version all read-only mounts were
Added in v1.44, before that version all read-only mounts were
non-recursive by default. To match the previous behaviour this
will default to `true` for clients on versions prior to v1.44.
type: "boolean"
@ -2216,7 +2216,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2518,7 +2518,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3741,7 +3741,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7717,7 +7717,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -196,7 +196,7 @@ func (args Args) Match(field, source string) bool {
}
// GetBoolOrDefault returns a boolean value of the key if the key is present
// and is intepretable as a boolean value. Otherwise the default value is returned.
// and is interpretable as a boolean value. Otherwise the default value is returned.
// Error is not nil only if the filter values are not valid boolean or are conflicting.
func (args Args) GetBoolOrDefault(key string, defaultValue bool) (bool, error) {
fieldValues, ok := args.fields[key]

View File

@ -12,7 +12,7 @@ type Summary struct {
Containers int64 `json:"Containers"`
// Date and time at which the image was created as a Unix timestamp
// (number of seconds sinds EPOCH).
// (number of seconds since EPOCH).
//
// Required: true
Created int64 `json:"Created"`

View File

@ -122,7 +122,7 @@ type CAConfig struct {
SigningCAKey string `json:",omitempty"`
// If this value changes, and there is no specified signing cert and key,
// then the swarm is forced to generate a new root certificate ane key.
// then the swarm is forced to generate a new root certificate and key.
ForceRotate uint64 `json:",omitempty"`
}

View File

@ -414,7 +414,7 @@ type Info struct {
// the Volume has not been successfully created yet.
VolumeID string `json:",omitempty"`
// AccessibleTopolgoy is the topology this volume is actually accessible
// AccessibleTopology is the topology this volume is actually accessible
// from.
AccessibleTopology []Topology `json:",omitempty"`
}

View File

@ -270,7 +270,7 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
}
// Note that CDI is not inherently linux-specific, there are some linux-specific assumptions / implementations in the code that
// queries the properties of device on the host as wel as performs the injection of device nodes and their access permissions into the OCI spec.
// queries the properties of device on the host as well as performs the injection of device nodes and their access permissions into the OCI spec.
//
// In order to lift this restriction the following would have to be addressed:
// - Support needs to be added to the cdi package for injecting Windows devices: https://tags.cncf.io/container-device-interface/issues/28

View File

@ -325,7 +325,7 @@ func (container *Container) SetupWorkingDirectory(rootIdentity idtools.Identity)
}
// GetResourcePath evaluates `path` in the scope of the container's BaseFS, with proper path
// sanitisation. Symlinks are all scoped to the BaseFS of the container, as
// sanitization. Symlinks are all scoped to the BaseFS of the container, as
// though the container's BaseFS was `/`.
//
// The BaseFS of a container is the host-facing path which is bind-mounted as
@ -368,7 +368,7 @@ func cleanScopedPath(path string) string {
}
// GetRootResourcePath evaluates `path` in the scope of the container's root, with proper path
// sanitisation. Symlinks are all scoped to the root of the container, as
// sanitization. Symlinks are all scoped to the root of the container, as
// though the container's root was `/`.
//
// The root of a container is the host-facing configuration metadata directory.

View File

@ -34,7 +34,7 @@ func newCDIDeviceDriver(cdiSpecDirs ...string) *deviceDriver {
// We create a spec updater that always returns an error.
// This error will be returned only when a CDI device is requested.
// This ensures that daemon startup is not blocked by a CDI registry initialization failure or being disabled
// by configuratrion.
// by configuration.
errorOnUpdateSpec := func(s *specs.Spec, dev *deviceInstance) error {
return fmt.Errorf("CDI device injection failed: %w", err)
}

View File

@ -396,7 +396,7 @@ func TestServiceConvertFromGRPCCredentialSpec(t *testing.T) {
}
}
func TestServiceConvertToGRPCNetworkAtachmentRuntime(t *testing.T) {
func TestServiceConvertToGRPCNetworkAttachmentRuntime(t *testing.T) {
someid := "asfjkl"
s := swarmtypes.ServiceSpec{
TaskTemplate: swarmtypes.TaskSpec{

View File

@ -19,7 +19,7 @@ func TestWaitNodeAttachment(t *testing.T) {
// and add some attachments to it
attachmentStore := emptyDaemon.GetAttachmentStore()
// create a set of attachments to put into the attahcment store
// create a set of attachments to put into the attachment store
attachments := map[string]string{
"network1": "10.1.2.3/24",
}

View File

@ -327,7 +327,7 @@ func (i *ImageService) unpackImage(ctx context.Context, snapshotter string, img
return nil
}
// detectCompression dectects the reader compression type.
// detectCompression detects the reader compression type.
func detectCompression(bufRd *bufio.Reader) (archive.Compression, error) {
bs, err := bufRd.Peek(10)
if err != nil && err != io.EOF {

View File

@ -125,7 +125,7 @@ func (i *ImageService) LayerStoreStatus() [][2]string {
}
// GetLayerMountID returns the mount ID for a layer
// called from daemon.go Daemon.Shutdown(), and Daemon.Cleanup() (cleanup is actually continerCleanup)
// called from daemon.go Daemon.Shutdown(), and Daemon.Cleanup() (cleanup is actually containerCleanup)
// TODO: needs to be refactored to Unmount (see callers), or removed and replaced with GetLayerByID
func (i *ImageService) GetLayerMountID(cid string) (string, error) {
return "", errdefs.NotImplemented(errors.New("not implemented"))

View File

@ -181,7 +181,7 @@ func (daemon *Daemon) openContainerFS(ctr *container.Container) (_ *containerFSV
return vw, nil
}
// RunInFS synchronously runs fn in the context of the container filesytem and
// RunInFS synchronously runs fn in the context of the container filesystem and
// passes through its return value.
//
// The container filesystem is only visible to functions called in the same

View File

@ -266,7 +266,7 @@ func (daemon *Daemon) restore(cfg *configStore) error {
}
// parallelLimit is the maximum number of parallel startup jobs that we
// allow (this is the limited used for all startup semaphores). The multipler
// allow (this is the limited used for all startup semaphores). The multiplier
// (128) was chosen after some fairly significant benchmarking -- don't change
// it unless you've tested it significantly (this value is adjusted if
// RLIMIT_NOFILE is small to avoid EMFILE).
@ -712,7 +712,7 @@ func (daemon *Daemon) RestartSwarmContainers() {
func (daemon *Daemon) restartSwarmContainers(ctx context.Context, cfg *configStore) {
// parallelLimit is the maximum number of parallel startup jobs that we
// allow (this is the limited used for all startup semaphores). The multipler
// allow (this is the limited used for all startup semaphores). The multiplier
// (128) was chosen after some fairly significant benchmarking -- don't change
// it unless you've tested it significantly (this value is adjusted if
// RLIMIT_NOFILE is small to avoid EMFILE).

View File

@ -149,7 +149,7 @@ func (i *ImageService) LayerStoreStatus() [][2]string {
}
// GetLayerMountID returns the mount ID for a layer
// called from daemon.go Daemon.Shutdown(), and Daemon.Cleanup() (cleanup is actually continerCleanup)
// called from daemon.go Daemon.Shutdown(), and Daemon.Cleanup() (cleanup is actually containerCleanup)
// TODO: needs to be refactored to Unmount (see callers), or removed and replaced with GetLayerByID
func (i *ImageService) GetLayerMountID(cid string) (string, error) {
return i.layerStore.GetMountID(cid)

View File

@ -23,7 +23,7 @@ func imageKey(dgst string) string {
}
// imageStoreWithLease wraps the configured image store with one that deletes the lease
// reigstered for a given image ID, if one exists
// registered for a given image ID, if one exists
//
// This is used by the main image service to wrap delete calls to the real image store.
type imageStoreWithLease struct {
@ -43,7 +43,7 @@ func (s *imageStoreWithLease) Delete(id image.ID) ([]layer.Metadata, error) {
return s.Store.Delete(id)
}
// iamgeStoreForPull is created for each pull It wraps an underlying image store
// imageStoreForPull is created for each pull It wraps an underlying image store
// to handle registering leases for content fetched in a single image pull.
type imageStoreForPull struct {
distribution.ImageConfigStore
@ -98,7 +98,7 @@ func (s *imageStoreForPull) updateLease(ctx context.Context, dgst digest.Digest)
// contentStoreForPull is used to wrap the configured content store to
// add lease management for a single `pull`
// It stores all committed digests so that `imageStoreForPull` can add
// the digsted resources to the lease for an image.
// the digested resources to the lease for an image.
type contentStoreForPull struct {
distribution.ContentStore
leases leases.Manager

View File

@ -66,7 +66,7 @@ type Sender struct {
// specified by the SYSLOG_TIMESTAMP variable value. This is roughly
// analogous to journald receiving the event and assigning it a
// timestamp in zero time after the SYSLOG_TIMESTAMP value was set,
// which is higly unrealistic in practice.
// which is highly unrealistic in practice.
AssignEventTimestampFromSyslogTimestamp bool
// Boot ID for journal entries. Required by systemd-journal-remote as of
// https://github.com/systemd/systemd/commit/1eede158519e4e5ed22738c90cb57a91dbecb7f2

View File

@ -160,7 +160,7 @@ func (r *reader) initialSeekTail() (bool, error) {
// The (filtered) journal has no entries. The tail is the head: all new
// entries which get written into the journal from this point forward
// should be read from the journal. However the read pointer is
// positioned at a conceptual position which is not condusive to reading
// positioned at a conceptual position which is not conducive to reading
// those entries. The tail of the journal is resolved to the last entry
// in the journal _at the time of the first successful Previous() call_,
// which means that an arbitrary number of journal entries added in the

View File

@ -36,7 +36,7 @@ func TestWriteLog(t *testing.T) {
m2 := logger.Message{Source: "stdout", Timestamp: time.Now().Add(-1 * 20 * time.Minute), Line: []byte("message 2"), PLogMetaData: &backend.PartialLogMetaData{Last: true, ID: "0001", Ordinal: 1}}
m3 := logger.Message{Source: "stderr", Timestamp: time.Now().Add(-1 * 10 * time.Minute), Line: []byte("message 3")}
// copy the log message because the underying log writer resets the log message and returns it to a buffer pool
// copy the log message because the underlying log writer resets the log message and returns it to a buffer pool
err = l.Log(copyLogMessage(&m1))
assert.NilError(t, err)
err = l.Log(copyLogMessage(&m2))

View File

@ -97,7 +97,7 @@ type Decoder interface {
// Reset resets the decoder
// Reset is called for certain events, such as log rotations
Reset(io.Reader)
// Decode decodes the next log messeage from the stream
// Decode decodes the next log message from the stream
Decode() (*logger.Message, error)
// Close signals to the decoder that it can release whatever resources it was using.
Close()

View File

@ -12,7 +12,7 @@ import (
)
func openPluginStream(a *pluginAdapter) (io.WriteCloser, error) {
// Make sure to also open with read (in addition to write) to avoid borken pipe errors on plugin failure.
// Make sure to also open with read (in addition to write) to avoid broken pipe errors on plugin failure.
// It is up to the plugin to keep track of pipes that it should re-attach to, however.
// If the plugin doesn't open for reads, then the container will block once the pipe is full.
f, err := fifo.OpenFifo(context.Background(), a.fifoPath, unix.O_RDWR|unix.O_CREAT|unix.O_NONBLOCK, 0o700)

View File

@ -205,7 +205,7 @@ func (daemon *Daemon) ProcessEvent(id string, e libcontainerdtypes.EventType, ei
// with daemon.ContainerExecStart() removing the exec from
// c.ExecCommands. If we win the race, we will find that there is no
// process to clean up. (And ContainerExecStart will clobber the
// exit code we set.) Prevent a nil-dereferenc panic in that
// exit code we set.) Prevent a nil-dereference panic in that
// situation to restore the status quo where this is merely a
// logical race condition.
if execConfig.Process != nil {

View File

@ -184,7 +184,7 @@ func WithApparmor(c *container.Container) coci.SpecOpts {
}
}
// WithCapabilities sets the container's capabilties
// WithCapabilities sets the container's capabilities
func WithCapabilities(c *container.Container) coci.SpecOpts {
return func(ctx context.Context, _ coci.Client, _ *containers.Container, s *coci.Spec) error {
capabilities, err := caps.TweakCapabilities(

View File

@ -240,7 +240,7 @@ func TestManifestStore(t *testing.T) {
ref, desc, mg, store, cs, teardown := setupTest(t)
defer teardown(t)
// first add the manifest to the coontent store
// first add the manifest to the content store
writeManifest(t, cs, desc)
// now do the get

View File

@ -78,7 +78,7 @@ info:
# The tags on paths define the menu sections in the ReDoc documentation, so
# the usage of tags must make sense for that:
# - They should be singular, not plural.
# - There should not be too many tags, or the menu becomes unwieldly. For
# - There should not be too many tags, or the menu becomes unwieldy. For
# example, it is preferable to add a path to the "System" tag instead of
# creating a tag with a single path in it.
# - The order of tags in this list defines the order in the menu.

View File

@ -78,7 +78,7 @@ info:
# The tags on paths define the menu sections in the ReDoc documentation, so
# the usage of tags must make sense for that:
# - They should be singular, not plural.
# - There should not be too many tags, or the menu becomes unwieldly. For
# - There should not be too many tags, or the menu becomes unwieldy. For
# example, it is preferable to add a path to the "System" tag instead of
# creating a tag with a single path in it.
# - The order of tags in this list defines the order in the menu.

View File

@ -78,7 +78,7 @@ info:
# The tags on paths define the menu sections in the ReDoc documentation, so
# the usage of tags must make sense for that:
# - They should be singular, not plural.
# - There should not be too many tags, or the menu becomes unwieldly. For
# - There should not be too many tags, or the menu becomes unwieldy. For
# example, it is preferable to add a path to the "System" tag instead of
# creating a tag with a single path in it.
# - The order of tags in this list defines the order in the menu.
@ -1588,7 +1588,7 @@ definitions:
may not be applied if the version number has changed from the last read. In other words,
if two update requests specify the same base version, only one of the requests can succeed.
As a result, two separate update requests that happen at the same time will not
unintentially overwrite each other.
unintentionally overwrite each other.
type: "object"
properties:
Index:

View File

@ -1626,7 +1626,7 @@ definitions:
may not be applied if the version number has changed from the last read. In other words,
if two update requests specify the same base version, only one of the requests can succeed.
As a result, two separate update requests that happen at the same time will not
unintentially overwrite each other.
unintentionally overwrite each other.
type: "object"
properties:
Index:

View File

@ -1647,7 +1647,7 @@ definitions:
may not be applied if the version number has changed from the last read. In other words,
if two update requests specify the same base version, only one of the requests can succeed.
As a result, two separate update requests that happen at the same time will not
unintentially overwrite each other.
unintentionally overwrite each other.
type: "object"
properties:
Index:

View File

@ -1674,7 +1674,7 @@ definitions:
may not be applied if the version number has changed from the last read. In other words,
if two update requests specify the same base version, only one of the requests can succeed.
As a result, two separate update requests that happen at the same time will not
unintentially overwrite each other.
unintentionally overwrite each other.
type: "object"
properties:
Index:

View File

@ -2395,7 +2395,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2399,7 +2399,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2409,7 +2409,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2406,7 +2406,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2419,7 +2419,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2422,7 +2422,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2440,7 +2440,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:

View File

@ -2043,7 +2043,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -3393,7 +3393,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -6497,7 +6497,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -2103,7 +2103,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -3472,7 +3472,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -6803,7 +6803,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -2134,7 +2134,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2420,7 +2420,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3599,7 +3599,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7085,7 +7085,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -2137,7 +2137,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2428,7 +2428,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3618,7 +3618,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7304,7 +7304,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -2170,7 +2170,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2459,7 +2459,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3649,7 +3649,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7322,7 +7322,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -2202,7 +2202,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2486,7 +2486,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3691,7 +3691,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7478,7 +7478,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -393,7 +393,7 @@ definitions:
Make the mount non-recursively read-only, but still leave the mount recursive
(unless NonRecursive is set to `true` in conjunction).
Addded in v1.44, before that version all read-only mounts were
Added in v1.44, before that version all read-only mounts were
non-recursive by default. To match the previous behaviour this
will default to `true` for clients on versions prior to v1.44.
type: "boolean"
@ -2188,7 +2188,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2472,7 +2472,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3677,7 +3677,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7464,7 +7464,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -393,7 +393,7 @@ definitions:
Make the mount non-recursively read-only, but still leave the mount recursive
(unless NonRecursive is set to `true` in conjunction).
Addded in v1.44, before that version all read-only mounts were
Added in v1.44, before that version all read-only mounts were
non-recursive by default. To match the previous behaviour this
will default to `true` for clients on versions prior to v1.44.
type: "boolean"
@ -2216,7 +2216,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2500,7 +2500,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3723,7 +3723,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7585,7 +7585,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -393,7 +393,7 @@ definitions:
Make the mount non-recursively read-only, but still leave the mount recursive
(unless NonRecursive is set to `true` in conjunction).
Addded in v1.44, before that version all read-only mounts were
Added in v1.44, before that version all read-only mounts were
non-recursive by default. To match the previous behaviour this
will default to `true` for clients on versions prior to v1.44.
type: "boolean"
@ -2216,7 +2216,7 @@ definitions:
Created:
description: |
Date and time at which the image was created as a Unix timestamp
(number of seconds sinds EPOCH).
(number of seconds since EPOCH).
type: "integer"
x-nullable: false
example: "1644009612"
@ -2518,7 +2518,7 @@ definitions:
example: false
Attachable:
description: |
Wheter a global / swarm scope network is manually attachable by regular
Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.
type: "boolean"
default: false
@ -3741,7 +3741,7 @@ definitions:
example: "json-file"
Options:
description: |
Driver-specific options for the selectd log driver, specified
Driver-specific options for the selected log driver, specified
as key/value pairs.
type: "object"
additionalProperties:
@ -7717,7 +7717,7 @@ paths:
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]

View File

@ -144,7 +144,7 @@ are not part of the underlying image's Config, and deprecated:
interval for health checks during the start period.
* `GET /info` now includes a `CDISpecDirs` field indicating the configured CDI
specifications directories. The use of the applied setting requires the daemon
to have expermental enabled, and for non-experimental daemons an empty list is
to have experimental enabled, and for non-experimental daemons an empty list is
always returned.
* `POST /networks/create` now returns a 400 if the `IPAMConfig` has invalid
values. Note that this change is _unversioned_ and applied to all API
@ -430,7 +430,7 @@ are not part of the underlying image's Config, and deprecated:
to return those without the specified labels.
* `POST /containers/create` now accepts a `fluentd-async` option in `HostConfig.LogConfig.Config`
when using the Fluentd logging driver. This option deprecates the `fluentd-async-connect`
option, which remains funtional, but will be removed in a future release. Users
option, which remains functional, but will be removed in a future release. Users
are encouraged to use the `fluentd-async` option going forward. This change is
not versioned, and affects all API versions if the daemon has this patch.
* `POST /containers/create` now accepts a `fluentd-request-ack` option in

View File

@ -224,7 +224,7 @@ func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
assert.Equal(c, outBuf.String(), "hello\nsuccess")
}
// requestHijack create a http requst to specified host with `Upgrade` header (with method
// requestHijack create a http request to specified host with `Upgrade` header (with method
// , contenttype, …), if receive a successful "101 Switching Protocols" response return
// a `io.WriteCloser` and `bufio.Reader`
func requestHijack(method, endpoint string, data io.Reader, ct, daemon string, modifiers ...func(*http.Request)) (io.WriteCloser, *bufio.Reader, error) {

View File

@ -3521,7 +3521,7 @@ func (s *DockerCLIBuildSuite) TestBuildNotVerboseFailureRemote(c *testing.T) {
// An error message should contain name server IP and port, like this:
// "dial tcp: lookup something.invalid on 172.29.128.11:53: no such host"
// The IP:port need to be removed in order to not trigger a test failur
// The IP:port need to be removed in order to not trigger a test failure
// when more than one nameserver is configured.
// While at it, also strip excessive newlines.
normalize := func(msg string) string {

View File

@ -468,7 +468,7 @@ func (s *DockerCLIPluginsSuite) TestPluginMetricsCollector(c *testing.T) {
r := cli.Docker(cli.Args("plugin", "install", "--grant-all-permissions", name), cli.Daemon(d))
assert.Assert(c, r.Error == nil, r.Combined())
// plugin lisens on localhost:19393 and proxies the metrics
// plugin listens on localhost:19393 and proxies the metrics
resp, err := http.Get("http://localhost:19393/metrics")
assert.NilError(c, err)
defer resp.Body.Close()

View File

@ -166,7 +166,7 @@ func (s *DockerCLIPortSuite) TestPortList(c *testing.T) {
func assertPortList(c *testing.T, out string, expected []string) {
c.Helper()
lines := strings.Split(strings.Trim(out, "\n "), "\n")
assert.Assert(c, is.Len(lines, len(expected)), "exepcted: %s", strings.Join(expected, ", "))
assert.Assert(c, is.Len(lines, len(expected)), "expected: %s", strings.Join(expected, ", "))
sort.Strings(lines)
sort.Strings(expected)

View File

@ -1440,7 +1440,7 @@ func (s *DockerCLIRunSuite) TestRunResolvconfUpdate(c *testing.T) {
}
// This test case is meant to test monitoring resolv.conf when it is
// a regular file not a bind mounc. So we unmount resolv.conf and replace
// a regular file not a bind mount. So we unmount resolv.conf and replace
// it with a file containing the original settings.
mounted, err := mountinfo.Mounted("/etc/resolv.conf")
if err != nil {
@ -2089,7 +2089,7 @@ func (s *DockerCLIRunSuite) TestRunMountOrdering(c *testing.T) {
}
defer os.RemoveAll(tmpDir2)
// Create a temporary tmpfs mounc.
// Create a temporary tmpfs mount.
fooDir := filepath.Join(tmpDir, "foo")
if err := os.MkdirAll(filepath.Join(tmpDir, "foo"), 0o755); err != nil {
c.Fatalf("failed to mkdir at %s - %s", fooDir, err)

View File

@ -400,7 +400,7 @@ func checkGoroutineCount(ctx context.Context, apiClient client.APIClient, expect
t.Log("Waiting for goroutines to stabilize")
first = false
}
return poll.Continue("exepcted %d goroutines, got %d", expected, n)
return poll.Continue("expected %d goroutines, got %d", expected, n)
}
return poll.Success()
}

View File

@ -702,7 +702,7 @@ func TestContainerdContainerImageInfo(t *testing.T) {
if testEnv.UsingSnapshotter() {
assert.Equal(t, ctr.Image, "docker.io/library/busybox:latest")
} else {
// This field is not set when not using contianerd backed storage.
// This field is not set when not using containerd backed storage.
assert.Equal(t, ctr.Image, "")
}
}

View File

@ -181,7 +181,7 @@ func TestDaemonHostGatewayIP(t *testing.T) {
// In this test we'll change the container state to "restarting".
// This means that the container will not be 'alive' when we attempt to restore in on daemon startup.
//
// We could do the same with `docker run -d --resetart=always busybox:latest exit 1`, and then
// We could do the same with `docker run -d --restart=always busybox:latest exit 1`, and then
// `kill -9` dockerd while the container is in "restarting" state. This is difficult to reproduce reliably
// in an automated test, so we manipulate on disk state instead.
func TestRestartDaemonWithRestartingContainer(t *testing.T) {

View File

@ -34,7 +34,7 @@ func WithImage(image string) func(*TestContainerConfig) {
}
}
// WithCmd sets the comannds of the container
// WithCmd sets the commands of the container
func WithCmd(cmds ...string) func(*TestContainerConfig) {
return func(c *TestContainerConfig) {
c.Config.Cmd = strslice.StrSlice(cmds)

View File

@ -63,7 +63,7 @@ func CheckGoroutineCount(ctx context.Context, apiClient client.SystemAPIClient,
t.Log("Waiting for goroutines to stabilize")
first = false
}
return poll.Continue("exepcted %d goroutines, got %d", expected, n)
return poll.Continue("expected %d goroutines, got %d", expected, n)
}
return poll.Success()
}

View File

@ -21,7 +21,7 @@ import (
"gotest.tools/v3/skip"
)
func TestDockerNetworkIpvlanPersistance(t *testing.T) {
func TestDockerNetworkIpvlanPersistence(t *testing.T) {
// verify the driver automatically provisions the 802.1q link (di-dummy0.70)
skip.If(t, testEnv.IsRemoteDaemon)
skip.If(t, testEnv.IsRootless, "rootless mode has different view of network")

View File

@ -20,7 +20,7 @@ import (
"gotest.tools/v3/skip"
)
func TestDockerNetworkMacvlanPersistance(t *testing.T) {
func TestDockerNetworkMacvlanPersistence(t *testing.T) {
// verify the driver automatically provisions the 802.1q link (dm-dummy0.60)
skip.If(t, testEnv.IsRemoteDaemon)
skip.If(t, testEnv.IsRootless, "rootless mode has different view of network")

View File

@ -43,7 +43,7 @@ func main() {
server := http.Server{
Addr: l.Addr().String(),
Handler: mux,
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to statisfy gosec (G112: Potential Slowloris Attack)
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to satisfy gosec (G112: Potential Slowloris Attack)
}
server.Serve(l)

View File

@ -18,7 +18,7 @@ func main() {
server := http.Server{
Addr: l.Addr().String(),
Handler: mux,
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to statisfy gosec (G112: Potential Slowloris Attack)
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to satisfy gosec (G112: Potential Slowloris Attack)
}
server.Serve(l)
}

View File

@ -15,7 +15,7 @@ func main() {
server := http.Server{
Addr: l.Addr().String(),
Handler: http.NewServeMux(),
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to statisfy gosec (G112: Potential Slowloris Attack)
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to satisfy gosec (G112: Potential Slowloris Attack)
}
server.Serve(l)
}

View File

@ -15,7 +15,7 @@ func main() {
server := http.Server{
Addr: l.Addr().String(),
Handler: http.NewServeMux(),
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to statisfy gosec (G112: Potential Slowloris Attack)
ReadHeaderTimeout: 2 * time.Second, // This server is not for production code; picked an arbitrary timeout to satisfy gosec (G112: Potential Slowloris Attack)
}
server.Serve(l)
}

View File

@ -120,7 +120,7 @@ func TestCreateServiceMultipleTimes(t *testing.T) {
// we can't just wait on no tasks for the service, counter-intuitively.
// Tasks may briefly exist but not show up, if they are in the process
// of being deallocated. To avoid this case, we should retry network remove
// a few times, to give tasks time to be deallcoated
// a few times, to give tasks time to be deallocated
poll.WaitOn(t, swarm.NoTasksForService(ctx, client, serviceID2), swarm.ServicePoll)
for retry := 0; retry < 5; retry++ {
@ -336,7 +336,7 @@ func TestCreateServiceSysctls(t *testing.T) {
client := d.NewClientT(t)
defer client.Close()
// run thie block twice, so that no matter what the default value of
// run this block twice, so that no matter what the default value of
// net.ipv4.ip_nonlocal_bind is, we can verify that setting the sysctl
// options works
for _, expected := range []string{"0", "1"} {

View File

@ -16,7 +16,7 @@ import (
// ToRootfulInRootless is used for "rootful-in-rootless" dind;
// the daemon is running in UserNS but has no access to RootlessKit API socket, host filesystem, etc.
//
// This fuction does:
// This function does:
// * Fix up OOMScoreAdj (needed since systemd v250: https://github.com/moby/moby/issues/46563)
func ToRootfulInRootless(spec *specs.Spec) {
if spec.Process == nil || spec.Process.OOMScoreAdj == nil {

View File

@ -112,7 +112,7 @@ func TestJoinWithSymlinkReplace(t *testing.T) {
// On Linux we can delete it just fine.
assert.NilError(t, err, "failed to remove symlink")
// Replace target with a symlink to /etc/paswd
// Replace target with a symlink to /etc/passwd
err = os.Symlink("/etc/passwd", target)
assert.NilError(t, err, "failed to create symlink")
}

View File

@ -689,7 +689,7 @@ func (ep *Endpoint) deleteServiceInfoFromCluster(sb *Sandbox, fullRemove bool, m
log.G(context.TODO()).Debugf("deleteServiceInfoFromCluster from %s START for %s %s", method, ep.svcName, ep.ID())
// Avoid a race w/ with a container that aborts preemptively. This would
// get caught in disableServceInNetworkDB, but we check here to make the
// get caught in disableServiceInNetworkDB, but we check here to make the
// nature of the condition more clear.
// See comment in addServiceInfoToCluster()
if err := sb.GetEndpoint(ep.ID()); err == nil {
@ -779,7 +779,7 @@ func (n *Network) addDriverWatches() {
go c.handleTableEvents(ch, n.handleDriverTableEvent)
d, err := n.driver(false)
if err != nil {
log.G(context.TODO()).Errorf("Could not resolve driver %s while walking driver tabl: %v", n.networkType, err)
log.G(context.TODO()).Errorf("Could not resolve driver %s while walking driver table: %v", n.networkType, err)
return
}

View File

@ -72,7 +72,7 @@ type EndpointRecord struct {
Aliases []string `protobuf:"bytes,7,rep,name=aliases,proto3" json:"aliases,omitempty"`
// List of aliases task specific aliases
TaskAliases []string `protobuf:"bytes,8,rep,name=task_aliases,json=taskAliases,proto3" json:"task_aliases,omitempty"`
// Whether this enpoint's service has been disabled
// Whether this endpoint's service has been disabled
ServiceDisabled bool `protobuf:"varint,9,opt,name=service_disabled,json=serviceDisabled,proto3" json:"service_disabled,omitempty"`
}

View File

@ -38,7 +38,7 @@ message EndpointRecord {
// List of aliases task specific aliases
repeated string task_aliases = 8;
// Whether this enpoint's service has been disabled
// Whether this endpoint's service has been disabled
bool service_disabled = 9;
}

View File

@ -505,7 +505,7 @@ func pushReservation(bytePos, bitPos uint64, head *sequence, release bool) *sequ
return newHead
}
// Current sequence inevitably looses one block, upadate count
// Current sequence inevitably looses one block, update count
current.count--
// Create new sequence

View File

@ -1109,7 +1109,7 @@ func testSetRollover(t *testing.T, serial bool) {
t.Fatalf("Unexpected failure on allocation %d: %v\nSeed: %d\n%s", i, err, seed, hnd)
}
}
// Now requesting to allocate the unallocated random bits (qurter of the number of bits) should
// Now requesting to allocate the unallocated random bits (quarter of the number of bits) should
// leave no more bits that can be allocated.
if hnd.Unselected() != 0 {
t.Fatalf("Unexpected number of unselected bits %d, Expected %d", hnd.Unselected(), 0)

View File

@ -759,7 +759,7 @@ func doWriteWaitLeaveJoin(ips []string, args []string) {
fmt.Fprintf(os.Stderr, "doWriteWaitLeaveJoin succeeded in %d msec", opTime)
}
var cmdArgChec = map[string]int{
var cmdArgCheck = map[string]int{
"debug": 0,
"fail": 0,
"ready": 2,
@ -777,8 +777,8 @@ func Client(args []string) {
log.G(context.TODO()).Infof("[CLIENT] Starting with arguments %v", args)
command := args[0]
if len(args) < cmdArgChec[command] {
log.G(context.TODO()).Fatalf("Command %s requires %d arguments, passed %d, aborting...", command, cmdArgChec[command], len(args))
if len(args) < cmdArgCheck[command] {
log.G(context.TODO()).Fatalf("Command %s requires %d arguments, passed %d, aborting...", command, cmdArgCheck[command], len(args))
}
switch command {

View File

@ -95,7 +95,7 @@ func handleTableEvents(tableName string, ch *events.Channel) {
return
case evt := <-ch.C:
log.G(context.TODO()).Infof("Recevied new event on:%s", tableName)
log.G(context.TODO()).Infof("Received new event on:%s", tableName)
switch event := evt.(type) {
case networkdb.CreateEvent:
// nid = event.NetworkID

View File

@ -658,7 +658,7 @@ func TestServiceNetworkUpdate(t *testing.T) {
err = na.Allocate(n2)
assert.Check(t, err)
// Attach a network to a service spec nd allocate a service
// Attach a network to a service spec and allocate a service
s := &api.Service{
ID: "testID1",
Spec: api.ServiceSpec{

View File

@ -101,7 +101,7 @@ func (s *Server) EnableDiagnostic(ip string, port int) {
}(s)
}
// DisableDiagnostic stop the dubug and closes the tcp socket
// DisableDiagnostic stop the debug and closes the tcp socket
func (s *Server) DisableDiagnostic() {
s.mu.Lock()
defer s.mu.Unlock()

View File

@ -115,7 +115,7 @@ This section describes traffic flow of request and reply to/from a service with
4. The request arrives at eth0 of container NS with dstIP=10.255.0.5, dstPort=30000, srcIP=10.255.0.x (eth1 IP in ingress_sbox NS), srcPort=EMPHEMERAL_PORT. Before routing, it?s dstPort is changed to 80 via nat rule in service setup (3), and is allowed to be forwarded to local process by INPUT rule in service setup (2) post routig. The process listening on tcp:80 receives request with dstIP=10.255.0.5, dstPort=80, srcIP=10.255.0.2, , srcPort=EPHEMERAL_PORT.
5. The process replies, The reply has dstIP=10.255.0.2, dstPort=EPHEMERAL_PORT, srcIp=not_known, srcPort=80. It goes through filter rule in OUTPUT chain in service setup(2), which allows it to pass. It goes through routing that determines outbound interface is eth1, and srcIP=10.255.0.5; and it ?un-dnats? srcPort=80 to 30000 via nat table rule in service setup (3).
6. The reply arrives at br0 in ingress NS with dstIP=10.255.0.2, dstPort=EPHEMERAL_PORT, srcIP=10.255.0.5, srcPort=30000, which duly forwarded it to ...
7. The eh0 interface in sb_ingress NS. The reply first go through ipvs LB that ?un-dnats? srcIP from 10.255.0.5 to 172.18.0.2; then ?un-snats? via nat rule in service setup (8) dstIP from 10.255.0.2 to CLIENT_IP, dstPort from EMPHERAL_PORT to CLIENT_PORT.
7. The eh0 interface in sb_ingress NS. The reply first go through ipvs LB that ?un-dnats? srcIP from 10.255.0.5 to 172.18.0.2; then ?un-snats? via nat rule in service setup (8) dstIP from 10.255.0.2 to CLIENT_IP, dstPort from EPHEMERAL_PORT to CLIENT_PORT.
8. The reply arrives at docker_gwbridge0 interface of host NS with dstIP=CLIENT_IP, dstPort=CLIENT_PORT, srcIP=172.18.0.2, srcPort=30000. The reply ?un-snats? with nat rule in service setup(6) with srcIP changes to 172.31.2.1. And is then forwarded out of eth0 interface, and complete the traffic flow. From external view, request enters host with dstIP=172.31.2.1, dstPort=30000, srcIP=CLIENT_IP, srcPort=CLIENT_PORT; and reply exits with dstIP=CLIENT_IP, dstPort=CLIENT_PORT, srcIP=172.31.2.1, srcPort=30000.

View File

@ -964,7 +964,7 @@ func (d *driver) deleteNetwork(nid string) error {
config := n.config
n.Unlock()
// delele endpoints belong to this network
// delete endpoints belong to this network
for _, ep := range n.endpoints {
if err := n.releasePorts(ep); err != nil {
log.G(context.TODO()).Warn(err)

View File

@ -44,7 +44,7 @@ func setupIPv6BridgeNetFiltering(config *networkConfiguration, _ *bridgeInterfac
return nil
}
// Enable bridge net filtering if not already enabled. See github issue #11404
// Enable bridge net filtering if not already enabled. See GitHub issue #11404
func enableBridgeNetFiltering(nfParam string) error {
enabled, err := getKernelBoolParam(nfParam)
if err != nil {

View File

@ -299,7 +299,7 @@ func (d *driver) peerAddOp(nid, eid string, peerIP net.IP, peerIPMask net.IPMask
sbox := n.sandbox()
if sbox == nil {
// We are hitting this case for all the events that are arriving before that the sandbox
// is being created. The peer got already added into the database and the sanbox init will
// is being created. The peer got already added into the database and the sandbox init will
// call the peerDbUpdateSandbox that will configure all these peers from the database
return nil
}

View File

@ -448,7 +448,7 @@ func (d *driver) DeleteNetwork(nid string) error {
delete(d.networks, nid)
d.Unlock()
// delele endpoints belong to this network
// delete endpoints belong to this network
for _, ep := range n.endpoints {
if err := d.storeDelete(ep); err != nil {
log.G(context.TODO()).Warnf("Failed to remove bridge endpoint %.7s from store: %v", ep.id, err)

View File

@ -775,7 +775,7 @@ func (ep *Endpoint) sbLeave(ctx context.Context, sb *Sandbox, force bool) error
}
// Update the store about the sandbox detach only after we
// have completed sb.clearNetworkresources above to avoid
// have completed sb.clearNetworkResources above to avoid
// spurious logs when cleaning up the sandbox when the daemon
// ungracefully exits and restarts before completing sandbox
// detach but after store has been updated.

View File

@ -14,7 +14,7 @@ import (
bolt "go.etcd.io/bbolt"
)
// ErrBoltBucketOptionMissing is thrown when boltBcuket config option is missing
// ErrBoltBucketOptionMissing is thrown when boltBucket config option is missing
var ErrBoltBucketOptionMissing = errors.New("boltBucket config option missing")
const filePerm = 0o644

View File

@ -59,7 +59,7 @@ type Store interface {
Close()
}
// KVPair represents {Key, Value, Lastindex} tuple
// KVPair represents {Key, Value, LastIndex} tuple
type KVPair struct {
Key string
Value []byte

View File

@ -44,7 +44,7 @@ func (n NetworkToSplit) Overlaps(p netip.Prefix) bool {
return n.Base.Overlaps(p)
}
// GetGlobalScopeDefaultNetworks returns a copy of the global-sopce network list.
// GetGlobalScopeDefaultNetworks returns a copy of the global-scope network list.
func GetGlobalScopeDefaultNetworks() []*NetworkToSplit {
return slices.Clone(globalScopeDefaultNetworks)
}

View File

@ -2050,7 +2050,7 @@ func (n *Network) ResolveIP(_ context.Context, ip string) string {
// because of interleave of different events from different sources (local container create vs
// network db notifications)
// In such cases the resolution will be based on the first element of the set, and can vary
// during the system stabilitation
// during the system stabilization
elem := elemSet[0]
if elem.extResolver {
return ""

View File

@ -294,7 +294,7 @@ func (nDB *NetworkDB) rejoinClusterBootStrap() {
}
bootStrapIPs := make([]string, 0, len(nDB.bootStrapIP))
for _, bootIP := range nDB.bootStrapIP {
// botostrap IPs are usually IP:port from the Join
// bootstrap IPs are usually IP:port from the Join
var bootstrapIP net.IP
ipStr, _, err := net.SplitHostPort(bootIP)
if err != nil {

View File

@ -213,7 +213,7 @@ func (nDB *NetworkDB) handleTableEvent(tEvent *TableEvent, isBulkSync bool) bool
// 2) the residual reapTime is higher than 1/6 of the total reapTime.
// If the residual reapTime is lower or equal to 1/6 of the total reapTime don't bother broadcasting it around
// most likely the cluster is already aware of it
// This also reduce the possibility that deletion of entries close to their garbage collection ends up circuling around
// This also reduce the possibility that deletion of entries close to their garbage collection ends up circling around
// forever
// log.G(ctx).Infof("exiting on delete not knowing the obj with rebroadcast:%t", network.inSync)
return network.inSync && e.reapTime > nDB.config.reapEntryInterval/6

View File

@ -189,7 +189,7 @@ type Config struct {
// reapEntryInterval duration of a deleted entry before being garbage collected
reapEntryInterval time.Duration
// reapNetworkInterval duration of a delted network before being garbage collected
// reapNetworkInterval duration of a deleted network before being garbage collected
// NOTE this MUST always be higher than reapEntryInterval
reapNetworkInterval time.Duration
@ -727,7 +727,7 @@ func (nDB *NetworkDB) deleteNetworkNode(nid string, nodeName string) {
nDB.networkNodes[nid] = newNodes
}
// findCommonnetworks find the networks that both this node and the
// findCommonNetworks find the networks that both this node and the
// passed node have joined.
func (nDB *NetworkDB) findCommonNetworks(nodeName string) []string {
nDB.RLock()

View File

@ -879,7 +879,7 @@ func TestNetworkDBIslands(t *testing.T) {
// Give some time to let the system propagate the messages and free up the ports
check := func(t poll.LogT) poll.Result {
// Verify that the nodes are actually all gone and marked appropiately
// Verify that the nodes are actually all gone and marked appropriately
for name, db := range checkDBs {
db.RLock()
if (len(db.leftNodes) != 3) || (len(db.failedNodes) != 0) {

View File

@ -91,7 +91,7 @@ type Resolver struct {
logger *log.Entry
fwdSem *semaphore.Weighted // Limit the number of concurrent external DNS requests in-flight
logInverval rate.Sometimes // Rate-limit logging about hitting the fwdSem limit
logInterval rate.Sometimes // Rate-limit logging about hitting the fwdSem limit
}
// NewResolver creates a new instance of the Resolver
@ -101,7 +101,7 @@ func NewResolver(address string, proxyDNS bool, backend DNSBackend) *Resolver {
err: fmt.Errorf("setup not done yet"),
startCh: make(chan struct{}, 1),
fwdSem: semaphore.NewWeighted(maxConcurrent),
logInverval: rate.Sometimes{Interval: logInterval},
logInterval: rate.Sometimes{Interval: logInterval},
}
r.listenAddress, _ = netip.ParseAddr(address)
r.proxyDNS.Store(proxyDNS)
@ -559,7 +559,7 @@ func (r *Resolver) forwardExtDNS(ctx context.Context, proto string, remoteAddr n
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
r.logInverval.Do(func() {
r.logInterval.Do(func() {
r.log(ctx).Errorf("[resolver] more than %v concurrent queries", maxConcurrent)
})
}
@ -647,7 +647,7 @@ func (r *Resolver) exchange(ctx context.Context, proto string, extDNS extDNSEntr
// truncating them on our end to forward verbatim to the client.
// Some DNS servers (e.g. Mikrotik RouterOS) don't support
// EDNS(0) and may send replies over UDP longer than 512 bytes
// regardless of what size limit, if any, was advertized in the
// regardless of what size limit, if any, was advertised in the
// query message. Note that ExchangeWithConn will override this
// value if it detects an EDNS OPT record in query so only
// oversized replies to non-EDNS queries will benefit.

View File

@ -56,11 +56,11 @@ func TestDNSIPQuery(t *testing.T) {
t.Fatal(err)
}
// add service records which are used to resolve names. These are the real targets for the DNS querries
// add service records which are used to resolve names. These are the real targets for the DNS queries
n.addSvcRecords("ep1", "name1", "svc1", net.ParseIP("192.168.0.1"), net.IP{}, true, "test")
w := new(tstwriter)
// the unit tests right now will focus on non-proxyed DNS requests
// the unit tests right now will focus on non-proxied DNS requests
r := NewResolver(resolverIPSandbox, false, sb)
// test name1's IP is resolved correctly with the default A type query
@ -177,7 +177,7 @@ func TestDNSProxyServFail(t *testing.T) {
r.SetExtServers(localDNSEntries)
r.serveDNS(w, q)
if nRequests != 2 {
t.Fatalf("Expected 2 DNS querries. Found: %d", nRequests)
t.Fatalf("Expected 2 DNS queries. Found: %d", nRequests)
}
t.Logf("Expected number of DNS requests generated")
}

View File

@ -161,7 +161,7 @@ func (sb *Sandbox) delete(ctx context.Context, force bool) error {
if ep.endpointInGWNetwork() && !force {
continue
}
// Retain the sanbdox if we can't obtain the network from store.
// Retain the sandbox if we can't obtain the network from store.
if _, err := c.getNetworkFromStore(ep.getNetwork().ID()); err != nil {
if !c.isSwarmNode() {
retain = true

View File

@ -216,7 +216,7 @@ func (c *Controller) cleanupServiceBindings(cleanupNID string) {
func makeServiceCleanupFunc(c *Controller, s *service, nID, eID string, vip net.IP, ip net.IP) func() {
// ContainerName and taskAliases are not available here, this is still fine because the Service discovery
// cleanup already happened before. The only thing that rmServiceBinding is still doing here a part from the Load
// Balancer bookeeping, is to keep consistent the mapping of endpoint to IP.
// Balancer bookkeeping, is to keep consistent the mapping of endpoint to IP.
return func() {
if err := c.rmServiceBinding(s.name, s.id, nID, eID, "", vip, s.ingressPorts, s.aliases, []string{}, ip, "cleanupServiceBindings", false, true); err != nil {
log.G(context.TODO()).Errorf("Failed to remove service bindings for service %s network %s endpoint %s while cleanup: %v", s.id, nID, eID, err)

View File

@ -77,7 +77,7 @@ func findIfaceDstName(sb *Sandbox, ep *Endpoint) string {
return ""
}
// Add loadbalancer backend to the loadbalncer sandbox for the network.
// Add loadbalancer backend to the loadbalancer sandbox for the network.
// If needed add the service as well.
func (n *Network) addLBBackend(ip net.IP, lb *loadBalancer) {
if len(lb.vip) == 0 {

View File

@ -40,7 +40,7 @@ type TransportPort struct {
Port uint16
}
// Equal checks if this instance of Transportport is equal to the passed one
// Equal checks if this instance of TransportPort is equal to the passed one
func (t *TransportPort) Equal(o *TransportPort) bool {
if t == o {
return true

View File

@ -21,7 +21,7 @@ var (
knownCaps map[string]*struct{}
)
// GetAllCapabilities returns all capabilities that are availeble in the current
// GetAllCapabilities returns all capabilities that are available in the current
// environment.
func GetAllCapabilities() []string {
initCaps()

Some files were not shown because too many files have changed in this diff Show More