[jboss-jira] [JBoss JIRA] (WFLY-9831) a correction of cli does not work in non-interactive mode
Hisanobu Okuda (JIRA)
issues at jboss.org
Thu Feb 15 00:42:00 EST 2018
Hisanobu Okuda created WFLY-9831:
------------------------------------
Summary: a correction of cli does not work in non-interactive mode
Key: WFLY-9831
URL: https://issues.jboss.org/browse/WFLY-9831
Project: WildFly
Issue Type: Bug
Components: CLI
Affects Versions: 11.0.0.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}
$ /home/eap64x/bin/jboss-cli.sh -c "/core-service=vault:add(vault-options=["KEYSTORE_URL" => "/home/eap64x/vault/vault.jceks", "KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr", "KEYSTORE_ALIAS" => "vault", "SALT" => "12345678","ITERATION_COUNT" => "33", "ENC_FILE_DIR" => "/home/eap64x/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