diff --git a/.codespellignorelines b/.codespellignorelines new file mode 100644 index 000000000..9c43195e0 --- /dev/null +++ b/.codespellignorelines @@ -0,0 +1,10 @@ + ( vm-command "kubectl delete pods -n kube-system \$(kubectl get pods -n kube-system | awk '/t[0-9]r[gb][ue]/{print \$1}')" ) || true + ( vm-command "kubectl delete pods -n default \$(kubectl get pods -n default | awk '/t[0-9][rgb][ue][0-9]/{print \$1}')" ) || true + docker run -v "$(pwd):/mnt/models" "$FMBT_IMAGE" sh -c 'cd /mnt/models; fmbt tmp.fuzz.fmbt.conf 2>/dev/null | fmbt-log -f STEP\$sn\$as\$al' | grep -v AAL | sed -e 's/^, / /g' -e '/^STEP/! s/\(^.*\)/echo "TESTGEN: \1"/g' -e 's/^STEP\([0-9]*\)i:\(.*\)/echo "TESTGEN: STEP \1"; vm-command "date +%T.%N"; \2; vm-command "date +%T.%N"; kubectl get pods -A/g' | sed "s/\([^a-z0-9]\)\(r\?\)\(gu\|bu\|be\)\([0-9]\)/\1t${testid}\2\3\4/g" > "$OUTFILE" + allocs := map[string]cpuset.CPUSet{"--:allo": currentCpus} + allocName := fmt.Sprintf("%02d:allo", i+1) + preferTightestFit = func(cA, cB *cpuCluster, pkgA, pkgB, dieA, dieB int, csetA, csetB cpuset.CPUSet) (r int) { + if dieA >= a.cnt && dieB < a.cnt { + if dieA < a.cnt && dieB >= a.cnt { + if dieA >= a.cnt && dieB >= a.cnt { + if diff := dieA - dieB; diff != 0 { diff --git a/.codespellignorewords b/.codespellignorewords new file mode 100644 index 000000000..0b4ce825f --- /dev/null +++ b/.codespellignorewords @@ -0,0 +1,2 @@ +clos +NotIn diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..9df77c68f --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg,go.sum,go.mod,./cmd/plugins/topology-aware/policy +ignore-words = .codespellignorewords +exclude-file = .codespellignorelines diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..60c6c95fc --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,18 @@ +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/Makefile b/Makefile index e862e01fe..c10c45c48 100644 --- a/Makefile +++ b/Makefile @@ -401,6 +401,9 @@ verify-build: build verify-docs: site-build clean-html +verify-codespell codespell: + $(Q) codespell + # # targets for installing dependencies # diff --git a/TODO.md b/TODO.md index ca7b119b8..557bbca60 100644 --- a/TODO.md +++ b/TODO.md @@ -22,7 +22,7 @@ The estimated complexity and priority of a feature/task is defined like this: - [ ] eliminate need for saving cache to disk, C2 - config - [ ] switch to using CRDs (from ConfigMaps), C2 - - [ ] consider usig 1 CRD per policy as opposed to a single 'union' CRD, C2 + - [ ] consider using 1 CRD per policy as opposed to a single 'union' CRD, C2 - [ ] create helm chart support for the resource policies, C1 - policies - [ ] remove support for multiple policies in a single binary, C1 diff --git a/cmd/plugins/topology-aware/policy/cache.go b/cmd/plugins/topology-aware/policy/cache.go index 95a1596f9..daa886c56 100644 --- a/cmd/plugins/topology-aware/policy/cache.go +++ b/cmd/plugins/topology-aware/policy/cache.go @@ -29,7 +29,7 @@ const ( ) func (p *policy) saveAllocations() { - p.cache.SetPolicyEntry(keyAllocations, cache.Cachable(&p.allocations)) + p.cache.SetPolicyEntry(keyAllocations, cache.Cacheable(&p.allocations)) p.cache.Save() } diff --git a/config/crd/bases/config.nri_balloonspolicies.yaml b/config/crd/bases/config.nri_balloonspolicies.yaml index f672f734f..6c522ddfa 100644 --- a/config/crd/bases/config.nri_balloonspolicies.yaml +++ b/config/crd/bases/config.nri_balloonspolicies.yaml @@ -117,7 +117,7 @@ spec: consist of a key, an operator and a set of values. An expressions is evaluated against an object which implements the Evaluable interface. Evaluating an expression consists of looking up the value for the key - in the object, then using the operator to check it agains the values + in the object, then using the operator to check it against the values of the expression. The result is a single boolean value. An object is said to satisfy the evaluated expression if this value is true. An expression can contain 0, 1 or more values depending on the operator. @@ -217,7 +217,7 @@ spec: preferPerNamespaceBalloon: description: |- PreferPerNamespaceBalloon: if true, containers in different - namespaces are preferrably placed in separate balloons, + namespaces are preferably placed in separate balloons, even if the balloon type is the same for all of them. On the other hand, containers in the same namespace will be placed in the same balloon instances. The default is false: @@ -406,7 +406,7 @@ spec: consist of a key, an operator and a set of values. An expressions is evaluated against an object which implements the Evaluable interface. Evaluating an expression consists of looking up the value for the key - in the object, then using the operator to check it agains the values + in the object, then using the operator to check it against the values of the expression. The result is a single boolean value. An object is said to satisfy the evaluated expression if this value is true. An expression can contain 0, 1 or more values depending on the operator. diff --git a/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml b/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml index f672f734f..6c522ddfa 100644 --- a/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml +++ b/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml @@ -117,7 +117,7 @@ spec: consist of a key, an operator and a set of values. An expressions is evaluated against an object which implements the Evaluable interface. Evaluating an expression consists of looking up the value for the key - in the object, then using the operator to check it agains the values + in the object, then using the operator to check it against the values of the expression. The result is a single boolean value. An object is said to satisfy the evaluated expression if this value is true. An expression can contain 0, 1 or more values depending on the operator. @@ -217,7 +217,7 @@ spec: preferPerNamespaceBalloon: description: |- PreferPerNamespaceBalloon: if true, containers in different - namespaces are preferrably placed in separate balloons, + namespaces are preferably placed in separate balloons, even if the balloon type is the same for all of them. On the other hand, containers in the same namespace will be placed in the same balloon instances. The default is false: @@ -406,7 +406,7 @@ spec: consist of a key, an operator and a set of values. An expressions is evaluated against an object which implements the Evaluable interface. Evaluating an expression consists of looking up the value for the key - in the object, then using the operator to check it agains the values + in the object, then using the operator to check it against the values of the expression. The result is a single boolean value. An object is said to satisfy the evaluated expression if this value is true. An expression can contain 0, 1 or more values depending on the operator. diff --git a/docs/deployment/helm/index.md b/docs/deployment/helm/index.md index 59079e745..2991496c2 100644 --- a/docs/deployment/helm/index.md +++ b/docs/deployment/helm/index.md @@ -14,7 +14,7 @@ All the available charts can be found in [artifacthub.io](https://artifacthub.io - kubernetes version: 1.28.x - containerd version: 1.7 - node image: Container-Optimized OS from Google (COS), Ubuntu 22.04 - - Azure AKS + - Azure Kubernetes Service - kubernetes version: 1.28.x - containerd version: 1.7 - node image: Azure Linux Container Host, Ubuntu 20.04 diff --git a/docs/memory/memory-qos.md b/docs/memory/memory-qos.md index 6d7aa4d83..001ddc06a 100644 --- a/docs/memory/memory-qos.md +++ b/docs/memory/memory-qos.md @@ -79,7 +79,7 @@ unifiedannotations: This configuration defines the following. -- If a container belogs to the memory QoS class `bronze` has allocated +- If a container belongs to the memory QoS class `bronze` has allocated half of the memory of its `resources.limits.memory`, next allocations will cause kernel to swap out corresponding amount of container's memory. In other words, when container's memory usage is diff --git a/docs/resource-policy/developers-guide/architecture.md b/docs/resource-policy/developers-guide/architecture.md index 70c465b7c..0b466eb0c 100644 --- a/docs/resource-policy/developers-guide/architecture.md +++ b/docs/resource-policy/developers-guide/architecture.md @@ -158,7 +158,7 @@ of activating and dispatching calls through to the configured active policy. The generic resource controller layer defines the abstract interface the rest of NRI-RP uses to interact with resource controller implementations and takes care of the details of dispatching calls to the controller implementations -for post-policy enforcment of decisions. +for post-policy enforcement of decisions. ### [Metrics Collector](tree:/pkg/metrics/) diff --git a/docs/resource-policy/policy/balloons.md b/docs/resource-policy/policy/balloons.md index 3a46f2d7e..dd06868e3 100644 --- a/docs/resource-policy/policy/balloons.md +++ b/docs/resource-policy/policy/balloons.md @@ -185,7 +185,7 @@ Balloons policy parameters: balloon(s). - `preferPerNamespaceBalloon`: if `true`, containers in the same namespace will be placed in the same balloon(s). On the other - hand, containers in different namespaces are preferrably placed in + hand, containers in different namespaces are preferably placed in different balloons. The default is `false`: namespace has no effect on choosing the balloon of this type. - `preferNewBalloons`: if `true`, prefer creating new balloons over diff --git a/docs/resource-policy/policy/topology-aware.md b/docs/resource-policy/policy/topology-aware.md index 4735a41de..3cd82fea0 100644 --- a/docs/resource-policy/policy/topology-aware.md +++ b/docs/resource-policy/policy/topology-aware.md @@ -131,7 +131,7 @@ behavior. These options can be supplied as part of the effective - whether shared allocation is preferred by default for workloads that would be otherwise eligible for exclusive CPU allocation - `reservedPoolNamespaces` - - list of extra namespaces (or glob patters) that will be allocated to + - list of extra namespaces (or glob patterns) that will be allocated to reserved CPUs - `colocatePods` - whether try to allocate containers in a pod to the same or close by @@ -496,7 +496,7 @@ However as a general rule of thumb containers running These hints are expressed by `container affinity annotations` on the Pod. There are two types of affinities: -- `affinity` (or `positive affinty`): cause affected containers to *pull* each +- `affinity` (or `positive affinity`): cause affected containers to *pull* each other closer - `anti-affinity` (or `negative affinity`): cause affected containers to *push* each other further away @@ -516,7 +516,7 @@ annotation. They are specified in the `metadata` section of the `Pod YAML`, unde ```yaml metadata: - anotations: + annotations: resource-policy.nri.io/affinity: | container1: - scope: @@ -541,7 +541,7 @@ as the annotation key. ```yaml metadata: - anotations: + annotations: resource-policy.nri.io/anti-affinity: | container1: - scope: @@ -585,7 +585,7 @@ is. This is useful in situations where the policy needs to make some compromises because an optimal placement is not possible. The weight then also acts as a way to specify preferences of priorities between the various compromises: the heavier the weight the stronger the pull or push and the -larger the propbability that it will be honored, if this is possible at all. +larger the probability that it will be honored, if this is possible at all. The scope can be omitted from an affinity in which case it implies *Pod scope*, in other words the scope of all containers that belong to the same Pod as the diff --git a/pkg/agent/node-resource-topology.go b/pkg/agent/node-resource-topology.go index a21ecc6dc..b3cb48f2e 100644 --- a/pkg/agent/node-resource-topology.go +++ b/pkg/agent/node-resource-topology.go @@ -39,7 +39,7 @@ func (a *Agent) UpdateNrtCR(policy string, zones []*policyapi.TopologyZone) erro // To minimize the risk of an NRI request timeout (and the plugin getting // kicked out) we do the update asynchronously. We can rework this to use - // a single goroutine that reads update requests from a channel to mimick + // a single goroutine that reads update requests from a channel to mimic // the rest if necessary. // XXX TODO(klihub): We can't/don't propagate update errors now back // to the caller. We could do that (using a channel) if necessary... diff --git a/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go b/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go index 31414a3dc..e94748eaf 100644 --- a/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go +++ b/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go @@ -193,7 +193,7 @@ type BalloonDef struct { // placing containers of a pod to the same balloon(s). PreferSpreadingPods bool `json:"preferSpreadingPods,omitempty"` // PreferPerNamespaceBalloon: if true, containers in different - // namespaces are preferrably placed in separate balloons, + // namespaces are preferably placed in separate balloons, // even if the balloon type is the same for all of them. On // the other hand, containers in the same namespace will be // placed in the same balloon instances. The default is false: diff --git a/pkg/apis/resmgr/v1alpha1/types.go b/pkg/apis/resmgr/v1alpha1/types.go index 22072a051..6b4c280ae 100644 --- a/pkg/apis/resmgr/v1alpha1/types.go +++ b/pkg/apis/resmgr/v1alpha1/types.go @@ -18,7 +18,7 @@ package resmgr // consist of a key, an operator and a set of values. An expressions is // evaluated against an object which implements the Evaluable interface. // Evaluating an expression consists of looking up the value for the key -// in the object, then using the operator to check it agains the values +// in the object, then using the operator to check it against the values // of the expression. The result is a single boolean value. An object is // said to satisfy the evaluated expression if this value is true. An // expression can contain 0, 1 or more values depending on the operator. diff --git a/pkg/cgroups/cgroupblkio.go b/pkg/cgroups/cgroupblkio.go index 7d9469d6e..5e60662f9 100644 --- a/pkg/cgroups/cgroupblkio.go +++ b/pkg/cgroups/cgroupblkio.go @@ -277,7 +277,7 @@ func readFromFileInDir(baseDir string, filenames []string) (string, error) { return "", nil } -// SetBlkioParameters writes OCI BlockIO parameters to files in cgroups blkio contoller directory. +// SetBlkioParameters writes OCI BlockIO parameters to files in cgroups blkio controller directory. func SetBlkioParameters(cgroupsDir string, blockIO OciBlockIOParameters) error { log.Debug("configuring cgroups blkio controller in directory %#v with parameters %+v", cgroupsDir, blockIO) errs := []error{} diff --git a/pkg/cgroups/cgroupstats.go b/pkg/cgroups/cgroupstats.go index 666bdc95a..bd9c38dc9 100644 --- a/pkg/cgroups/cgroupstats.go +++ b/pkg/cgroups/cgroupstats.go @@ -64,7 +64,7 @@ type NumaLine struct { Nodes map[string]int64 } -// NumaStat has parsed contets of a NUMA statistics file. +// NumaStat has parsed contents of a NUMA statistics file. type NumaStat struct { Total NumaLine File NumaLine diff --git a/pkg/cpuallocator/allocator.go b/pkg/cpuallocator/allocator.go index 30203f00f..e51f1e443 100644 --- a/pkg/cpuallocator/allocator.go +++ b/pkg/cpuallocator/allocator.go @@ -440,7 +440,7 @@ func (a *allocatorHelper) takeCacheGroups() { // c. allocate using the smallest number of groups (largest to smallest) // // Notes: - // We might consider letting the requestor control some aspects of allocation, + // We might consider letting the requester control some aspects of allocation, // for instance: // - use only full idle groups (ideal maximum isolation) // - use only full idle groups, and 1 fragmented (maximum isolation) @@ -805,7 +805,7 @@ func (a *allocatorHelper) takeCacheGroups() { g := groups[0] cset := sorter.cpus[g] - log.Debug("=> took reamining %d CPUs (%s) of usable cache group %s", cnt, cset, g) + log.Debug("=> took remaining %d CPUs (%s) of usable cache group %s", cnt, cset, g) result = result.Union(cset) from = from.Difference(cset) diff --git a/pkg/log/ratelimit_test.go b/pkg/log/ratelimit_test.go index 496d1a6cc..e5f5ae4de 100644 --- a/pkg/log/ratelimit_test.go +++ b/pkg/log/ratelimit_test.go @@ -36,7 +36,7 @@ func TestRateLimit(t *testing.T) { limiters[msg] = rl.getMessageLimit(msg) } - // check looked up vs. stored limters + // check looked up vs. stored limiters for msg, limiter := range limiters { if rl.getMessageLimit(msg) != limiter { t.Errorf("unexpected new limiter for message %s", msg) diff --git a/pkg/resmgr/cache/affinity.go b/pkg/resmgr/cache/affinity.go index c8f0391cc..a5e20ee28 100644 --- a/pkg/resmgr/cache/affinity.go +++ b/pkg/resmgr/cache/affinity.go @@ -126,7 +126,7 @@ func (pca *podContainerAffinity) parseSimple(pod *pod, value string, weight int3 // // Notes: // We turn affinities given in the simple notation into a symmetric set of - // affinities. IOW, if X has affinity on Y with wight W, then Y will have + // affinities. IOW, if X has affinity on Y with weight W, then Y will have // affinity on X with W as well. In practice this is done by // 1) ensuring there is an affinity Y: X for every affinity X: Y // 2) generating an affinity expression for every container with affinities diff --git a/pkg/resmgr/cache/cache.go b/pkg/resmgr/cache/cache.go index ca002d32d..e28c7e344 100644 --- a/pkg/resmgr/cache/cache.go +++ b/pkg/resmgr/cache/cache.go @@ -128,7 +128,7 @@ type Pod interface { // GetProcesses returns the pids of all processes in the pod either excluding // container processes, if called with false, or including those if called with true. GetProcesses(bool) ([]string, error) - // GetTasks returns the pids of all threads in the pod either excluding cotnainer + // GetTasks returns the pids of all threads in the pod either excluding container // processes, if called with false, or including those if called with true. GetTasks(bool) ([]string, error) } @@ -339,7 +339,7 @@ type container struct { type Mount = nri.Mount type Device = nri.LinuxDevice -type Cachable interface { +type Cacheable interface { // Set value (via a pointer receiver) to the object. Set(value interface{}) // Get the object that should be cached. @@ -349,7 +349,7 @@ type Cachable interface { // Cache is the primary interface exposed for tracking pods and containers. // // Cache tracks pods and containers in the runtime, mostly by processing CRI -// requests and responses which the cache is fed as these are being procesed. +// requests and responses which the cache is fed as these are being processed. // Cache also saves its state upon changes to secondary storage and restores // itself upon startup. type Cache interface { @@ -368,7 +368,7 @@ type Cache interface { // LookupContainerByCgroup looks up a container for the given cgroup path. LookupContainerByCgroup(path string) (Container, bool) - // GetPendingContainers returs all containers with pending changes. + // GetPendingContainers returns all containers with pending changes. GetPendingContainers() []Container // GetPods returns all the pods known to the cache. @@ -497,7 +497,7 @@ func (cch *cache) GetActivePolicy() string { return cch.PolicyName } -// SetActivePolicy updaes the name of the active policy stored in the cache. +// SetActivePolicy updates the name of the active policy stored in the cache. func (cch *cache) SetActivePolicy(policy string) error { cch.PolicyName = policy return cch.Save() @@ -849,8 +849,8 @@ func unmarshalEntry(data []byte, ptr interface{}) error { // Cache an unmarshaled opaque policy entry, special-casing some simple/common types. func (cch *cache) cacheEntry(key string, ptr interface{}) error { - if cachable, ok := ptr.(Cachable); ok { - cch.policyData[key] = cachable.Get() + if cacheable, ok := ptr.(Cacheable); ok { + cch.policyData[key] = cacheable.Get() return nil } @@ -890,8 +890,8 @@ func (cch *cache) cacheEntry(key string, ptr interface{}) error { // Serve an unmarshaled opaque policy entry, special-casing some simple/common types. func (cch *cache) setEntry(key string, ptr, obj interface{}) error { - if cachable, ok := ptr.(Cachable); ok { - cachable.Set(obj) + if cacheable, ok := ptr.(Cacheable); ok { + cacheable.Set(obj) return nil } diff --git a/pkg/resmgr/cache/container.go b/pkg/resmgr/cache/container.go index 44aae52a6..5420b2344 100644 --- a/pkg/resmgr/cache/container.go +++ b/pkg/resmgr/cache/container.go @@ -778,7 +778,7 @@ func (c *container) PreserveMemoryResources() bool { } var ( - // More complext rules, for Kubelet secrets and config maps + // More complex rules, for Kubelet secrets and config maps ignoredTopologyPathRegexps = []*regexp.Regexp{ // Kubelet directory can be different, but we can detect it by structure inside of it. // For now, we can safely ignore exposed config maps and secrets for topology hints. diff --git a/pkg/resmgr/control/cpu/cache.go b/pkg/resmgr/control/cpu/cache.go index c132ae606..57868942b 100644 --- a/pkg/resmgr/control/cpu/cache.go +++ b/pkg/resmgr/control/cpu/cache.go @@ -40,7 +40,7 @@ func getClassAssignments(c cache.Cache) *cpuClassAssignments { // Save the state of CPU class assignments in cache func setClassAssignments(c cache.Cache, a *cpuClassAssignments) { - c.SetPolicyEntry(cacheKeyCPUAssignments, cache.Cachable(a)) + c.SetPolicyEntry(cacheKeyCPUAssignments, cache.Cacheable(a)) } // Set the value of cached cpuClassAssignments diff --git a/pkg/resmgr/nri.go b/pkg/resmgr/nri.go index 635206423..f83edc881 100644 --- a/pkg/resmgr/nri.go +++ b/pkg/resmgr/nri.go @@ -1032,7 +1032,7 @@ func (p *nriPlugin) runPostStartHooks(method string, c cache.Container) error { return nil } -// runPostReleaseHooks runs the necessary hooks after releaseing resources of some containers +// runPostReleaseHooks runs the necessary hooks after releasing resources of some containers func (p *nriPlugin) runPostReleaseHooks(method string, released ...cache.Container) error { m := p.resmgr for _, c := range released { @@ -1058,7 +1058,7 @@ func (p *nriPlugin) runPostReleaseHooks(method string, released ...cache.Contain return nil } -// runPostUpdateHooks runs the necessary hooks after reconcilation. +// runPostUpdateHooks runs the necessary hooks after reconciliation. func (p *nriPlugin) runPostUpdateHooks(method string) error { m := p.resmgr for _, c := range m.cache.GetPendingContainers() { diff --git a/pkg/resmgr/policy/policy.go b/pkg/resmgr/policy/policy.go index c7b85f9b2..f8ec5963d 100644 --- a/pkg/resmgr/policy/policy.go +++ b/pkg/resmgr/policy/policy.go @@ -213,7 +213,7 @@ type policy struct { // backend is a registered Backend. type backend struct { - name string // unqiue backend name + name string // unique backend name description string // verbose backend description create CreateFn // backend creation function } diff --git a/pkg/sysfs/system.go b/pkg/sysfs/system.go index e0c9484df..14e8638ed 100644 --- a/pkg/sysfs/system.go +++ b/pkg/sysfs/system.go @@ -595,7 +595,7 @@ func (sys *system) SocketCount() int { return len(sys.packages) } -// CPUCount resturns the number of discovered CPUs/cores. +// CPUCount returns the number of discovered CPUs/cores. func (sys *system) CPUCount() int { return len(sys.cpus) } diff --git a/scripts/testing/e2e-runner b/scripts/testing/e2e-runner index f40b8b900..281f6a36a 100755 --- a/scripts/testing/e2e-runner +++ b/scripts/testing/e2e-runner @@ -55,7 +55,7 @@ usage() { echo " --source-proxies source proxy environment variables from file" echo " --remote|r remote repository to clone/fetch from" echo " --branch|-b name of the remote branch to test" - echo " --local|-l local directory to clone remote respository into" + echo " --local|-l local directory to clone remote repository into" echo " --results|--out|-o top-level directory for publishing results" echo " --name|-n subdirectory for results of this run" echo " --skip-worktree skip worktree preparation, assume already done" @@ -112,7 +112,7 @@ source_proxies() { for var in http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY; do if [ -n "${!var}" ]; then - info "exporting proxy envrionment variable $var (with value ${!var})..." + info "exporting proxy environment variable $var (with value ${!var})..." export $var fi done diff --git a/test/e2e/README.md b/test/e2e/README.md index d4f552640..444e34c08 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -36,7 +36,7 @@ Before running E2E tests ensure that you have all the required components locall The default test output directory name is generated from the used topology and runtime name and the directory is created under test/e2e. - The test output directory can be given as a 2nd paramter to the script. + The test output directory can be given as a 2nd parameter to the script. ```shell ./run_tests.sh policies.test-suite ~/output-directory @@ -51,7 +51,7 @@ Before running E2E tests ensure that you have all the required components locall ``` The e2e test runs can be can be configured by setting various options as - environment variables when starting the run_tests.sh script. These environent + environment variables when starting the run_tests.sh script. These environment variables are passed to test VM so that it can establish connection to net to download packages etc. diff --git a/test/e2e/policies.test-suite/balloons/n4c16/test07-maxballoons/code.var.sh b/test/e2e/policies.test-suite/balloons/n4c16/test07-maxballoons/code.var.sh index 5cde58fe3..149a29763 100644 --- a/test/e2e/policies.test-suite/balloons/n4c16/test07-maxballoons/code.var.sh +++ b/test/e2e/policies.test-suite/balloons/n4c16/test07-maxballoons/code.var.sh @@ -44,13 +44,13 @@ POD_ANNOTATION="balloon.balloons.resource-policy.nri.io: dynamictwo" CONTCOUNT=1 report allowed verify 'disjoint_sets(cpus["pod2c0"], cpus["pod3c0"])' -# pod4: prefering new balloon fails, but this fits in the second dynamictwo balloon +# pod4: preferring new balloon fails, but this fits in the second dynamictwo balloon CPUREQ="300m" CPULIM="300m" POD_ANNOTATION="balloon.balloons.resource-policy.nri.io: dynamictwo" CONTCOUNT=1 create balloons-busybox report allowed verify 'cpus["pod4c0"] == cpus["pod3c0"]' -# pod5: prefering new balloon fails, and fitting to existing dynamictwo balloons fails +# pod5: preferring new balloon fails, and fitting to existing dynamictwo balloons fails CPUREQ="300m" CPULIM="300m" ( POD_ANNOTATION="balloon.balloons.resource-policy.nri.io: dynamictwo" CONTCOUNT=1 wait_t=5s create balloons-busybox ) && { error "creating pod6 succeeded but was expected to fail with balloon allocation error" diff --git a/test/e2e/policies.test-suite/balloons/verify.source.sh b/test/e2e/policies.test-suite/balloons/verify.source.sh index 1f1121ce2..e1350ab69 100644 --- a/test/e2e/policies.test-suite/balloons/verify.source.sh +++ b/test/e2e/policies.test-suite/balloons/verify.source.sh @@ -11,7 +11,7 @@ verify-metrics-has-line() { verify-metrics-has-no-line() { local unexpected_line="$1" - vm-run-until --timeout 10 "echo 'checking absense of metrics line: $unexpected_line' >&2; ! curl --silent $verify_metrics_url | grep -Eq '$unexpected_line'" || { + vm-run-until --timeout 10 "echo 'checking absence of metrics line: $unexpected_line' >&2; ! curl --silent $verify_metrics_url | grep -Eq '$unexpected_line'" || { command-error "unexpected line '$1' found from the output" } } diff --git a/test/e2e/policies.test-suite/topology-aware/n4c16/test07-mixed-allocations/code.var.sh b/test/e2e/policies.test-suite/topology-aware/n4c16/test07-mixed-allocations/code.var.sh index 0a2c1d4b3..951a465e0 100644 --- a/test/e2e/policies.test-suite/topology-aware/n4c16/test07-mixed-allocations/code.var.sh +++ b/test/e2e/policies.test-suite/topology-aware/n4c16/test07-mixed-allocations/code.var.sh @@ -100,7 +100,7 @@ verify `# every container is placed on a single node (no socket, no root)` \ "len(cpus['pod4c0'] - set.union(*[cpus[c] for c in cpus if c != 'pod4c0'])) == 2" # Replace pod1 with pod5. -# pod1 implicitly opted-in to exlusive CPUs due to 1500 mCPU request. +# pod1 implicitly opted-in to exclusive CPUs due to 1500 mCPU request. # Now explicitly opt-out of it by opting-in to shared-cpus. vm-command "kubectl delete pods pod1 --now" # Make sure that shared pool size increased correctly after mixed pod deletion. diff --git a/test/self-hosted-runner/runner.sh b/test/self-hosted-runner/runner.sh index 3b8a0ab42..45491bd61 100755 --- a/test/self-hosted-runner/runner.sh +++ b/test/self-hosted-runner/runner.sh @@ -90,7 +90,7 @@ get_runner_token() { debug "GH access token URL : '${access_token_url}'" debug "GH access token response : '${access_token_response}'" debug "GH access token : '${access_token}'" - debug "GH reponse payload : $payload" + debug "GH response payload : $payload" echo $(echo $payload | jq .token --raw-output) }