-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
NO-JIRA: network, virt: Retry virtctl console cmd on err #29520
base: master
Are you sure you want to change the base?
Conversation
There is a flaky on ovn-kubernetes kubevirt live migration conformance test where there is the error "expecter: No process running", this means that the command "virtctl console -n [namespace]" has die before sending login command so the golang expecter fails. This change do a retry on that error and use a debug option to print the check status. Signed-off-by: Enrique Llorente <[email protected]>
/test e2e-aws-ovn-virt-techpreview |
@qinqon: This pull request explicitly references no jira issue. In 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. |
/jira refresh |
@qinqon: This pull request explicitly references no jira issue. In 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice !
I think re-connecting the console when the process is not available, then using it will address the flakes we see now and then about this feature.
And the code looks good.
Huge thanks.
err := retry.OnError(retry.DefaultBackoff, | ||
func(err error) bool { | ||
return strings.Contains(err.Error(), "expect: Process not running") | ||
}, | ||
func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
err := retry.OnError(retry.DefaultBackoff, | |
func(err error) bool { | |
return strings.Contains(err.Error(), "expect: Process not running") | |
}, | |
func() error { | |
err := retry.OnError( | |
retry.DefaultBackoff, | |
func(err error) bool { | |
return strings.Contains(err.Error(), "expect: Process not running") | |
}, | |
func() error { |
expecter, _, err := newExpecter(virtctlPath, vmiNamespace, vmiName, consoleConnectionTimeout, | ||
expect.Verbose(true), | ||
expect.VerboseWriter(GinkgoWriter), | ||
expect.DebugCheck(log.New(GinkgoWriter, "expect: virtctl console check", 0 /* no flags */)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do @qinqon ? Just log that we have to re-try establishing the connection ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It runs the check that of "virtctl command" running and prints it and return back the result, so if it fails we will se the stdout of the virtcl command itself.
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: maiqueb, qinqon The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest-required |
/label acknowledge-critical-fixes-only |
/cherr-pick release-4.18 |
@qinqon: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
There is a flaky on ovn-kubernetes kubevirt live migration conformance test where there is the error "expecter: No process running", this means that the command "virtctl console -n [namespace]" has die before sending login command so the golang expecter fails.
This change do a retry on that error and use a debug option to print the check status.