[jboss-jira] [JBoss JIRA] (WFCORE-3615) a correction of cli does not work in non-interactive mode
Jean-Francois Denise (JIRA)
issues at jboss.org
Fri Feb 16 10:18:00 EST 2018
[ https://issues.jboss.org/browse/WFCORE-3615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534521#comment-13534521 ]
Jean-Francois Denise commented on WFCORE-3615:
----------------------------------------------
As [~mkopecky] shown, we are facing a shell usage error instead of a CLI parsing error. You have 2 ways to fix your command:
1) Escape " character ==> \" (as proposed by [~mkopecky])
2) Use single quote character to quote the command.
I will close it as not a bug. Thank-you.
JF
> a correction of cli does not work in non-interactive mode
> ---------------------------------------------------------
>
> Key: WFCORE-3615
> URL: https://issues.jboss.org/browse/WFCORE-3615
> Project: WildFly Core
> Issue Type: Bug
> Components: CLI
> Affects Versions: 3.0.10.Final
> Environment: - WF 11.0.0.Final
> Reporter: Hisanobu Okuda
> Assignee: Jean-Francois Denise
>
> In interactive mode, the following command works:
> {code}
> $ $JBOSS_HOME/bin/jboss-cli.sh -c
> [standalone at localhost:9999 /] /core-service=vault:add(vault-options=[("KEYSTORE_URL" => "$JBOSS_HOME/vault/vault.jceks"), ("KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr"), ("KEYSTORE_ALIAS" => "vault"), ("SALT" => "12345678"),("ITERATION_COUNT" => "33"), ("ENC_FILE_DIR" => "$JBOSS_HOME/vault/")])
> {"outcome" => "success"}
> [standalone at localhost:9999 /]
> {code}
> But, in one-liner non-interactive mode, it does not work:
> {code}
> $ $JBOSS_HOME/bin/jboss-cli.sh -c "/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "$JBOSS_HOME/vault/vault.jceks"), ("KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr"), ("KEYSTORE_ALIAS" => "vault"), ("SALT" => "12345678"),("ITERATION_COUNT" => "33"), ("ENC_FILE_DIR" => "$JBOSS_HOME/vault/")])"
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: org.jboss.as.server.services.security.VaultReaderException: WFLYSRV0076: Error initializing vault -- org.jboss.security.vault.SecurityVaultException: PBOX00121: Option KEYSTORE_URL is null or empty",
> "rolled-back" => true
> }
> {code}
> Removing '(' and ')', it works:
> {code}
> $ $JBOSS_HOME/bin/jboss-cli.sh -c "/core-service=vault:add(vault-options=["KEYSTORE_URL" => "$JBOSS_HOME/vault/vault.jceks", "KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr", "KEYSTORE_ALIAS" => "vault", "SALT" => "12345678","ITERATION_COUNT" => "33", "ENC_FILE_DIR" => "$JBOSS_HOME/vault/"])"
> {"outcome" => "success"}
> $
> {code}
> Looks like a correction works in interactive mode. It should work as well in non-interactive mode.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list