-
Notifications
You must be signed in to change notification settings - Fork 232
USHIFT-6800: Add c2cc reboot tests #6943
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
Open
vimauro
wants to merge
6
commits into
openshift:main
Choose a base branch
from
vimauro:reboot-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+228
−1
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0b0da45
Add reboot test suite
vimauro 36af46c
fixed cluster health checks
vimauro 8609857
register cluster-a as remote and remove unused code
vimauro 9504dee
Add disruptive test tag and addressed PR comments
vimauro cfece6a
Fixed linting and addressed PR comments
vimauro 15cc38a
small verification fix
vimauro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| *** Settings *** | ||
| Documentation Verify C2CC survives VM reboots in escalating scenarios. | ||
| ... Tests single cluster, two clusters simultaneously, and all three | ||
| ... clusters simultaneously. After each reboot cycle, full-stack | ||
| ... verification confirms connectivity, infrastructure, health probes, | ||
| ... and DNS all recover. | ||
|
|
||
| Resource ../../resources/c2cc.resource | ||
|
|
||
| Suite Setup Setup | ||
| Suite Teardown Teardown | ||
|
|
||
| Test Tags disruptive | ||
|
|
||
|
|
||
| *** Test Cases *** | ||
| Reboot Single Cluster | ||
| [Documentation] Reboot cluster-a while cluster-b and cluster-c remain up. | ||
| ... Verifies that the rebooted cluster re-establishes C2CC connectivity | ||
| ... with both peers. | ||
| [Setup] Ensure All Clusters Healthy | ||
|
vimauro marked this conversation as resolved.
Outdated
|
||
| Reboot Clusters Simultaneously cluster-a | ||
| Wait For Clusters Ready | ||
| Verify Full C2CC Stack | ||
|
|
||
| Reboot Two Clusters Simultaneously | ||
| [Documentation] Reboot cluster-b and cluster-c at the same time. | ||
| ... The surviving cluster-a must wait for both peers to recover. | ||
| ... The two rebooted clusters must also reconnect with each other. | ||
| [Setup] Ensure All Clusters Healthy | ||
|
vimauro marked this conversation as resolved.
Outdated
|
||
| Reboot Clusters Simultaneously cluster-b cluster-c | ||
| Wait For Clusters Ready | ||
| Verify Full C2CC Stack | ||
|
|
||
| Reboot All Three Clusters Simultaneously | ||
| [Documentation] Reboot all three clusters at once. | ||
| ... Every cluster starts from scratch simultaneously — no running peer | ||
| ... to reference. All must independently reconstruct C2CC state. | ||
| [Setup] Ensure All Clusters Healthy | ||
|
vimauro marked this conversation as resolved.
Outdated
|
||
| Reboot Clusters Simultaneously cluster-a cluster-b cluster-c | ||
| Wait For Clusters Ready | ||
| Verify Full C2CC Stack | ||
|
|
||
|
|
||
| *** Keywords *** | ||
| Setup | ||
| [Documentation] Set up clusters and deploy test workloads on all. | ||
| Check Required Env Variables | ||
| Login MicroShift Host | ||
| Setup Kubeconfig | ||
| Logout MicroShift Host | ||
|
|
||
| Register Remote Cluster cluster-a ${USHIFT_HOST} ${SSH_PORT} ${KUBECONFIG} | ||
| Register Remote Cluster cluster-b ${HOST2_IP} ${HOST2_SSH_PORT} ${KUBECONFIG_B} | ||
| Register Remote Cluster cluster-c ${HOST3_IP} ${HOST3_SSH_PORT} ${KUBECONFIG_C} | ||
| Deploy Test Workloads | ||
| Verify Full C2CC Stack | ||
|
|
||
| Teardown | ||
| [Documentation] Remove test workloads and close connections. | ||
| Cleanup Test Workloads | ||
| Teardown All Remote Clusters | ||
| Remove Kubeconfig | ||
|
|
||
| Wait For Clusters Ready | ||
| [Documentation] Wait for test pods and service endpoints to become ready | ||
| ... after a reboot cycle. | ||
| Wait For Test Pods | ||
| Wait For Service Endpoints | ||
|
|
||
| Verify Full C2CC Stack | ||
|
vimauro marked this conversation as resolved.
|
||
| [Documentation] Comprehensive verification of all C2CC components across all clusters. | ||
| Wait Until Keyword Succeeds 10m 10s Verify C2CC Connectivity | ||
| Wait Until Keyword Succeeds 10m 10s Verify C2CC Infrastructure | ||
| Wait Until Keyword Succeeds 10m 10s Verify C2CC Health Probes | ||
| Wait Until Keyword Succeeds 10m 10s Verify C2CC DNS | ||
|
|
||
| Verify C2CC Connectivity | ||
| [Documentation] Verify pod-to-pod, pod-to-service connectivity and source IP preservation | ||
| ... across all 6 cluster pairs. | ||
| FOR ${src} ${dst} IN | ||
| ... cluster-a cluster-b | ||
| ... cluster-a cluster-c | ||
| ... cluster-b cluster-a | ||
| ... cluster-b cluster-c | ||
| ... cluster-c cluster-a | ||
| ... cluster-c cluster-b | ||
| Test Connectivity Between Clusters ${src} ${dst} pod | ||
| Test Connectivity Between Clusters ${src} ${dst} service | ||
| Test Source IP Preserved Between Clusters ${src} ${dst} pod | ||
| Test Source IP Preserved Between Clusters ${src} ${dst} service | ||
| END | ||
|
|
||
| Verify C2CC Infrastructure | ||
| [Documentation] Verify routes, IP rules, nftables, OVN static routes, | ||
| ... and node annotations for all cluster-peer combinations. | ||
| Verify Infra For Remote Peer cluster-a ${CLUSTER_B_POD_CIDR} ${CLUSTER_B_SVC_CIDR} ${CLUSTER_A_SVC_CIDR} | ||
| Verify Infra For Remote Peer cluster-a ${CLUSTER_C_POD_CIDR} ${CLUSTER_C_SVC_CIDR} ${CLUSTER_A_SVC_CIDR} | ||
| Verify Infra For Remote Peer cluster-b ${CLUSTER_A_POD_CIDR} ${CLUSTER_A_SVC_CIDR} ${CLUSTER_B_SVC_CIDR} | ||
| Verify Infra For Remote Peer cluster-b ${CLUSTER_C_POD_CIDR} ${CLUSTER_C_SVC_CIDR} ${CLUSTER_B_SVC_CIDR} | ||
| Verify Infra For Remote Peer cluster-c ${CLUSTER_A_POD_CIDR} ${CLUSTER_A_SVC_CIDR} ${CLUSTER_C_SVC_CIDR} | ||
| Verify Infra For Remote Peer cluster-c ${CLUSTER_B_POD_CIDR} ${CLUSTER_B_SVC_CIDR} ${CLUSTER_C_SVC_CIDR} | ||
|
|
||
| Verify Infra For Remote Peer | ||
| [Documentation] Verify all infrastructure components on a cluster for one remote peer. | ||
| [Arguments] ${alias} ${remote_pod_cidr} ${remote_svc_cidr} ${local_svc_cidr} | ||
| Verify Routes In Table 200 ${alias} ${remote_pod_cidr} ${remote_svc_cidr} | ||
| Verify IP Rules For Table 200 ${alias} ${remote_pod_cidr} ${remote_svc_cidr} | ||
| Verify Routes In Table 201 ${alias} ${local_svc_cidr} | ||
| Verify Service IP Rules ${alias} ${remote_pod_cidr} ${remote_svc_cidr} ${local_svc_cidr} | ||
| Verify NFTables Bypass Rules ${alias} ${remote_pod_cidr} ${remote_svc_cidr} | ||
| Verify OVN Static Routes ${alias} ${remote_pod_cidr} ${remote_svc_cidr} | ||
| Verify Node SNAT Annotation ${alias} ${remote_pod_cidr} ${remote_svc_cidr} | ||
| Verify C2CC Tracking Annotation ${alias} ${remote_pod_cidr} ${remote_svc_cidr} | ||
|
|
||
| Verify C2CC Health Probes | ||
| [Documentation] Verify all RemoteCluster CRs report Healthy with populated timestamps. | ||
| FOR ${alias} IN cluster-a cluster-b cluster-c | ||
| Verify RemoteCluster State ${alias} Healthy | ||
| ${stdout}= Oc On Cluster ${alias} | ||
| ... oc get remoteclusters.microshift.io -o jsonpath='{.items[*].status.lastProbeTime}' | ||
| Should Not Be Empty ${stdout} | ||
| ${stdout}= Oc On Cluster ${alias} | ||
| ... oc get remoteclusters.microshift.io -o jsonpath='{.items[*].status.lastSuccessfulProbe}' | ||
| Should Not Be Empty ${stdout} | ||
| END | ||
|
|
||
| Verify C2CC DNS | ||
| [Documentation] Verify CoreDNS Corefile contains C2CC server blocks and | ||
| ... cross-cluster DNS resolution works for all pairs. | ||
| Verify Corefile Contains C2CC Server Block cluster-a ${CLUSTER_B_DOMAIN} | ||
| Verify Corefile Contains C2CC Server Block cluster-a ${CLUSTER_C_DOMAIN} | ||
| Verify Corefile Contains C2CC Server Block cluster-b ${CLUSTER_A_DOMAIN} | ||
| Verify Corefile Contains C2CC Server Block cluster-b ${CLUSTER_C_DOMAIN} | ||
| Verify Corefile Contains C2CC Server Block cluster-c ${CLUSTER_A_DOMAIN} | ||
| Verify Corefile Contains C2CC Server Block cluster-c ${CLUSTER_B_DOMAIN} | ||
| Curl Remote Service Via DNS cluster-a cluster-b | ||
| Curl Remote Service Via DNS cluster-a cluster-c | ||
| Curl Remote Service Via DNS cluster-b cluster-a | ||
| Curl Remote Service Via DNS cluster-b cluster-c | ||
| Curl Remote Service Via DNS cluster-c cluster-a | ||
| Curl Remote Service Via DNS cluster-c cluster-b | ||
|
|
||
| Ensure All Clusters Healthy | ||
| [Documentation] Pre-condition: all clusters must have Healthy RemoteCluster CRs. | ||
| Verify All RemoteClusters Healthy | ||
|
vimauro marked this conversation as resolved.
Outdated
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.