Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-112847

Deploying osgi configurations while Portal is running reformats properties with invalid syntax

    Details

    • Fix Priority:
      5
    • Sprint:
      U&SM| S03 Sprint 24 |5.26-6.9, U&SM| S03 Sprint 25 | 6.9-23, U&SM| S03 Sprint 26 | 6.23-7.7

      Description

      Steps to reproduce:

      1. Start Portal
      2. While Portal is running, create an osgi configuration file WITHOUT property type marker characters and place it within <liferay home>/osgi/config
        For example, deploy com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConnectionConfiguration-test.config with the following properties:
        active="true"
        connectionId="test"
        networkHostAddresses=["http://localhost:9202"]
        

        Do not use the type marker, e.g. don't use: active=B"true"

      Alternatively, simply change the value of an existing file osgi configuration file while also removing the type markers.

      Actual result: After the configurations are processed, the properties within the file are reformatted to invalid syntax where spaces are added and quotes are removed. Example:

      active = true
      connectionId = test
      networkHostAddresses = [ \
        "http://localhost:9202", \
        ]
      

      I verified that this is happening for other osgi config files as well. This can lead to issues when Portal is restarted since the properties can't be read properly. For example with the config file used above, errors are thrown on startup and the connection that was present in Portal before shut down would no longer be available.

      Note: This is not reproducible if the type markers are present. However, in our customer documentation it's communicated that these markers are for informational purposes only and shouldn't be required for proper deployment.

      Reproducible on:
      Portal master git commit: 51b0c2844b2c29a02abfcdeb0fa2f02d3300f72f
      Portal 7.2.x git commit: 6cd777fe26cc1cc88240ae6a7194a6d32b41a5b5

      Not reproducible on:
      Portal 7.1.x git commit: c5fe0bfcf2e04d89e70c8fe2e8214cd5f7f65f85

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.X
                  7.1.X
                  7.2.X
                  Master