Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DownstreamMerge] 8-8-2022 downstream merge without ep slice #1246

Conversation

trozet
Copy link
Contributor

@trozet trozet commented Aug 15, 2022

backup plan if #1237 fails

Pardhakeswar and others added 21 commits August 4, 2022 10:15
Signed-off-by: Pardhakeswar Pacha <ppacha@nvidia.com>
Apparently if you don't pass a ResourceVersion the call goes directly
through to etcd, while if you pass "0" it gets pulled from the apiserver's
cache. Pulling from the cache can greatly reduce load on etcd.

See:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go#L637

// GetList implements storage.Interface
func (c *Cacher) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error {
	recursive := opts.Recursive
	resourceVersion := opts.ResourceVersion
	pred := opts.Predicate
	if shouldDelegateList(opts) {
		return c.storage.GetList(ctx, key, opts, listObj)
	}
	<...>
}

func shouldDelegateList(opts storage.ListOptions) bool {
	resourceVersion := opts.ResourceVersion
	pred := opts.Predicate
	pagingEnabled := utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking)
	hasContinuation := pagingEnabled && len(pred.Continue) > 0
	hasLimit := pagingEnabled && pred.Limit > 0 && resourceVersion != "0"

	// If resourceVersion is not specified, serve it from underlying
	// storage (for backward compatibility). If a continuation is
	// requested, serve it from the underlying storage as well.
	// Limits are only sent to storage when resourceVersion is non-zero
	// since the watch cache isn't able to perform continuations, and
	// limits are ignored when resource version is zero
	return resourceVersion == "" || hasContinuation || hasLimit || opts.ResourceVersionMatch == metav1.ResourceVersionMatchExact
}

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
This denies resources that specify an invalid cidr.

Signed-off-by: Ori Braunshtein <obraunsh@redhat.com>
Isolate syncMap implementation from the retry logic:
  - retryObjEntry doesn't need to have mutex anymore
  - retryObjs doesn't work with cache mutexes, only calls methods

syncMap is a map with lockable keys. It allows to lock the key
regardless of whether the entry for given key exists.
When key is locked other threads can't read/write the entry with
the key.

Split ensureRetryEntryLocked into loadOrStore that will
make sure newEntry is present and locked, and load that was
previously called as ensureRetryEntryLocked with nil newRetryEntry.
Change iterateRetryResources to only lock every entry once and not use
cache mutex. Create a snapshot of keys that will be retried instead
of holding map lock.

Lock retryObject key until work for this key is completed.
That also removes the need for .ignore field - retry loop
will wait until key is unlocked.

Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
Fix retry_obj retryMutex vs retryEntry.Mutex deadlocks
kube: pass ResourceVersion:"0" for direct List() calls
Add EgressQoS DstCIDR kubebuilder validation
Signed-off-by: Girish Moodalbail <gmoodalbail@nvidia.com>
... since golangci-lint might install a later version by design: golangci/golangci-lint-action#75

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
…e informer cache

When processing an object in terminal state there is a chance that it was already removed from
the API server. Since delete events for objects in terminal state are skipped delete it here.

Signed-off-by: Patryk Diak <pdiak@redhat.com>
On update,  delete objects in terminal state that no longer exist in the informer cache
Followup to EndpointSlices PR for ovn-k node
Adding and removing a pod on changing nodes back to back can end up in a race where
corresponding logical switch port remains in the wrong logical switch and never gets
properly removed. In order for this to happen, the logical switch port has to have
the same name, which is the <namespace>_<podName>.

Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
Co-authored-by: Tim Rozet <trozet@redhat.com>
BZ2117310: Fix race when adding and removing pod with same name
@trozet
Copy link
Contributor Author

trozet commented Aug 15, 2022

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: trozet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 15, 2022
@ricky-rav
Copy link
Contributor

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 16, 2022

@trozet: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openstack-ovn f93daa5 link false /test e2e-openstack-ovn
ci/prow/okd-e2e-gcp-ovn f93daa5 link false /test okd-e2e-gcp-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@trozet trozet closed this Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants