-
Notifications
You must be signed in to change notification settings - Fork 395
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
satellite/gracefulexit: Add graceful exit completed/failed receipt verification to satellite CLI #3679
Conversation
….com/storj/storj into green/graceful-exit-signature-verify
cmd/satellite/gracefulexit.go
Outdated
@@ -98,3 +104,46 @@ func generateGracefulExitCSV(ctx context.Context, completed bool, start time.Tim | |||
} | |||
return err | |||
} | |||
|
|||
func verifyGracefulExitReceipt(ctx context.Context, identity *identity.FullIdentity, receipt string) 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.
Maybe we should also have an input for the requested storage node id so we can check that the receipt is actually for that storage node?
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.
Added ID checks
} | ||
|
||
// Check the receipt is not empty | ||
nodeID, err := storj.NodeIDFromString(args[0]) |
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.
if the first arg is nodeID, the usage description and minimum args needs to be updated, right?
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.
Yes. Updated.
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.
LGTM
cmd/satellite/main.go
Outdated
zap.S().Fatal(err) | ||
} | ||
|
||
// Check the receipt is not empty |
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 - the comment here is a little misleading?
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.
fixed. old comment :)
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.
works for me
What:
Add graceful exit completed/failed receipt verification to satellite CLI
Why:
We want to be able to verify a completed/failed receipt if a storage node opens a ticket related to payouts for graceful exit.
Please describe the tests:
Please describe the performance impact:
Code Review Checklist (to be filled out by reviewer)