-
Notifications
You must be signed in to change notification settings - Fork 526
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
[feat] tools-v2: add bs [list|query] scan-status #2361 #2481
Conversation
cicheck |
@Cyber-SiKu @Xinlong-Chen PTAL |
tools-v2/README.md
Outdated
- [status etcd](#status-etcd-1) | ||
- [status mds](#status-mds-1) |
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.
repeat.
There are many mistakes in this reamdme, please correct them.
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.
ok
timeout := config.GetFlagDuration(cCmd.Cmd, config.RPCTIMEOUT) | ||
retrytimes := config.GetFlagInt32(cCmd.Cmd, config.RPCRETRYTIMES) | ||
|
||
// FilterScanning 赋值 true |
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.
use English
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.
done
@@ -0,0 +1,123 @@ | |||
/* |
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.
This command seems to have no output?
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.
I use this image opencurvedocker/curvebs:v1.2.6, and I can get outout like above. I try to build image myself, but I meet some errors.
#0 3.178 404 Not Found
#0 3.194 Ign:5 http://httpredir.debian.org/debian stretch-backports InRelease
#0 3.234 Err:6 http://mirrors.163.com/debian stretch-updates Release
#0 3.234 404 Not Found
#0 3.281 Err:7 http://mirrors.163.com/debian-security stretch/updates Release
#0 3.281 404 Not Found
#0 3.535 Err:8 http://httpredir.debian.org/debian stretch-backports Release
#0 3.535 404 Not Found
What may I need do to solve this?
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.
debian stretch-updates Release
#0 3.234 404 Not Found
debian9 EOL,
https://stackoverflow.com/questions/76094428/debian-stretch-repositories-404-not-found
https://help.aliyun.com/document_detail/2261325.html
tools-v2/internal/utils/row.go
Outdated
ROW_RECYCLE = "recycle" | ||
ROW_RESULT = "result" | ||
ROW_SCAN = "scan" | ||
ROW_LASTSCANSEC = "lastScanSec" |
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.
ROW_LASTSCANSEC = "lastScanSec" | |
ROW_LASTSCAN = "last Scan" |
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.
done
tools-v2/internal/utils/row.go
Outdated
ROW_RESULT = "result" | ||
ROW_SCAN = "scan" | ||
ROW_LASTSCANSEC = "lastScanSec" | ||
ROW_LASTSCANCONSISTENT = "lastScanConsistent" |
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.
ROW_LASTSCANCONSISTENT = "lastScanConsistent" | |
ROW_LAST_SCAN_CONSISTENT = "last Scan Consistent" |
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.
done
row[cobrautil.ROW_LOGICALPOOL] = fmt.Sprintf("%d", info.GetLogicalPoolId()) | ||
row[cobrautil.ROW_COPYSET_ID] = fmt.Sprintf("%d", info.GetCopysetId()) | ||
row[cobrautil.ROW_SCAN] = fmt.Sprintf("%v", info.GetScaning()) | ||
row[cobrautil.ROW_LASTSCANSEC] = fmt.Sprintf("%v", info.GetLastScanSec()) |
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.
This should be a Unix Timestamp, you can convert it.
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.
I don't find convert in the old tools. seems the old tools just out the lastscansec?
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.
I don't find convert in the old tools. seems the old tools just out the lastscansec?
There is no need to emulate old tools, you can implement it in time.go.
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.
I don't find convert in the old tools. seems the old tools just out the lastscansec?
There is no need to emulate old tools, you can implement it in time.go.
done
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.
good job!
tools-v2/pkg/cli/command/curvebs/query/scanstatus/scanstatus.go
Outdated
Show resolved
Hide resolved
tools-v2/pkg/cli/command/curvebs/query/scanstatus/scanstatus.go
Outdated
Show resolved
Hide resolved
tools-v2/pkg/cli/command/curvebs/query/scanstatus/scanstatus.go
Outdated
Show resolved
Hide resolved
tools-v2/pkg/cli/command/curvebs/query/scanstatus/scanstatus.go
Outdated
Show resolved
Hide resolved
tools-v2/pkg/cli/command/curvebs/query/scanstatus/scanstatus.go
Outdated
Show resolved
Hide resolved
hi, u can comment |
cicheck |
2 similar comments
cicheck |
cicheck |
image: curveadm playground run --kind curvebs --container_image harbor.cloud.netease.com/curve/curvebs:playground |
I cant pull this image,@ Cyber-SiKu said they are updating images from debian9 to debian11. I tried to build with opencurvedocker/curve-base:build-debian11. But I met some errors.. |
I will have a try with opencurvedocker/curvebs:v1.2.6. |
is it ok to use "curve_ops_tools scan-status"? |
|
|
updated the description above |
|
I know your mean. Now my problem is when executing |
|
thanks, I'll try to build a image base debian11 or try something else.. |
Looks like it's because of this bug #2241 |
) | ||
|
||
const ( | ||
scanStatusExample = `$ curve bs query scan-satus --copysetid 1 --logicalpoolid 1` |
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.
scanStatusExample = `$ curve bs query scan-satus --copysetid 1 --logicalpoolid 1` | |
scanStatusExample = `$ curve bs query scan-status --copysetid 1 --logicalpoolid 1` |
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.
done
cicheck |
Signed-off-by: lianzhanbiao <lzbcs@outlook.com>
cicheck |
3 similar comments
cicheck |
cicheck |
cicheck |
Signed-off-by: lianzhanbiao lzbcs@outlook.com
What problem does this PR solve?
Issue Number: #2361
Problem Summary: support bs scan status command in curve tool
What is changed and how it works?
What's Changed:
add tools-v2/pkg/cli/command/curvebs/list/copyset/copyset.go
add tools-v2/pkg/cli/command/curvebs/list/scanstatus/scanstatus.go
add tools-v2/pkg/cli/command/curvebs/query/scanstatus/scanstatus.go
modify tools-v2/pkg/cli/command/curvebs/list/list.go
modify tools-v2/pkg/cli/command/curvebs/query/copyset.go
modify tools-v2/pkg/cli/command/curvebs/query/query.go
modify tools-v2/README.md
modify tools-v2/internal/utils/row.go
modify tools-v2/internal/error/error.go
How it Works:
command result
command result
Side effects(Breaking backward compatibility? Performance regression?):
Check List