-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bug Report: missing caller-id
flag on some vtctldclient commands
#17138
Comments
Thanks, @notfelineit ! The |
@shlomi-noach I think this may be
So that's the exact same path that |
AFAICT, this is what we need to do: diff --git a/go/cmd/vtctldclient/command/onlineddl.go b/go/cmd/vtctldclient/command/onlineddl.go
index cec60ddd98..eb18be93f7 100644
--- a/go/cmd/vtctldclient/command/onlineddl.go
+++ b/go/cmd/vtctldclient/command/onlineddl.go
@@ -153,6 +153,7 @@ func commandOnlineDDLCancel(cmd *cobra.Command, args []string) error {
resp, err := client.CancelSchemaMigration(commandCtx, &vtctldatapb.CancelSchemaMigrationRequest{
Keyspace: keyspace,
Uuid: uuid,
+ CallerId: applySchemaOptions.CallerID,
})
if err != nil {
return err
@@ -417,6 +418,8 @@ func commandOnlineDDLShow(cmd *cobra.Command, args []string) error {
}
func init() {
+ OnlineDDL.Flags().StringVar(&applySchemaOptions.CallerID, "caller-id", "", "Effective caller ID used for the operation and should map to an ACL name which grants this identity the necessary permissions to perform the operation (this is only necessary when strict table ACLs are used).")
+
OnlineDDL.AddCommand(OnlineDDLCancel)
OnlineDDL.AddCommand(OnlineDDLCleanup)
OnlineDDL.AddCommand(OnlineDDLComplete)
diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go
index aaf13fb864..65c8d8ceef 100644
--- a/go/vt/vtctl/grpcvtctldserver/server.go
+++ b/go/vt/vtctl/grpcvtctldserver/server.go
@@ -575,6 +575,7 @@ func (s *VtctldServer) CancelSchemaMigration(ctx context.Context, req *vtctldata
Keyspace: req.Keyspace,
Sql: []string{query},
WaitReplicasTimeout: protoutil.DurationToProto(DefaultWaitReplicasTimeout),
+ CallerId: req.CallerId,
})
if err != nil {
return nil, err Adding vitess/go/vt/vtctl/grpcvtctldserver/server.go Lines 558 to 587 in 9ed8ee2
|
Thank you @notfelineit for detecting and @mattlord for analyzing. You're both correct here, and we should make that change. Side note: |
Overview of the Issue
Using
vtctldclient OnlineDDL
without the--caller-id
flag results in:This works however!
Reproduction Steps
vtctldclient --server :15999 OnlineDDL cancel <KEYSPACE> <UUID>
Binary Version
Operating System and Environment details
The text was updated successfully, but these errors were encountered: