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

CNS - Remove vnet join cache check during NC publish #1946

Merged
merged 1 commit into from
May 5, 2023
Merged

CNS - Remove vnet join cache check during NC publish #1946

merged 1 commit into from
May 5, 2023

Conversation

ramiro-gamarra
Copy link
Contributor

Reason for Change:

This PR reverts back a change introduced in #1825, where, during an NC publish, we check if a vnet join has been performed against nmagent and skip the call if so. This change introduced a regression due to nmagent behavior: if nmagent crashes while subscribed to a vnet with no NCs published, it will not re-subscribe once restarted, making the CNS cache invalid and resulting in new NCs published erroring with unauthorized codes. Removing this cache check will make it such that the vnet is always joined before any NC is published.

We should consider reintroducing this check (which greatly minimizes wireserver calls) once we can correctly remove a vnet from the cache when it has no NC.

…lways attempted during publish. this is the classic behavior circa cns v1.4.37
@ramiro-gamarra ramiro-gamarra requested a review from a team as a code owner May 4, 2023 23:59
@ramiro-gamarra ramiro-gamarra requested review from rsagasthya and removed request for a team May 4, 2023 23:59
@ramiro-gamarra ramiro-gamarra enabled auto-merge (squash) May 5, 2023 00:01
@ramiro-gamarra ramiro-gamarra merged commit a14eb1f into Azure:master May 5, 2023
respondJSON(w, http.StatusOK, resp) // legacy behavior
logger.Response(service.Name, resp, resp.Response.ReturnCode, err)
return
joinResp, err := service.wsproxy.JoinNetwork(ctx, req.NetworkID) //nolint:govet // ok to shadow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to add unit test to prevent it from happening again by accident?

rbtr pushed a commit that referenced this pull request Sep 8, 2023
removing vnet join cache check during nc publish, such that join is always attempted during publish. this is the classic behavior circa cns v1.4.37
jpayne3506 pushed a commit that referenced this pull request Sep 11, 2023
removing vnet join cache check during nc publish, such that join is always attempted during publish. this is the classic behavior circa cns v1.4.37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants