Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-15551

Incorrect file order causes import of DataService configuration to fail in Amster CLI

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.5.2.1
    • Fix Version/s: None
    • Component/s: Amster, CLI
    • Labels:
    • Rank:
      1|hzz9a7:
    • Support Ticket IDs:

      Description

      When in DataStoreService.json another file is referenced as a dependency, Amster does not pick it up automatically. Subsequently, the order of imported files causes the error below: 

      user-data: [main] ERROR org.forgerock.amster.org.forgerock.openam.sdk.http.DefaultErrorHandler - Unhandled client error: [Status: 400 Bad Request]

      user-data: Failed to import /etc/am/configuration/global/DataStoreService.json

      user-data: ERROR org.forgerock.amster.org.forgerock.openam.sdk.http.ClientErrorException:

      user-data: 400 Bad Request: Data validation failed for the attribute, Application Data Store

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.http.DefaultErrorHandler.onClientError (DefaultErrorHandler.java:54)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.http.HttpSessionImpl.handleUnsuccessfulResponse (HttpSessionImpl.java:271)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.http.HttpSessionImpl.send (HttpSessionImpl.java:169)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.http.RequestBuilder.put (RequestBuilder.java:225)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.updateInstance (CrestResourceProviderAsync.java:192)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.update (CrestResourceProviderAsync.java:161)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.crest.HttpCrestResourceProvider.update (HttpCrestResourceProvider.java:162)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.operations.CrestOperations.update (CrestOperations.java:192)

      user-data: at org.forgerock.amster.org.forgerock.openam.sdk.operations.CrestOperations.update (CrestOperations.java:177)

      user-data: at org.forgerock.openam.amster.loadster.importer.GenericImporter.importEntity (GenericImporter.groovy:55)

      user-data: at org.forgerock.openam.amster.loadster.importer.GenericImporter.importFile (GenericImporter.groovy:33)

      user-data: at org.forgerock.openam.amster.loadster.importer.Importer.importFile (Importer.groovy:254)

      user-data: at org.forgerock.openam.amster.loadster.importer.Importer.access$0 (Importer.groovy)

      user-data: at org.forgerock.openam.amster.loadster.importer.Importer$_importGlobalEntities_closure3.doCall (Importer.groovy:135)

      user-data: at org.forgerock.openam.amster.loadster.importer.Importer.importGlobalEntities (Importer.groovy:132)

      user-data: at org.forgerock.openam.amster.loadster.importer.Importer.importDirectory (Importer.groovy:115)

      user-data: at org.forgerock.openam.amster.loadster.importer.Importer.importEntities (Importer.groovy:106)

      user-data: at org.forgerock.openam.amster.commands.ImportCommand.execute (ImportCommand.groovy:55)

      user-data: at org.forgerock.openam.amster.Main$_addCommandLineWrapping_closure2.doCall (Main.groovy:92)

      user-data: at java_lang_Runnable$run.call (Unknown Source)

      A possible workaround is to name the import files to include a prefix like 01_DependencyFile.json, 02_DataStoreService.json and use a script to pick the prefix for the order of import. Also, two separate imports could be done - one full import apart from the dependant files and another with only DataStoreService.json. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              alex.belovski Alex Belovski
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated: