-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Cluster-Alias cleanup for VTOrc #11193
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
Merged
GuptaManan100
merged 3 commits into
vitessio:main
from
planetscale:cluster-name-cleanup
Sep 12, 2022
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -504,15 +504,7 @@ func Cli(command string, strict bool, instance string, destination string, owner | |
| } | ||
| case registerCliCommand("reattach-replica-primary-host", "Replication, general", `Undo a detach-replica-primary-host operation`): | ||
| { | ||
| instanceKey, _ = inst.FigureInstanceKey(instanceKey, thisInstanceKey) | ||
| if instanceKey == nil { | ||
| log.Fatal("Cannot deduce instance:", instance) | ||
| } | ||
| _, err := inst.ReattachReplicaPrimaryHost(instanceKey) | ||
| if err != nil { | ||
| log.Fatal(err) | ||
| } | ||
| fmt.Println(instanceKey.DisplayString()) | ||
| fmt.Println("Command deprecated") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have removed some API and CLI commands that would have required some changes and that we don't intend to support anyways. I could have removed them as a separate PR, but I elected to do it here as I went along. |
||
| } | ||
| case registerCliCommand("primary-pos-wait", "Replication, general", `Wait until replica reaches given replication coordinates (--binlog=file:pos)`): | ||
| { | ||
|
|
@@ -671,7 +663,7 @@ func Cli(command string, strict bool, instance string, destination string, owner | |
| log.Fatal(err) | ||
| } | ||
| for _, clusterPoolInstance := range clusterPoolInstances { | ||
| fmt.Printf("%s\t%s\t%s\t%s:%d\n", clusterPoolInstance.ClusterName, clusterPoolInstance.ClusterAlias, clusterPoolInstance.Pool, clusterPoolInstance.Hostname, clusterPoolInstance.Port) | ||
| fmt.Printf("%s\t%s\t%s:%d\n", clusterPoolInstance.ClusterName, clusterPoolInstance.Pool, clusterPoolInstance.Hostname, clusterPoolInstance.Port) | ||
| } | ||
| } | ||
| case registerCliCommand("which-heuristic-cluster-pool-instances", "Pools", `List instances of a given cluster which are in either any pool or in a specific pool`): | ||
|
|
@@ -731,7 +723,7 @@ func Cli(command string, strict bool, instance string, destination string, owner | |
| log.Fatal(err) | ||
| } | ||
| for _, cluster := range clusters { | ||
| fmt.Printf("%s\t%s\n", cluster.ClusterName, cluster.ClusterAlias) | ||
| fmt.Printf("%s\n", cluster.ClusterName) | ||
| } | ||
| } | ||
| case registerCliCommand("all-clusters-primaries", "Information", `List of writeable primaries, one per cluster`): | ||
|
|
@@ -804,7 +796,7 @@ func Cli(command string, strict bool, instance string, destination string, owner | |
| if err != nil { | ||
| log.Fatal(err) | ||
| } | ||
| fmt.Println(clusterInfo.ClusterAlias) | ||
| fmt.Println(clusterInfo.ClusterName) | ||
| } | ||
| case registerCliCommand("which-cluster-domain", "Information", `Output the domain name of the cluster an instance belongs to, or error if unknown to orchestrator`): | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 augments the existing
ReadTopologyInstanceBufferableend to end test to also verify that we set the cluster_name correctly.