Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-208

openshift-common.sh executes CLI command against non-existing standalone.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • OpenShift
    • None

      Using image docker-registry.upshift.redhat.com/kwills/eap-cd-openshift-rhel8:18.0-EAP7-1216 we are unable to build an application deployment that will need to setup a datasource, eg. executed with properties:

      CUSTOM_INSTALL_DIRECTORIES=mypg_module,mypg_driver
      DRIVERS=MYPG
      MYPG_DRIVER_NAME=mypg
      MYPG_DRIVER_MODULE=org.mypg
      MYPG_XA_DATASOURCE_CLASS=org.postgresql.xa.PGXADataSource
      

      The error in build log is (when executed with SCRIPT_DEBUG=true):

      ...
      + CLI_SCRIPT_FILE_FOR_EMBEDDED=/tmp/cli-configuration-script-1569488395.cli
      + echo 'embed-server --timeout=30 --server-config=standalone.xml --std-out=echo'
      + cat /opt/eap/bin/launch/drivers.cli
      + echo ''
      + echo stop-embedded-server
      + echo 'Configuring the server using embedded server'
      Configuring the server using embedded server
      ++ date +%s%3N
      + start=1569488395421
      + eval /opt/eap/bin/jboss-cli.sh --file=/tmp/cli-configuration-script-1569488395.cli --properties=/tmp/cli-script-property.cli '&>/tmp/cli-script-output.cli'
      ++ /opt/eap/bin/jboss-cli.sh --file=/tmp/cli-configuration-script-1569488395.cli --properties=/tmp/cli-script-property.cli
      error: build error: non-zero (13) exit code from docker-registry.upshift.redhat.com/kwills/eap-cd-openshift-rhel8:18.0-EAP7-1216
      

      The problematic script is /opt/eap/bin/launch/openshift-common.sh.
      The problem here is that the script is trying to modify standalone.xml but there is no such file at the time of the execution, only standalone.openshift.xml exists.

      I can also see that the config name is looked up in openshift-common.sh by:

      SERVER_CONFIG=${WILDFLY_SERVER_CONFIGURATION:-standalone.xml}
      

      and this variable is set in launch/launch-config.sh:

      WILDFLY_SERVER_CONFIGURATION=standalone-openshift.xml
      

      but according to build log launch/launch-config.sh is never executed or sourced so the wrong default value is used.

              jdenise@redhat.com Jean Francois Denise
              jbliznak@redhat.com Jan Blizňák
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: