Bug 1928805
| Summary: | subctl e2e fails on first test, but message is misleading | ||
|---|---|---|---|
| Product: | Red Hat Advanced Cluster Management for Kubernetes | Reporter: | Noam Manos <nmanos> |
| Component: | Submariner | Assignee: | tpanteli |
| Status: | CLOSED ERRATA | QA Contact: | Noam Manos <nmanos> |
| Severity: | low | Docs Contact: | Christopher Dawson <cdawson> |
| Priority: | low | ||
| Version: | rhacm-2.2 | CC: | mkolesni, smattar, tfreger, tpanteli |
| Target Milestone: | --- | Flags: | smattar:
rhacm-2.2.z+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-04 19:31:22 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Noam Manos
2021-02-15 15:28:33 UTC
The error “Failed to find Clusters to detect if Globalnet is enabled. No Cluster found” means that no Cluster resource was found in ClusterA (the first cluster passed in which I assume was "pkomarov-cluster-a"). This is not related to the assertion in the issue title ("assumes kubeconfig context name is the same as cluster ID"). It actually no longer assumes that, ie it obtains the cluster ID from the SUBMARINER_CLUSTERID env var of the DaemonSet Spec for the gateway. This is reflected in the message "STEP: Setting cluster ID "default-cl2" for kube context name "default-cl2"", which indicates the kube context name and obtained cluster ID are one and the same for clusterB. However the cluster ID/name is only used for display in messages except for one case in LH E2E where it's used to obtain the health check IP.
But "STEP: Setting cluster ID "default-cl2" for kube context name "default-cl2"" is indicating that e2e evaluates wrong data -
There's no such context name "default-cl2", but only cluster id "default-cl2":
- context:
cluster: default-cl2
namespace: default
user: admin
name: pkomarov-cluster-b
The context name comes from what you pass in on the command line, presumably /mnt/skynet-data/pkomarov-env/ocpup/.config/cl2/auth/kubeconfig. Actually it is correct, ie extracts the Cluster field from the current context in the config file. TestContext.ClusterIDs is intended to be the cluster ID/name and not the context name as it's used for display in output messages. When running e2e from the make target, TestContext.ClusterIDs is initialized to the context name passed in. (In reply to tpanteli from comment #4) > Actually it is correct, ie extracts the Cluster field from the current > context in the config file. TestContext.ClusterIDs is intended to be the > cluster ID/name and not the context name as it's used for display in output > messages. When running e2e from the make target, TestContext.ClusterIDs is > initialized to the context name passed in. To clarify, the functionality is correct, ie TestContext.ClusterIDs is set correctly, but the message is misleading. The format params for the message are reversed although in this case it doesn't matter: By(fmt.Sprintf("Setting cluster ID %q for kube context name %q", TestContext.ClusterIDs[i], envVar.Value)) Also we shouldn't print the message if both values are the same. (In reply to tpanteli from comment #5) > (In reply to tpanteli from comment #4) > > Actually it is correct, ie extracts the Cluster field from the current > > context in the config file. TestContext.ClusterIDs is intended to be the > > cluster ID/name and not the context name as it's used for display in output > > messages. When running e2e from the make target, TestContext.ClusterIDs is > > initialized to the context name passed in. > > To clarify, the functionality is correct, ie TestContext.ClusterIDs is set > correctly, but the message is misleading. The format params for the message > are reversed although in this case it doesn't matter: > > By(fmt.Sprintf("Setting cluster ID %q for kube context name %q", > TestContext.ClusterIDs[i], envVar.Value)) > > Also we shouldn't print the message if both values are the same. Submitted https://github.com/submariner-io/shipyard/pull/456 The root cause of the failure was Submariner installation failure, which lead to E2E fail on first test. The message printed was misleading, there should probably be a Ginkgo "BeforeTest" step, that verifies that submariner is uninstall (e.g. as subctl show all would return "Submariner is not installed" - e2e should do the same). * stet that verifies that submariner is not installed Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (RHEA: Submariner 0.8 - bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2021:1500 |