SDN-4168: Optimize timing for IPsec tests - #28797
Conversation
9b28169 to
95898fc
Compare
95898fc to
94bd34b
Compare
|
@pperiyasamy: This pull request references SDN-4168 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Job Failure Risk Analysis for sha: 94bd34b
|
|
/assign @jcaamano |
94bd34b to
59a8b3a
Compare
|
Job Failure Risk Analysis for sha: 59a8b3a
|
jcaamano
left a comment
There was a problem hiding this comment.
@pperiyasamy I think we need to find a way to test this in CI without merging
| func ensureIPsecExternalEnabled(oc *exutil.CLI) error { | ||
| return wait.PollUntilContextTimeout(context.Background(), ipsecRolloutWaitInterval, | ||
| ipsecRolloutWaitDuration, true, func(ctx context.Context) (bool, error) { | ||
| ds, err := getDaemonSet(oc, ovnNamespace, ovnIPsecDsName) |
There was a problem hiding this comment.
I would add a comment here that you expect the daemon set to not be deployed
| return nil | ||
| }) | ||
| pingSync.Go(func() error { | ||
| wg.Wait() |
There was a problem hiding this comment.
I don't think this wait group is going to help
I would just increase the ping counter if you think we need that
| o.Expect(err).To(o.HaveOccurred()) | ||
| err = pingAndCheckNodeTraffic(config.srcNodeConfig, config.dstNodeConfig, icmp) | ||
| o.Expect(err).To(o.HaveOccurred()) | ||
| err = nil |
There was a problem hiding this comment.
I just realized you probably need to consider using GinkgoHelper() if you are going to use gomega on helper functions
https://onsi.github.io/gomega/#making-assertions-in-helper-functions
There was a problem hiding this comment.
The err is expected to happen here. so err = nil is needed to make defer block clean up test pods.
added GinkgoHelper() in helper functions.
| o.Expect(nsCertMachineConfig).NotTo(o.BeNil()) | ||
| o.Eventually(func() bool { | ||
| pools, err := getMachineConfigPoolByLabel(oc, workerRoleMachineConfigLabel) | ||
| o.Expect(err).NotTo(o.HaveOccurred()) |
There was a problem hiding this comment.
I just realized your function needs to take a gomega instance as parameter if you plan to use it within Eventually blocks
https://onsi.github.io/gomega/#category-3-making-assertions-eminem-the-function-passed-into-codeeventuallycode
| g.By(fmt.Sprintf("configure IPsec in %s mode and validate traffic", mode)) | ||
| // Change IPsec mode to External and packet capture on the node's interface | ||
| // must be geneve encapsulated ones. | ||
| // Change IPsec mode to given mode and do packet capture on the node's interface |
There was a problem hiding this comment.
This err := configureIPsecMode(oc, mode) is not causing a reboot when ipsec machine config extensions are deployed? Is that because we the CI job starts deploys the cluster with IPSec already enabled? In Full mode?
There was a problem hiding this comment.
yes, this is what we discussed last week. We'll have CI job starting cluster with IPsec full mode and then execute the tests with minimal number of node reboots
| if !time.Now().Before(certExpirationDate) { | ||
| framework.Failf("certficates in the Machine Config are expired, Please consider recreating those certificates") | ||
| } | ||
| nsCertMachineConfig, err := createIPsecCertsMachineConfig(oc) |
There was a problem hiding this comment.
I guess this does not cause a reboot because they are just ceerts
There was a problem hiding this comment.
this still causes reboot of worker nodes and certs are deployed via machine config.
59a8b3a to
ff43448
Compare
There was a problem hiding this comment.
I think we need to find a way to test this in CI without merging
yes, we must merge this CI lane openshift/release#50687 to get this tested. cc @jluhrsen
| func ensureIPsecExternalEnabled(oc *exutil.CLI) error { | ||
| return wait.PollUntilContextTimeout(context.Background(), ipsecRolloutWaitInterval, | ||
| ipsecRolloutWaitDuration, true, func(ctx context.Context) (bool, error) { | ||
| ds, err := getDaemonSet(oc, ovnNamespace, ovnIPsecDsName) |
| o.Expect(err).To(o.HaveOccurred()) | ||
| err = pingAndCheckNodeTraffic(config.srcNodeConfig, config.dstNodeConfig, icmp) | ||
| o.Expect(err).To(o.HaveOccurred()) | ||
| err = nil |
There was a problem hiding this comment.
The err is expected to happen here. so err = nil is needed to make defer block clean up test pods.
added GinkgoHelper() in helper functions.
| if !time.Now().Before(certExpirationDate) { | ||
| framework.Failf("certficates in the Machine Config are expired, Please consider recreating those certificates") | ||
| } | ||
| nsCertMachineConfig, err := createIPsecCertsMachineConfig(oc) |
There was a problem hiding this comment.
this still causes reboot of worker nodes and certs are deployed via machine config.
| g.By(fmt.Sprintf("configure IPsec in %s mode and validate traffic", mode)) | ||
| // Change IPsec mode to External and packet capture on the node's interface | ||
| // must be geneve encapsulated ones. | ||
| // Change IPsec mode to given mode and do packet capture on the node's interface |
There was a problem hiding this comment.
yes, this is what we discussed last week. We'll have CI job starting cluster with IPsec full mode and then execute the tests with minimal number of node reboots
| o.Expect(nsCertMachineConfig).NotTo(o.BeNil()) | ||
| o.Eventually(func() bool { | ||
| pools, err := getMachineConfigPoolByLabel(oc, workerRoleMachineConfigLabel) | ||
| o.Expect(err).NotTo(o.HaveOccurred()) |
|
/test ? |
|
@pperiyasamy: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
DetailsIn response to this:
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-sigs/prow repository. |
|
/test e2e-aws-ovn-ipsec-serial |
4 similar comments
|
/test e2e-aws-ovn-ipsec-serial |
|
/test e2e-aws-ovn-ipsec-serial |
|
/test e2e-aws-ovn-ipsec-serial |
|
/test e2e-aws-ovn-ipsec-serial |
|
Job Failure Risk Analysis for sha: ff43448
|
|
Job Failure Risk Analysis for sha: 7386625
|
|
/test e2e-aws-ovn-ipsec-serial |
|
Job Failure Risk Analysis for sha: 7386625
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgoodwin, pperiyasamy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
|
/label acknowledge-critical-fixes-only |
|
Job Failure Risk Analysis for sha: 7386625
|
|
Job Failure Risk Analysis for sha: 7386625
|
1 similar comment
|
Job Failure Risk Analysis for sha: 7386625
|
|
/retest-required |
1 similar comment
|
/retest-required |
|
Job Failure Risk Analysis for sha: 7386625
|
1 similar comment
|
Job Failure Risk Analysis for sha: 7386625
|
|
/retest-required |
|
@pperiyasamy: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
Job Failure Risk Analysis for sha: 7386625
|
|
Job Failure Risk Analysis for sha: 7386625
|
|
/retest-required |
|
[ART PR BUILD NOTIFIER] Distgit: openshift-enterprise-tests |
|
/cherry-pick release-4.18 |
|
@jluhrsen: new pull request created: #29411 DetailsIn response to this:
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-sigs/prow repository. |
The ipsec test suite takes about 5-6 hours to finish running the tests, This PR optimizes ipsec tests such that it reboots only worker nodes for cert installation and tests execution time can be greatly reduced to 2-3 hrs.