-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
RHDG 8.1 GA
-
None
-
False
-
False
-
Undefined
-
RHDG OpenShift documentation, specifically chapter "11.2. Creating Caches with Data Grid CLI" suggest that customers can use RHDG cli in OpenShift pod directly (by "oc rsh").
But CLI prints unexpected confusing AESH exception without clear user-friendly error message.
Output
sh-4.4$ ./cli.sh [disconnected]> quit 08:58:43,158 WARN (Thread-0) [AliasManager] Could not persist to alias file: java.io.IOException: Permission denied at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method) at java.base/java.io.File.createNewFile(File.java:1026) at org.aesh.readline.alias.AliasManager.persist(AliasManager.java:111) at org.aesh.readline.ReadlineConsole.doStop(ReadlineConsole.java:205) at org.aesh.readline.ReadlineConsole.stop(ReadlineConsole.java:211) at org.aesh.command.impl.invocation.AeshCommandInvocation.stop(AeshCommandInvocation.java:96) at org.infinispan.cli.impl.ContextAwareCommandInvocation.stop(ContextAwareCommandInvocation.java:63) at org.infinispan.cli.commands.Quit.exec(Quit.java:31) at org.infinispan.cli.commands.CliCommand.execute(CliCommand.java:32) at org.infinispan.cli.commands.CliCommand.execute(CliCommand.java:14) at org.aesh.command.impl.operator.EndOperator.execute(EndOperator.java:41) at org.aesh.command.impl.Executions$ExecutionImpl.execute(Executions.java:213) at org.aesh.readline.Process.run(Process.java:80) sh-4.4$
Steps to reproduce:
- Use OpenShift 4.6 and oc 4.6 client
- create RHDG OpenShift service
export INSTALL_NAMESPACE="${USER}-1-namespace" export WATCH_NAMESPACE="${USER}-1-watch-namespace" oc new-project ${INSTALL_NAMESPACE} oc new-project ${WATCH_NAMESPACE} oc apply -f - << EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: datagrid namespace: ${INSTALL_NAMESPACE} spec: targetNamespaces: - ${WATCH_NAMESPACE} EOF oc apply -f - << EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: datagrid-operator namespace: ${INSTALL_NAMESPACE} spec: channel: 8.1.x installPlanApproval: Automatic name: datagrid source: redhat-operators sourceNamespace: openshift-marketplace EOF oc get pods -n ${INSTALL_NAMESPACE} #wait until operator is installed sleep 15 oc get pods -n ${INSTALL_NAMESPACE} oc project ${WATCH_NAMESPACE} oc apply -f - << EOF apiVersion: infinispan.org/v1 kind: Infinispan metadata: name: example-infinispan spec: replicas: 1 EOF oc get pods #wait until RHDG is "Running" and "READY" sleep 20 oc get pods
- connect to RHDG pod
oc rsh example-infinispan-0
- call RHDG CLI there
cd /opt/infinispan/bin
- start and quit RHDG CLI
./cli.sh quit