Skip to content
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

Add e2e for active-standby switching of spidercontroller #3069

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

ty-dc
Copy link
Collaborator

@ty-dc ty-dc commented Jan 9, 2024

Thanks for contributing!

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@ty-dc ty-dc added kind/test release/none no release note labels Jan 9, 2024
@ty-dc ty-dc added the pr/not-ready not ready for merging label Jan 9, 2024
@ty-dc ty-dc force-pushed the e2e/active—standby branch from be0d108 to 8175097 Compare January 9, 2024 10:32
@ty-dc ty-dc changed the title E2e/active—standby Add e2e for active/standby switching of spidercontroller Jan 9, 2024
@ty-dc ty-dc changed the title Add e2e for active/standby switching of spidercontroller Add e2e for active-standby switching of spidercontroller Jan 9, 2024
@ty-dc ty-dc force-pushed the e2e/active—standby branch 2 times, most recently from 170fd48 to 34a0f45 Compare January 10, 2024 02:01
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7f5a0c6) 81.15% compared to head (58386b3) 81.10%.
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3069      +/-   ##
==========================================
- Coverage   81.15%   81.10%   -0.06%     
==========================================
  Files          49       49              
  Lines        5334     5334              
==========================================
- Hits         4329     4326       -3     
- Misses        850      852       +2     
- Partials      155      156       +1     
Flag Coverage Δ
unittests 81.10% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@ty-dc ty-dc force-pushed the e2e/active—standby branch from 34a0f45 to a54ab2e Compare January 10, 2024 02:04
@ty-dc ty-dc removed the pr/not-ready not ready for merging label Jan 10, 2024
Comment on lines +253 to +254
if *spiderControllerLeases.Spec.HolderIdentity == v.Name {
GinkgoWriter.Printf("the spiderpool-controller current master is: %v \n", *spiderControllerLeases.Spec.HolderIdentity)
Copy link
Collaborator

Choose a reason for hiding this comment

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

要对spiderControllerLeases.Spec.HolderIdentity这个做判断是否为空指针

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

1

out, err := frame.DockerExecCommand(ctx, nodeList.Items[0].Name, metricsHealthyCheck)
if err != nil {
time.Sleep(common.ForcedWaitingTime)
frame.Log("failed to check metrics healthy, error: %v, output log is: %v ", err, string(out))
Copy link
Collaborator

Choose a reason for hiding this comment

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

err都出现了,怎么还能有out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个函数的 err 只是记录了 exit 1 、exit status 7 等,并没有对应的错误信息

此处的 out 会有类似

output log is:   
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  curl: (7) Failed to connect to 172.18.0.3 port 571: Connection refused

@ty-dc ty-dc force-pushed the e2e/active—standby branch from a54ab2e to 100304d Compare January 10, 2024 07:34
@ty-dc ty-dc force-pushed the e2e/active—standby branch from 100304d to 58386b3 Compare January 10, 2024 09:15
@Icarus9913 Icarus9913 merged commit 8b7398e into spidernet-io:main Jan 11, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants