Add command cluster create-failure-domain - #21
Merged
Conversation
create-failure-domain
zymap
force-pushed
the
clusters_create_failure_domain
branch
2 times, most recently
from
September 3, 2019 02:43
9902b67 to
d230065
Compare
create-failure-domaincreate-failure-domain
zymap
force-pushed
the
clusters_create_failure_domain
branch
from
September 3, 2019 03:56
386fda2 to
919d4d0
Compare
Member
|
The output doesn't seem to be correct to me. |
Member
Author
|
@sijie Ah. It already fixes in the code. I forget fix the description of this pull request. |
sijie
requested changes
Sep 3, 2019
| } | ||
| out = append(out, successOut) | ||
| out = append(out, argsError) | ||
| out = append(out, clusterNonExist) |
Member
There was a problem hiding this comment.
clusterNonExist is for cluster commands. please make sure the error message is correct.
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Member
Author
|
@sijie PTAL |
sijie
requested changes
Sep 3, 2019
| "testing" | ||
| ) | ||
|
|
||
| func TestCreateFailureDomainCmdSuccess(t *testing.T) { |
Member
There was a problem hiding this comment.
please add test cases for failure cases.
| desc.CommandPermission = "This command requires super-user permissions." | ||
|
|
||
| var examples []pulsar.Example | ||
| create := pulsar.Example{ |
Member
There was a problem hiding this comment.
does Pulsar allow creating a failure domain without a broker list?
I don't think that is a valid case.
Member
Author
There was a problem hiding this comment.
yes. I will check the broker list in pulsarctl.
Using pulsar-admin
bin/pulsar-admin clusters create-failure-domain --domain-name hello standalone
bin/pulsar-admin clusters list-failure-domains standalone
{
"hello" : {
"brokers" : [ ]
}
}
### Motivation We can't get the error info when running a command. When testing a command, we need to verify the error output. ### Modification Make a handler to handle errors. Create a test handler in TestClusterCommand for test other commands.
--- Master Issue: #2
sijie
approved these changes
Sep 3, 2019
tisonkun
pushed a commit
to tisonkun/pulsar-client-go
that referenced
this pull request
Aug 15, 2023
Master issue: streamnative/pulsarctl#2 ``` USED FOR: This command is used for creating a failure domain of the <cluster-name>. REQUIRED PERMISSION: This command requires super-user permissions. EXAMPLES: #creating the failure domain pulsarctl clusters create-failure-domain <cluster-name> <domain-name> #creating the failure domain with brokers pulsarctl clusters create-failure-domain --broker-list <cluster-A> --broker-list <cluster-B> <cluster-name> <domain-name> OUTPUT: #normal output Create failure domain <domain-name> for cluster <cluster-name> succeed #the args need to be specified as <cluster-name> <domain-name> [✖] need specified two names for cluster and failure domain #the specified cluster does not exist in the broker [✖] code: 404 reason: Cluster does not exist Usage: pulsarctl clusters create-failure-domain [flags] Aliases: create-failure-domain, cfd FailureDomainData flags: -b, --broker-list strings Set the failure domain clusters Common flags: -s, --admin-service-url string The admin web service url that pulsarctl connects to. (default "http://localhost:8080") --auth-params string Authentication parameters are used to configure the public and private key files required by tls For example: "tlsCertFile:val1,tlsKeyFile:val2" -C, --color string toggle colorized logs (true,false,fabulous) (default "true") -h, --help help for this command --tls-allow-insecure Allow TLS insecure connection --tls-trust-cert-pat string Allow TLS trust cert file path -v, --verbose int set log level, use 0 to silence, 4 for debugging (default 3) Use 'pulsarctl clusters create-failure-domain [command] --help' for more information about a command. ```
tisonkun
pushed a commit
to apache/pulsar-client-go
that referenced
this pull request
Aug 16, 2023
Master issue: streamnative/pulsarctl#2 ``` USED FOR: This command is used for creating a failure domain of the <cluster-name>. REQUIRED PERMISSION: This command requires super-user permissions. EXAMPLES: #creating the failure domain pulsarctl clusters create-failure-domain <cluster-name> <domain-name> #creating the failure domain with brokers pulsarctl clusters create-failure-domain --broker-list <cluster-A> --broker-list <cluster-B> <cluster-name> <domain-name> OUTPUT: #normal output Create failure domain <domain-name> for cluster <cluster-name> succeed #the args need to be specified as <cluster-name> <domain-name> [✖] need specified two names for cluster and failure domain #the specified cluster does not exist in the broker [✖] code: 404 reason: Cluster does not exist Usage: pulsarctl clusters create-failure-domain [flags] Aliases: create-failure-domain, cfd FailureDomainData flags: -b, --broker-list strings Set the failure domain clusters Common flags: -s, --admin-service-url string The admin web service url that pulsarctl connects to. (default "http://localhost:8080") --auth-params string Authentication parameters are used to configure the public and private key files required by tls For example: "tlsCertFile:val1,tlsKeyFile:val2" -C, --color string toggle colorized logs (true,false,fabulous) (default "true") -h, --help help for this command --tls-allow-insecure Allow TLS insecure connection --tls-trust-cert-pat string Allow TLS trust cert file path -v, --verbose int set log level, use 0 to silence, 4 for debugging (default 3) Use 'pulsarctl clusters create-failure-domain [command] --help' for more information about a command. ```
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Master issue: #2