Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1271

CRUD Booster on Minishift is unable to activate "openshift" profile

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2017.4.0
    • Fix Version/s: 2017.5.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2017-Apr-B

      Description

      With https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-rest-http-crud I was unable to activate an "openshift" profile when setting env vars for datasource config.

      If I rename `project-local.yml` to `project-defaults.yml` and have `project-openshift.yml` in src/main/resources with content of:

      swarm: 
        datasources: 
          data-sources: 
            MyDS: 
              driver-name: postgresql
              connection-url: jdbc:postgresql://localhost:5432/my_data
              user-name: user
              password: pwd
      

      And https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-rest-http-crud/blob/master/src/main/fabric8/deployment.yml#L21 is modified to be:

      value: "-Dswarm.datasources.data-sources.MyDS.connection-url=jdbc:postgresql://$(MY_DATABASE_SERVICE_HOST):$(MY_DATABASE_SERVICE_PORT)/my_data -Dswarm.datasources.data-sources.MyDS.user-name=$(DB_USERNAME) -Dswarm.datasources.data-sources.MyDS.password=$(DB_PASSWORD) -Dswarm.project.stage=openshift"
      

      Then I get errors that the `driver-name` for `MyDS` is set to `h2` and the driver doesn't exist. Adding DEBUG logging I can see the config value is set to `h2`.

      So not entirely sure what's going on, but looks like `project-defaults.yml` takes precedence irrespective of activated profiles.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                kenfinni Ken Finnigan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: