Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Conversation

nshankar13
Copy link
Contributor

Signed-off-by: nshankar13 nshankar@microsoft.com

Description: Fix e2e_client_server_connectivity_test for NoInstall by explictly setting LocalProxyMode in setMeshConfigToDefault Method.

Resolves #4707

Testing done: Tested locally on AKS cluster with OSM already installed.

Affected area:

Functional Area
New Functionality [ ]
CI System [X]
CLI Tool [ ]
Certificate Management [ ]
Control Plane [ ]
Demo [ ]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [X]
Upgrade [ ]
Other [ ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project?

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change?

  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?

@nshankar13 nshankar13 changed the title Fix e2e_client_server_connectivity_test noInstall Fix e2e_client_server_connectivity_test for NoInstall May 2, 2022
@@ -442,6 +442,7 @@ func setMeshConfigToDefault(instOpts InstallOSMOpts, meshConfig *configv1alpha2.
meshConfig.Spec.Sidecar.LogLevel = instOpts.EnvoyLogLevel
meshConfig.Spec.Sidecar.MaxDataPlaneConnections = 0
meshConfig.Spec.Sidecar.ConfigResyncInterval = "0s"
meshConfig.Spec.Sidecar.LocalProxyMode = instOpts.LocalProxyMode
Copy link
Member

Choose a reason for hiding this comment

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

@keithmattix isn't this set as the default? Wondering why this needs to be explicitly set without looking further at the test code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LocalProxyMode is changed for the "Test traffic flowing from client to a server with a podIP bind" part of the test to v1alpha2.LocalProxyModePodIP, the previous 2 ginkgo.contexts use the default Proxy Mode.

The way the test was before, the new value for LocalProxyMode was only being set for fresh installs. For the change to also be made for NoInstall, the value needs to be explicitly changed in setMeshConfigToDefault.

Copy link
Contributor

@keithmattix keithmattix May 2, 2022

Choose a reason for hiding this comment

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

Because we don't have a helper function to access the LocalProxyMode field, there's no default being set outside of a Helm install. So when the MeshConfig doesn't have it set, it's just an empty string

Copy link
Member

Choose a reason for hiding this comment

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

@keithmattix Why don't we default its value in the CRD schema?

Copy link
Contributor

Choose a reason for hiding this comment

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

We do. But unless we're using an openapi unmarshaler, those defaults won't take effect

Copy link
Member

Choose a reason for hiding this comment

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

We could add a default in the json unmarshaler, but that also means we would need to change the API version if we change those defaults. This seems more like a test issue where the control plane is reused between tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, that's one of the downsides to adding not bumping a new version. This will also happen when users bump their OSM version, but because LocalProxyConfig is an opt-in behavior, we're fine with the 3rd case (unset) being the default.

@shashankram
Copy link
Member

@nshankar13 please add a commit description to share more context regarding the issue being fixed..

Currently, e2e_client_server_connectivity_test only
changes the value of LocalProxyMode for fresh
OSM installs, causing the test to fail for the podIP
bind for NoInstall. To change the value of
LocalProxyMode for NoInstall, it must be changed
explicitly in setMeshConfigToDefault.

Signed-off-by: nshankar13 <nshankar@microsoft.com>
@nshankar13 nshankar13 force-pushed the fix_noinstall_client_server_e2e branch from ca8fa3a to 13f9d82 Compare May 2, 2022 17:28
@nojnhuh nojnhuh merged commit 1e7d22a into openservicemesh:main May 3, 2022
keithmattix pushed a commit to keithmattix/osm that referenced this pull request May 3, 2022
Currently, e2e_client_server_connectivity_test only
changes the value of LocalProxyMode for fresh
OSM installs, causing the test to fail for the podIP
bind for NoInstall. To change the value of
LocalProxyMode for NoInstall, it must be changed
explicitly in setMeshConfigToDefault.

Signed-off-by: nshankar13 <nshankar@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OSM NoInstall Nightly Job failing for e2e_client_server_connectivity test.
4 participants