Uploaded image for project: 'Data Collection, Analytics, and Events'
  1. Data Collection, Analytics, and Events
  2. DCAEGEN2-3077

DCAE Bootstrap fails to add blueprints to the inventory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Honolulu Release, Istanbul Release
    • dcae-platform
    • I managed to reproduce this issue on Honolulu and Istanbul version. I didn't have a chance to verify it for the master branch.

      We have observed, that since 1 January 2022 onap-dcae-bootstrap pod fails to add default blueprints to the inventory. During the execution of bootstrap.sh script, that in turn calls the inventory.sh script, the following error is returned: 

      {"code":400,"message":"Unable to process JSON"}
      

      One can verify with DCAE Dashboard, that no blueprints are available in the inventory.

      We found the culprit: typeVersion field in the JSON, that is created in create_service_type method in  inventory.sh script has the dynamically created version number:

      $(date +%y%m%d%I%M)
      

      Unfortunately, content of this field seems to be parsed to an integer. Since the New Year the generated values are greater than 2201010000, which in turn is greater than max integer value for Java (2147483647).

      The workaround to add the blueprints to the inventory is pretty simple: it is enough to change format of the created typeVersion value to something like $(date +%y%m%d%I). This works in the development environment. However I believe that the fix should be approached with some caution. There are two options

      1. one can simply change the proper variables to long type (across the entire DCAE)
      2. one can change versioning schema and either start numbering version from a value of 1 or migrate to "version as 'String'" approach or maybe even a semantic versioning; I am mentioning this, because I am not a huge fan of assigning a version number based on date of instance creation (that is kind of a generalization of the problem) - with current approach the same blueprints are getting increasing version numbers, which is really misleading when reinstalling (recreating) DCAE

      I am not sure which approach is better and I am leaving it open for the discussion.

            vv770d vv770d
            mzawadzki mzawadzki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: