From 59eba0ae1360171ba3b4fe36d0d35d9e8720ce90 Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Wed, 28 Aug 2024 09:17:49 +1000 Subject: [PATCH] Fix typos Signed-off-by: Nathan Baulch --- .github/workflows/bin-image.yml | 2 +- .golangci.yml | 2 +- Makefile | 2 +- api/server/router/network/network_routes.go | 10 +++++----- api/swagger.yaml | 10 +++++----- api/types/filters/parse.go | 2 +- api/types/image/summary.go | 2 +- api/types/swarm/swarm.go | 2 +- api/types/volume/cluster_volume.go | 2 +- cmd/dockerd/daemon.go | 2 +- container/container.go | 4 ++-- daemon/cdi.go | 2 +- daemon/cluster/convert/service_test.go | 2 +- daemon/cluster/executor/container/adapter_test.go | 2 +- daemon/containerd/image_import.go | 2 +- daemon/containerd/service.go | 2 +- daemon/containerfs_linux.go | 2 +- daemon/daemon.go | 4 ++-- daemon/images/service.go | 2 +- daemon/images/store.go | 6 +++--- daemon/logger/journald/internal/fake/sender.go | 2 +- daemon/logger/journald/read.go | 2 +- daemon/logger/local/local_test.go | 2 +- daemon/logger/loggerutils/logfile.go | 2 +- daemon/logger/plugin_unix.go | 2 +- daemon/monitor.go | 2 +- daemon/oci_linux.go | 2 +- distribution/manifest_test.go | 2 +- docs/api/v1.25.yaml | 2 +- docs/api/v1.26.yaml | 2 +- docs/api/v1.27.yaml | 4 ++-- docs/api/v1.28.yaml | 2 +- docs/api/v1.29.yaml | 2 +- docs/api/v1.30.yaml | 2 +- docs/api/v1.32.yaml | 2 +- docs/api/v1.33.yaml | 2 +- docs/api/v1.34.yaml | 2 +- docs/api/v1.35.yaml | 2 +- docs/api/v1.36.yaml | 2 +- docs/api/v1.37.yaml | 2 +- docs/api/v1.38.yaml | 2 +- docs/api/v1.39.yaml | 6 +++--- docs/api/v1.40.yaml | 6 +++--- docs/api/v1.41.yaml | 8 ++++---- docs/api/v1.42.yaml | 8 ++++---- docs/api/v1.43.yaml | 8 ++++---- docs/api/v1.44.yaml | 8 ++++---- docs/api/v1.45.yaml | 10 +++++----- docs/api/v1.46.yaml | 10 +++++----- docs/api/v1.47.yaml | 10 +++++----- docs/api/version-history.md | 4 ++-- integration-cli/docker_api_attach_test.go | 2 +- integration-cli/docker_cli_build_test.go | 2 +- integration-cli/docker_cli_plugins_test.go | 2 +- integration-cli/docker_cli_port_test.go | 2 +- integration-cli/docker_cli_run_test.go | 4 ++-- integration-cli/docker_utils_test.go | 2 +- integration/container/create_test.go | 2 +- integration/container/daemon_linux_test.go | 2 +- integration/internal/container/ops.go | 2 +- integration/internal/system/goroutines.go | 2 +- integration/network/ipvlan/ipvlan_test.go | 2 +- integration/network/macvlan/macvlan_test.go | 2 +- integration/plugin/logging/cmd/close_on_start/main.go | 2 +- integration/plugin/logging/cmd/discard/main.go | 2 +- integration/plugin/logging/cmd/dummy/main.go | 2 +- integration/plugin/volumes/cmd/dummy/main.go | 2 +- integration/service/create_test.go | 4 ++-- internal/rootless/specconv/specconv_linux.go | 2 +- internal/safepath/join_test.go | 2 +- libnetwork/agent.go | 4 ++-- libnetwork/agent.pb.go | 2 +- libnetwork/agent.proto | 2 +- libnetwork/bitmap/sequence.go | 2 +- libnetwork/bitmap/sequence_test.go | 2 +- libnetwork/cmd/networkdb-test/dbclient/ndbClient.go | 6 +++--- .../cmd/networkdb-test/dummyclient/dummyClient.go | 2 +- libnetwork/cnmallocator/networkallocator_test.go | 2 +- libnetwork/diagnostic/server.go | 2 +- libnetwork/docs/network.md | 2 +- libnetwork/drivers/bridge/bridge_linux.go | 2 +- libnetwork/drivers/bridge/setup_bridgenetfiltering.go | 2 +- libnetwork/drivers/overlay/peerdb.go | 2 +- libnetwork/drivers/windows/windows.go | 2 +- libnetwork/endpoint.go | 2 +- libnetwork/internal/kvstore/boltdb/boltdb.go | 2 +- libnetwork/internal/kvstore/kvstore.go | 2 +- libnetwork/ipamutils/utils.go | 2 +- libnetwork/network.go | 2 +- libnetwork/networkdb/cluster.go | 2 +- libnetwork/networkdb/delegate.go | 2 +- libnetwork/networkdb/networkdb.go | 4 ++-- libnetwork/networkdb/networkdb_test.go | 2 +- libnetwork/resolver.go | 8 ++++---- libnetwork/resolver_unix_test.go | 6 +++--- libnetwork/sandbox.go | 2 +- libnetwork/service_common.go | 2 +- libnetwork/service_linux.go | 2 +- libnetwork/types/types.go | 2 +- oci/caps/utils.go | 2 +- opts/opts_test.go | 4 ++-- pkg/chrootarchive/archive.go | 2 +- pkg/jsonmessage/jsonmessage.go | 2 +- pkg/meminfo/meminfo.go | 2 +- pkg/pools/pools.go | 2 +- pkg/pools/pools_test.go | 2 +- pkg/system/xattrs_linux.go | 2 +- plugin/store_test.go | 4 ++-- registry/config.go | 2 +- reports/2017-06-12.md | 4 ++-- testutil/fixtures/plugin/basic/basic.go | 2 +- volume/local/local_linux_test.go | 2 +- volume/local/local_test.go | 2 +- volume/service/opts/opts.go | 2 +- volume/service/service.go | 4 ++-- volume/service/store_test.go | 2 +- 116 files changed, 173 insertions(+), 173 deletions(-) diff --git a/.github/workflows/bin-image.yml b/.github/workflows/bin-image.yml index 40418f88ca5f2..6465b398220f0 100644 --- a/.github/workflows/bin-image.yml +++ b/.github/workflows/bin-image.yml @@ -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 diff --git a/.golangci.yml b/.golangci.yml index fd5606c683b15..627958db13fdc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/Makefile b/Makefile index e89172be71e95..d166668458ba2 100644 --- a/Makefile +++ b/Makefile @@ -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)) diff --git a/api/server/router/network/network_routes.go b/api/server/router/network/network_routes.go index f053468bff335..dc53d70d965ca 100644 --- a/api/server/router/network/network_routes.go +++ b/api/server/router/network/network_routes.go @@ -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) diff --git a/api/swagger.yaml b/api/swagger.yaml index 9d94c3ca965e3..bc3cf62722fe6 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -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"] diff --git a/api/types/filters/parse.go b/api/types/filters/parse.go index 0c39ab5f18b53..0914b2a4410c7 100644 --- a/api/types/filters/parse.go +++ b/api/types/filters/parse.go @@ -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] diff --git a/api/types/image/summary.go b/api/types/image/summary.go index c7168fe62eab8..e87e216a28b35 100644 --- a/api/types/image/summary.go +++ b/api/types/image/summary.go @@ -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"` diff --git a/api/types/swarm/swarm.go b/api/types/swarm/swarm.go index 3eae4b9b297d2..1b4be6fffbab6 100644 --- a/api/types/swarm/swarm.go +++ b/api/types/swarm/swarm.go @@ -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"` } diff --git a/api/types/volume/cluster_volume.go b/api/types/volume/cluster_volume.go index bbd9ff0b8f977..618a4816209a7 100644 --- a/api/types/volume/cluster_volume.go +++ b/api/types/volume/cluster_volume.go @@ -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"` } diff --git a/cmd/dockerd/daemon.go b/cmd/dockerd/daemon.go index 9b1e7f0449816..0bd21977ac739 100644 --- a/cmd/dockerd/daemon.go +++ b/cmd/dockerd/daemon.go @@ -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 diff --git a/container/container.go b/container/container.go index 25907e1202ab9..d9c5bb736c9ce 100644 --- a/container/container.go +++ b/container/container.go @@ -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. diff --git a/daemon/cdi.go b/daemon/cdi.go index 815e15f641c78..75b59511135a7 100644 --- a/daemon/cdi.go +++ b/daemon/cdi.go @@ -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) } diff --git a/daemon/cluster/convert/service_test.go b/daemon/cluster/convert/service_test.go index 6f058829ee315..29b9d28201f1d 100644 --- a/daemon/cluster/convert/service_test.go +++ b/daemon/cluster/convert/service_test.go @@ -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{ diff --git a/daemon/cluster/executor/container/adapter_test.go b/daemon/cluster/executor/container/adapter_test.go index c57d3bfc2abba..03b3b9ab45c9c 100644 --- a/daemon/cluster/executor/container/adapter_test.go +++ b/daemon/cluster/executor/container/adapter_test.go @@ -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", } diff --git a/daemon/containerd/image_import.go b/daemon/containerd/image_import.go index 4b0c2ebe9dff3..8b37c8a083f9a 100644 --- a/daemon/containerd/image_import.go +++ b/daemon/containerd/image_import.go @@ -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 { diff --git a/daemon/containerd/service.go b/daemon/containerd/service.go index 4c1f42fbf483a..cad463c7650fb 100644 --- a/daemon/containerd/service.go +++ b/daemon/containerd/service.go @@ -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")) diff --git a/daemon/containerfs_linux.go b/daemon/containerfs_linux.go index 77c86de37fda7..bd654691c6b46 100644 --- a/daemon/containerfs_linux.go +++ b/daemon/containerfs_linux.go @@ -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 diff --git a/daemon/daemon.go b/daemon/daemon.go index 3238f5d72e399..b3e975e66467d 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -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). diff --git a/daemon/images/service.go b/daemon/images/service.go index 977ab144e4b8e..b1f2055f82a7c 100644 --- a/daemon/images/service.go +++ b/daemon/images/service.go @@ -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) diff --git a/daemon/images/store.go b/daemon/images/store.go index ea1dce019e738..98a16240a4ccd 100644 --- a/daemon/images/store.go +++ b/daemon/images/store.go @@ -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 diff --git a/daemon/logger/journald/internal/fake/sender.go b/daemon/logger/journald/internal/fake/sender.go index 050f1b71ad407..4fa6866f8137a 100644 --- a/daemon/logger/journald/internal/fake/sender.go +++ b/daemon/logger/journald/internal/fake/sender.go @@ -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 diff --git a/daemon/logger/journald/read.go b/daemon/logger/journald/read.go index 1b9fda599538d..3e0e2a485c9e1 100644 --- a/daemon/logger/journald/read.go +++ b/daemon/logger/journald/read.go @@ -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 diff --git a/daemon/logger/local/local_test.go b/daemon/logger/local/local_test.go index fe24648065974..c059db31efe21 100644 --- a/daemon/logger/local/local_test.go +++ b/daemon/logger/local/local_test.go @@ -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)) diff --git a/daemon/logger/loggerutils/logfile.go b/daemon/logger/loggerutils/logfile.go index 73e3742482f5a..30b9d2ac2de32 100644 --- a/daemon/logger/loggerutils/logfile.go +++ b/daemon/logger/loggerutils/logfile.go @@ -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() diff --git a/daemon/logger/plugin_unix.go b/daemon/logger/plugin_unix.go index 7a8c6aebd627b..1951ca88bdeca 100644 --- a/daemon/logger/plugin_unix.go +++ b/daemon/logger/plugin_unix.go @@ -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) diff --git a/daemon/monitor.go b/daemon/monitor.go index de15f36c7e9bb..a52c19834b89c 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -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 { diff --git a/daemon/oci_linux.go b/daemon/oci_linux.go index bf3cffe4d4b2a..75beed4e578e4 100644 --- a/daemon/oci_linux.go +++ b/daemon/oci_linux.go @@ -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( diff --git a/distribution/manifest_test.go b/distribution/manifest_test.go index 7fb6f8b624bea..2daafbe7d298c 100644 --- a/distribution/manifest_test.go +++ b/distribution/manifest_test.go @@ -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 diff --git a/docs/api/v1.25.yaml b/docs/api/v1.25.yaml index 1a8008ab4e94a..6ed2710868019 100644 --- a/docs/api/v1.25.yaml +++ b/docs/api/v1.25.yaml @@ -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. diff --git a/docs/api/v1.26.yaml b/docs/api/v1.26.yaml index b0a0ba740706c..e1db4da02cdc2 100644 --- a/docs/api/v1.26.yaml +++ b/docs/api/v1.26.yaml @@ -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. diff --git a/docs/api/v1.27.yaml b/docs/api/v1.27.yaml index 738ace56789db..5f616f09a738a 100644 --- a/docs/api/v1.27.yaml +++ b/docs/api/v1.27.yaml @@ -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: diff --git a/docs/api/v1.28.yaml b/docs/api/v1.28.yaml index 60dcaa267074f..06c053063ea47 100644 --- a/docs/api/v1.28.yaml +++ b/docs/api/v1.28.yaml @@ -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: diff --git a/docs/api/v1.29.yaml b/docs/api/v1.29.yaml index 3b4c67dbad30c..32788b376f216 100644 --- a/docs/api/v1.29.yaml +++ b/docs/api/v1.29.yaml @@ -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: diff --git a/docs/api/v1.30.yaml b/docs/api/v1.30.yaml index 2e6519d9f1ef2..fdb30e06f2553 100644 --- a/docs/api/v1.30.yaml +++ b/docs/api/v1.30.yaml @@ -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: diff --git a/docs/api/v1.32.yaml b/docs/api/v1.32.yaml index 7cbe63c1656ba..3a05f93ca4ea1 100644 --- a/docs/api/v1.32.yaml +++ b/docs/api/v1.32.yaml @@ -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: diff --git a/docs/api/v1.33.yaml b/docs/api/v1.33.yaml index 1c611c3ee7eaa..d0d149ef38ed4 100644 --- a/docs/api/v1.33.yaml +++ b/docs/api/v1.33.yaml @@ -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: diff --git a/docs/api/v1.34.yaml b/docs/api/v1.34.yaml index 97e7454a260c7..2c91066069e1a 100644 --- a/docs/api/v1.34.yaml +++ b/docs/api/v1.34.yaml @@ -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: diff --git a/docs/api/v1.35.yaml b/docs/api/v1.35.yaml index cc58e9ff859d5..b91801da08572 100644 --- a/docs/api/v1.35.yaml +++ b/docs/api/v1.35.yaml @@ -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: diff --git a/docs/api/v1.36.yaml b/docs/api/v1.36.yaml index 3bb81f0b4e430..f8ba07ba39d12 100644 --- a/docs/api/v1.36.yaml +++ b/docs/api/v1.36.yaml @@ -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: diff --git a/docs/api/v1.37.yaml b/docs/api/v1.37.yaml index 64e12f0bbece1..1fdcb5ebe5947 100644 --- a/docs/api/v1.37.yaml +++ b/docs/api/v1.37.yaml @@ -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: diff --git a/docs/api/v1.38.yaml b/docs/api/v1.38.yaml index 30437fc9e841a..a2109991eda11 100644 --- a/docs/api/v1.38.yaml +++ b/docs/api/v1.38.yaml @@ -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: diff --git a/docs/api/v1.39.yaml b/docs/api/v1.39.yaml index 2b48fc21a9715..d93d2758d9310 100644 --- a/docs/api/v1.39.yaml +++ b/docs/api/v1.39.yaml @@ -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"] diff --git a/docs/api/v1.40.yaml b/docs/api/v1.40.yaml index bfe256ffef62f..8b81aa4c7a625 100644 --- a/docs/api/v1.40.yaml +++ b/docs/api/v1.40.yaml @@ -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"] diff --git a/docs/api/v1.41.yaml b/docs/api/v1.41.yaml index 1f76ec9e81acb..96af6f1e4e80e 100644 --- a/docs/api/v1.41.yaml +++ b/docs/api/v1.41.yaml @@ -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"] diff --git a/docs/api/v1.42.yaml b/docs/api/v1.42.yaml index 5c12a3489584e..0c28b70452277 100644 --- a/docs/api/v1.42.yaml +++ b/docs/api/v1.42.yaml @@ -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"] diff --git a/docs/api/v1.43.yaml b/docs/api/v1.43.yaml index a575c62fee119..449c006720876 100644 --- a/docs/api/v1.43.yaml +++ b/docs/api/v1.43.yaml @@ -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"] diff --git a/docs/api/v1.44.yaml b/docs/api/v1.44.yaml index 419c2cf7a81ee..2e52dd062b24f 100644 --- a/docs/api/v1.44.yaml +++ b/docs/api/v1.44.yaml @@ -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"] diff --git a/docs/api/v1.45.yaml b/docs/api/v1.45.yaml index e02003fa8542a..3a84e45f95758 100644 --- a/docs/api/v1.45.yaml +++ b/docs/api/v1.45.yaml @@ -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"] diff --git a/docs/api/v1.46.yaml b/docs/api/v1.46.yaml index a41906a08bf47..cab587de50a93 100644 --- a/docs/api/v1.46.yaml +++ b/docs/api/v1.46.yaml @@ -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"] diff --git a/docs/api/v1.47.yaml b/docs/api/v1.47.yaml index 1813d56ca5e28..b9bf2c60ec6ae 100644 --- a/docs/api/v1.47.yaml +++ b/docs/api/v1.47.yaml @@ -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"] diff --git a/docs/api/version-history.md b/docs/api/version-history.md index 01da617c01424..bc9f0b220e936 100644 --- a/docs/api/version-history.md +++ b/docs/api/version-history.md @@ -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 diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go index 7dedb738a9181..1ada5ba8dca9c 100644 --- a/integration-cli/docker_api_attach_test.go +++ b/integration-cli/docker_api_attach_test.go @@ -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) { diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 66e30e296bccb..0dbfaab7d03e6 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -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 { diff --git a/integration-cli/docker_cli_plugins_test.go b/integration-cli/docker_cli_plugins_test.go index f3be79fbdd25b..162000dfbe5d2 100644 --- a/integration-cli/docker_cli_plugins_test.go +++ b/integration-cli/docker_cli_plugins_test.go @@ -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() diff --git a/integration-cli/docker_cli_port_test.go b/integration-cli/docker_cli_port_test.go index 96b38e0216bb7..5c145bc3bcdb2 100644 --- a/integration-cli/docker_cli_port_test.go +++ b/integration-cli/docker_cli_port_test.go @@ -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) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 8ddce7b4aa23a..2c7a07e846e65 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -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) diff --git a/integration-cli/docker_utils_test.go b/integration-cli/docker_utils_test.go index 81964fe90585a..c9ef7ccc06930 100644 --- a/integration-cli/docker_utils_test.go +++ b/integration-cli/docker_utils_test.go @@ -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() } diff --git a/integration/container/create_test.go b/integration/container/create_test.go index ab45917645cb5..849837e608e4a 100644 --- a/integration/container/create_test.go +++ b/integration/container/create_test.go @@ -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, "") } } diff --git a/integration/container/daemon_linux_test.go b/integration/container/daemon_linux_test.go index 125b2fefbf4ae..843f7e0bfdf2b 100644 --- a/integration/container/daemon_linux_test.go +++ b/integration/container/daemon_linux_test.go @@ -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) { diff --git a/integration/internal/container/ops.go b/integration/internal/container/ops.go index a874b0672da7c..3e0bbaa41049f 100644 --- a/integration/internal/container/ops.go +++ b/integration/internal/container/ops.go @@ -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) diff --git a/integration/internal/system/goroutines.go b/integration/internal/system/goroutines.go index 09f2ddb47842a..9d8d1f4e4e5ca 100644 --- a/integration/internal/system/goroutines.go +++ b/integration/internal/system/goroutines.go @@ -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() } diff --git a/integration/network/ipvlan/ipvlan_test.go b/integration/network/ipvlan/ipvlan_test.go index fe077c951c72a..08689b4e01fc1 100644 --- a/integration/network/ipvlan/ipvlan_test.go +++ b/integration/network/ipvlan/ipvlan_test.go @@ -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") diff --git a/integration/network/macvlan/macvlan_test.go b/integration/network/macvlan/macvlan_test.go index 929f785505007..3f84866b08546 100644 --- a/integration/network/macvlan/macvlan_test.go +++ b/integration/network/macvlan/macvlan_test.go @@ -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") diff --git a/integration/plugin/logging/cmd/close_on_start/main.go b/integration/plugin/logging/cmd/close_on_start/main.go index 6398397712b8a..a8b230fd58d48 100644 --- a/integration/plugin/logging/cmd/close_on_start/main.go +++ b/integration/plugin/logging/cmd/close_on_start/main.go @@ -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) diff --git a/integration/plugin/logging/cmd/discard/main.go b/integration/plugin/logging/cmd/discard/main.go index 3a7f2a88c1aa8..89ef5e2584fa3 100644 --- a/integration/plugin/logging/cmd/discard/main.go +++ b/integration/plugin/logging/cmd/discard/main.go @@ -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) } diff --git a/integration/plugin/logging/cmd/dummy/main.go b/integration/plugin/logging/cmd/dummy/main.go index f2c81229a323c..b413ba455dfb4 100644 --- a/integration/plugin/logging/cmd/dummy/main.go +++ b/integration/plugin/logging/cmd/dummy/main.go @@ -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) } diff --git a/integration/plugin/volumes/cmd/dummy/main.go b/integration/plugin/volumes/cmd/dummy/main.go index f2c81229a323c..b413ba455dfb4 100644 --- a/integration/plugin/volumes/cmd/dummy/main.go +++ b/integration/plugin/volumes/cmd/dummy/main.go @@ -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) } diff --git a/integration/service/create_test.go b/integration/service/create_test.go index 72f8f4c00efc4..8e22607ee54e6 100644 --- a/integration/service/create_test.go +++ b/integration/service/create_test.go @@ -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"} { diff --git a/internal/rootless/specconv/specconv_linux.go b/internal/rootless/specconv/specconv_linux.go index e5c85c4439e65..365b946bf0cb4 100644 --- a/internal/rootless/specconv/specconv_linux.go +++ b/internal/rootless/specconv/specconv_linux.go @@ -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 { diff --git a/internal/safepath/join_test.go b/internal/safepath/join_test.go index 8d447ae030b7f..c1e5b93886f73 100644 --- a/internal/safepath/join_test.go +++ b/internal/safepath/join_test.go @@ -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") } diff --git a/libnetwork/agent.go b/libnetwork/agent.go index 501889ab2ed74..440f82cd39969 100644 --- a/libnetwork/agent.go +++ b/libnetwork/agent.go @@ -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 } diff --git a/libnetwork/agent.pb.go b/libnetwork/agent.pb.go index f543d3e0c40a1..144c160bb2205 100644 --- a/libnetwork/agent.pb.go +++ b/libnetwork/agent.pb.go @@ -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"` } diff --git a/libnetwork/agent.proto b/libnetwork/agent.proto index 05c6419c14b41..0fb04731c3ea9 100644 --- a/libnetwork/agent.proto +++ b/libnetwork/agent.proto @@ -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; } diff --git a/libnetwork/bitmap/sequence.go b/libnetwork/bitmap/sequence.go index 2644c5d354cab..203fbaa6b4d98 100644 --- a/libnetwork/bitmap/sequence.go +++ b/libnetwork/bitmap/sequence.go @@ -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 diff --git a/libnetwork/bitmap/sequence_test.go b/libnetwork/bitmap/sequence_test.go index f04ff56945bcf..fb3f74c90b699 100644 --- a/libnetwork/bitmap/sequence_test.go +++ b/libnetwork/bitmap/sequence_test.go @@ -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) diff --git a/libnetwork/cmd/networkdb-test/dbclient/ndbClient.go b/libnetwork/cmd/networkdb-test/dbclient/ndbClient.go index 1c0704ded7d4a..ce1e26571d7a8 100644 --- a/libnetwork/cmd/networkdb-test/dbclient/ndbClient.go +++ b/libnetwork/cmd/networkdb-test/dbclient/ndbClient.go @@ -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 { diff --git a/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go b/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go index ab24de8f95eb2..c550ffe1fbec4 100644 --- a/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go +++ b/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go @@ -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 diff --git a/libnetwork/cnmallocator/networkallocator_test.go b/libnetwork/cnmallocator/networkallocator_test.go index 71ae50818d241..d1ca16056efd2 100644 --- a/libnetwork/cnmallocator/networkallocator_test.go +++ b/libnetwork/cnmallocator/networkallocator_test.go @@ -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{ diff --git a/libnetwork/diagnostic/server.go b/libnetwork/diagnostic/server.go index 654151e9c96b9..3614243aeee10 100644 --- a/libnetwork/diagnostic/server.go +++ b/libnetwork/diagnostic/server.go @@ -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() diff --git a/libnetwork/docs/network.md b/libnetwork/docs/network.md index 9f79d9c04592f..2fabd95325abc 100644 --- a/libnetwork/docs/network.md +++ b/libnetwork/docs/network.md @@ -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. diff --git a/libnetwork/drivers/bridge/bridge_linux.go b/libnetwork/drivers/bridge/bridge_linux.go index 2e76b4d9e9866..0057344e56ea2 100644 --- a/libnetwork/drivers/bridge/bridge_linux.go +++ b/libnetwork/drivers/bridge/bridge_linux.go @@ -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) diff --git a/libnetwork/drivers/bridge/setup_bridgenetfiltering.go b/libnetwork/drivers/bridge/setup_bridgenetfiltering.go index be8d56bcbceb2..21719b0beaf8f 100644 --- a/libnetwork/drivers/bridge/setup_bridgenetfiltering.go +++ b/libnetwork/drivers/bridge/setup_bridgenetfiltering.go @@ -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 { diff --git a/libnetwork/drivers/overlay/peerdb.go b/libnetwork/drivers/overlay/peerdb.go index 815790ded8590..91c3d07877cfd 100644 --- a/libnetwork/drivers/overlay/peerdb.go +++ b/libnetwork/drivers/overlay/peerdb.go @@ -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 } diff --git a/libnetwork/drivers/windows/windows.go b/libnetwork/drivers/windows/windows.go index 2fb76324e2871..9aeb8958087b3 100644 --- a/libnetwork/drivers/windows/windows.go +++ b/libnetwork/drivers/windows/windows.go @@ -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) diff --git a/libnetwork/endpoint.go b/libnetwork/endpoint.go index 12b6b64b1cb9f..8458f60066119 100644 --- a/libnetwork/endpoint.go +++ b/libnetwork/endpoint.go @@ -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. diff --git a/libnetwork/internal/kvstore/boltdb/boltdb.go b/libnetwork/internal/kvstore/boltdb/boltdb.go index 567fbe8b228e0..14e66da838e49 100644 --- a/libnetwork/internal/kvstore/boltdb/boltdb.go +++ b/libnetwork/internal/kvstore/boltdb/boltdb.go @@ -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 diff --git a/libnetwork/internal/kvstore/kvstore.go b/libnetwork/internal/kvstore/kvstore.go index 8347b33dad774..84e7300b5c5f6 100644 --- a/libnetwork/internal/kvstore/kvstore.go +++ b/libnetwork/internal/kvstore/kvstore.go @@ -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 diff --git a/libnetwork/ipamutils/utils.go b/libnetwork/ipamutils/utils.go index 8454c760871cb..581a8376c6975 100644 --- a/libnetwork/ipamutils/utils.go +++ b/libnetwork/ipamutils/utils.go @@ -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) } diff --git a/libnetwork/network.go b/libnetwork/network.go index 40972f0aa9f03..0a901cc461999 100644 --- a/libnetwork/network.go +++ b/libnetwork/network.go @@ -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 "" diff --git a/libnetwork/networkdb/cluster.go b/libnetwork/networkdb/cluster.go index a943d233cc192..5652d677f3620 100644 --- a/libnetwork/networkdb/cluster.go +++ b/libnetwork/networkdb/cluster.go @@ -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 { diff --git a/libnetwork/networkdb/delegate.go b/libnetwork/networkdb/delegate.go index c891d411fe957..0be1620498d63 100644 --- a/libnetwork/networkdb/delegate.go +++ b/libnetwork/networkdb/delegate.go @@ -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 diff --git a/libnetwork/networkdb/networkdb.go b/libnetwork/networkdb/networkdb.go index 13fe7082f1858..0f256e3e55b81 100644 --- a/libnetwork/networkdb/networkdb.go +++ b/libnetwork/networkdb/networkdb.go @@ -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() diff --git a/libnetwork/networkdb/networkdb_test.go b/libnetwork/networkdb/networkdb_test.go index 2d34e4c7013e0..6e68f9ae7ac2a 100644 --- a/libnetwork/networkdb/networkdb_test.go +++ b/libnetwork/networkdb/networkdb_test.go @@ -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) { diff --git a/libnetwork/resolver.go b/libnetwork/resolver.go index 322ddb3e3e6e0..70d37c752f446 100644 --- a/libnetwork/resolver.go +++ b/libnetwork/resolver.go @@ -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. diff --git a/libnetwork/resolver_unix_test.go b/libnetwork/resolver_unix_test.go index 708349a08610c..16ba8ecba8e01 100644 --- a/libnetwork/resolver_unix_test.go +++ b/libnetwork/resolver_unix_test.go @@ -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") } diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index e390e09776bd5..fe47f3c825b3a 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -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 diff --git a/libnetwork/service_common.go b/libnetwork/service_common.go index 6c97fc8f496bd..38a313db031a5 100644 --- a/libnetwork/service_common.go +++ b/libnetwork/service_common.go @@ -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) diff --git a/libnetwork/service_linux.go b/libnetwork/service_linux.go index 79e12255f8376..6d6e716d4f330 100644 --- a/libnetwork/service_linux.go +++ b/libnetwork/service_linux.go @@ -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 { diff --git a/libnetwork/types/types.go b/libnetwork/types/types.go index f17e3f11c88f4..578d179b13f04 100644 --- a/libnetwork/types/types.go +++ b/libnetwork/types/types.go @@ -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 diff --git a/oci/caps/utils.go b/oci/caps/utils.go index c61f6b49e93e5..1cdcf5b7b3998 100644 --- a/oci/caps/utils.go +++ b/oci/caps/utils.go @@ -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() diff --git a/opts/opts_test.go b/opts/opts_test.go index 3f7f33a246649..e9fe09a35d90d 100644 --- a/opts/opts_test.go +++ b/opts/opts_test.go @@ -142,7 +142,7 @@ func TestListOptsWithoutValidator(t *testing.T) { } func TestListOptsWithValidator(t *testing.T) { - // Re-using logOptsvalidator (used by MapOpts) + // Re-using logOptsValidator (used by MapOpts) o := NewListOpts(logOptsValidator) o.Set("foo") if o.String() != "" { @@ -233,7 +233,7 @@ func TestValidateLabel(t *testing.T) { expectedErr string }{ { - name: "lable with bad attribute format", + name: "label with bad attribute format", label: "label", expectedErr: "bad attribute format: label", }, diff --git a/pkg/chrootarchive/archive.go b/pkg/chrootarchive/archive.go index 3b6d8a77aa340..07739462e0542 100644 --- a/pkg/chrootarchive/archive.go +++ b/pkg/chrootarchive/archive.go @@ -36,7 +36,7 @@ func Untar(tarArchive io.Reader, dest string, options *archive.TarOptions) error // This should be used to prevent a potential attacker from manipulating `dest` // such that it would provide access to files outside of `dest` through things // like symlinks. Normally `ResolveSymlinksInScope` would handle this, however -// sanitizing symlinks in this manner is inherrently racey: +// sanitizing symlinks in this manner is inherently racey: // ref: CVE-2018-15664 func UntarWithRoot(tarArchive io.Reader, dest string, options *archive.TarOptions, root string) error { return untarHandler(tarArchive, dest, options, true, root) diff --git a/pkg/jsonmessage/jsonmessage.go b/pkg/jsonmessage/jsonmessage.go index 035160c834e4d..8d2c8857fb03a 100644 --- a/pkg/jsonmessage/jsonmessage.go +++ b/pkg/jsonmessage/jsonmessage.go @@ -290,7 +290,7 @@ func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, } // Stream is an io.Writer for output with utilities to get the output's file -// descriptor and to detect wether it's a terminal. +// descriptor and to detect whether it's a terminal. // // it is subset of the streams.Out type in // https://pkg.go.dev/github.com/docker/cli@v20.10.17+incompatible/cli/streams#Out diff --git a/pkg/meminfo/meminfo.go b/pkg/meminfo/meminfo.go index 4f33ad26bf5ab..3d095579e5ead 100644 --- a/pkg/meminfo/meminfo.go +++ b/pkg/meminfo/meminfo.go @@ -1,4 +1,4 @@ -// Package meminfo provides utilites to retrieve memory statistics of +// Package meminfo provides utilities to retrieve memory statistics of // the host system. package meminfo diff --git a/pkg/pools/pools.go b/pkg/pools/pools.go index 3792c67a9e454..3ea3012b188ba 100644 --- a/pkg/pools/pools.go +++ b/pkg/pools/pools.go @@ -124,7 +124,7 @@ func (bufPool *BufioWriterPool) Put(b *bufio.Writer) { } // NewWriteCloserWrapper returns a wrapper which puts the bufio.Writer back -// into the pool and closes the writer if it's an io.Writecloser. +// into the pool and closes the writer if it's an io.WriteCloser. func (bufPool *BufioWriterPool) NewWriteCloserWrapper(buf *bufio.Writer, w io.Writer) io.WriteCloser { return ioutils.NewWriteCloserWrapper(w, func() error { buf.Flush() diff --git a/pkg/pools/pools_test.go b/pkg/pools/pools_test.go index 6d1ca0598a1ea..0a8e92a3b09a7 100644 --- a/pkg/pools/pools_test.go +++ b/pkg/pools/pools_test.go @@ -116,7 +116,7 @@ func TestBufioWriterPoolPutAndGet(t *testing.T) { // recover it defer func() { if r := recover(); r == nil { - t.Fatal("Trying to flush the writter should have 'paniced', did not.") + t.Fatal("Trying to flush the writter should have 'panicked', did not.") } }() writer.Flush() diff --git a/pkg/system/xattrs_linux.go b/pkg/system/xattrs_linux.go index facfbb3126f15..b877ecc5a9425 100644 --- a/pkg/system/xattrs_linux.go +++ b/pkg/system/xattrs_linux.go @@ -6,7 +6,7 @@ import ( // Lgetxattr retrieves the value of the extended attribute identified by attr // and associated with the given path in the file system. -// It will returns a nil slice and nil error if the xattr is not set. +// It returns a nil slice and nil error if the xattr is not set. func Lgetxattr(path string, attr string) ([]byte, error) { sysErr := func(err error) ([]byte, error) { return nil, &XattrError{Op: "lgetxattr", Attr: attr, Path: path, Err: err} diff --git a/plugin/store_test.go b/plugin/store_test.go index 47b4bd7d4ddd6..e68172257e3e3 100644 --- a/plugin/store_test.go +++ b/plugin/store_test.go @@ -46,7 +46,7 @@ func TestStoreGetPluginNotMatchCapRefs(t *testing.T) { } if _, err := s.Get("test", "volumedriver", plugingetter.Acquire); err == nil { - t.Fatal("exepcted error when getting plugin that doesn't match the passed in capability") + t.Fatal("expected error when getting plugin that doesn't match the passed in capability") } if refs := p.GetRefCount(); refs != 0 { @@ -55,7 +55,7 @@ func TestStoreGetPluginNotMatchCapRefs(t *testing.T) { p.PluginObj.Enabled = true if _, err := s.Get("test", "volumedriver", plugingetter.Acquire); err == nil { - t.Fatal("exepcted error when getting plugin that doesn't match the passed in capability") + t.Fatal("expected error when getting plugin that doesn't match the passed in capability") } if refs := p.GetRefCount(); refs != 0 { diff --git a/registry/config.go b/registry/config.go index 84b0a63ad25b5..e1b0a0ca14c62 100644 --- a/registry/config.go +++ b/registry/config.go @@ -359,7 +359,7 @@ func hasScheme(reposName string) bool { } func validateHostPort(s string) error { - // Split host and port, and in case s can not be splitted, assume host only + // Split host and port, and in case s can not be split, assume host only host, port, err := net.SplitHostPort(s) if err != nil { host = s diff --git a/reports/2017-06-12.md b/reports/2017-06-12.md index 8aef38c6b03c8..5264c9d89fca9 100644 --- a/reports/2017-06-12.md +++ b/reports/2017-06-12.md @@ -13,8 +13,8 @@ Man pages, docs and completion scripts will be removed next week thanks to @tibo ### Find a good and non-confusing home for the remaining monolith -Lot's of dicussion happened on the [forums](https://forums.mobyproject.org/t/topic-find-a-good-an-non-confusing-home-for-the-remaining-monolith) -We should expect to do those changes after the moby summit. We contacted github to work with them so we have a smooth move. +Lots of discussion happened on the [forums](https://forums.mobyproject.org/t/topic-find-a-good-an-non-confusing-home-for-the-remaining-monolith) +We should expect to do those changes after the moby summit. We contacted GitHub to work with them so we have a smooth move. ### Moby tool diff --git a/testutil/fixtures/plugin/basic/basic.go b/testutil/fixtures/plugin/basic/basic.go index 2eebe249fc514..401bccafd493d 100644 --- a/testutil/fixtures/plugin/basic/basic.go +++ b/testutil/fixtures/plugin/basic/basic.go @@ -26,7 +26,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) } mux.HandleFunc("/Plugin.Activate", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/vnd.docker.plugins.v1.1+json") diff --git a/volume/local/local_linux_test.go b/volume/local/local_linux_test.go index f8ce7215e206a..b583dc9c17a8d 100644 --- a/volume/local/local_linux_test.go +++ b/volume/local/local_linux_test.go @@ -65,7 +65,7 @@ func testVolWithQuota(t *testing.T, mountPoint, backingFsDev, testDir string) { assert.NilError(t, os.WriteFile(testfile, make([]byte, quotaSize/2), 0o644)) assert.NilError(t, os.Remove(testfile)) - // test writing fiel larger than quota + // test writing file larger than quota err = os.WriteFile(testfile, make([]byte, quotaSize+1), 0o644) assert.ErrorContains(t, err, "") if _, err := os.Stat(testfile); err == nil { diff --git a/volume/local/local_test.go b/volume/local/local_test.go index 94cb354660989..3390e39869c48 100644 --- a/volume/local/local_test.go +++ b/volume/local/local_test.go @@ -293,7 +293,7 @@ func TestCreateWithOpts(t *testing.T) { } } -func TestRelaodNoOpts(t *testing.T) { +func TestReloadNoOpts(t *testing.T) { rootDir, err := os.MkdirTemp("", "volume-test-reload-no-opts") if err != nil { t.Fatal(err) diff --git a/volume/service/opts/opts.go b/volume/service/opts/opts.go index 3b4f63196ac70..9ab02a6293bac 100644 --- a/volume/service/opts/opts.go +++ b/volume/service/opts/opts.go @@ -37,7 +37,7 @@ func WithCreateOptions(opts map[string]string) CreateOption { } } -// WithCreateReference creats a CreateOption which sets a reference to use +// WithCreateReference creates a CreateOption which sets a reference to use // when creating a volume. This ensures that the volume is created with a reference // already attached to it to prevent race conditions with Create and volume cleanup. func WithCreateReference(ref string) CreateOption { diff --git a/volume/service/service.go b/volume/service/service.go index e85f62bc140d4..df059a78c7a5a 100644 --- a/volume/service/service.go +++ b/volume/service/service.go @@ -68,7 +68,7 @@ const AnonymousLabel = "com.docker.volume.anonymous" // This reference ID will protect this volume from removal. // // A good example for a reference ID is a container's ID. -// When whatever is going to reference this volume is removed the caller should defeference the volume by calling `Release`. +// When whatever is going to reference this volume is removed the caller should dereference the volume by calling `Release`. func (s *VolumesService) Create(ctx context.Context, name, driverName string, options ...opts.CreateOption) (*volumetypes.Volume, error) { if name == "" { name = stringid.GenerateRandomID() @@ -103,7 +103,7 @@ func (s *VolumesService) Get(ctx context.Context, name string, getOpts ...opts.G } // Mount mounts the volume -// Callers should specify a uniqe reference for each Mount/Unmount pair. +// Callers should specify a unique reference for each Mount/Unmount pair. // // Example: // ```go diff --git a/volume/service/store_test.go b/volume/service/store_test.go index d9c7ce26b59b3..f6d4ac93363b8 100644 --- a/volume/service/store_test.go +++ b/volume/service/store_test.go @@ -404,7 +404,7 @@ func TestFilterFunc(t *testing.T) { {desc: "test nil list", vols: nil, expect: nil, fn: func(volume.Volume) bool { return true }}, {desc: "test empty list", vols: []volume.Volume{}, expect: []volume.Volume{}, fn: func(volume.Volume) bool { return true }}, {desc: "test filter non-empty to empty", vols: []volume.Volume{testVolume}, expect: []volume.Volume{}, fn: func(volume.Volume) bool { return false }}, - {desc: "test nothing to fitler non-empty list", vols: []volume.Volume{testVolume}, expect: []volume.Volume{testVolume}, fn: func(volume.Volume) bool { return true }}, + {desc: "test nothing to filter non-empty list", vols: []volume.Volume{testVolume}, expect: []volume.Volume{testVolume}, fn: func(volume.Volume) bool { return true }}, {desc: "test filter some", vols: []volume.Volume{testVolume, testVolume2}, expect: []volume.Volume{testVolume}, fn: func(v volume.Volume) bool { return v.Name() == testVolume.Name() }}, {desc: "test filter middle", vols: []volume.Volume{testVolume, testVolume2, testVolume3}, expect: []volume.Volume{testVolume, testVolume3}, fn: func(v volume.Volume) bool { return v.Name() != testVolume2.Name() }}, {desc: "test filter middle and last", vols: []volume.Volume{testVolume, testVolume2, testVolume3}, expect: []volume.Volume{testVolume}, fn: func(v volume.Volume) bool { return v.Name() != testVolume2.Name() && v.Name() != testVolume3.Name() }},