Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-3450

CLI.SH configimport does not work with the --replaceAll option

    Details

    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      OpenIDM Sprint 50, OpenIDM Sprint 57

      Description

      User Documentation explains expected behavior of replaceAll as:
      "If you include the --replaceAll parameter, the command wipes out the existing configuration and replaces it with the configuration in the import-location. Objects in the existing configuration that are not present in the import-location are deleted."
      See: http://openidm.forgerock.org/doc/bootstrap/integrators-guide/index.html#cli-configimport

      The actual behavior is that the missing files are not deleted and we get an error from cli.sh:
      No existing configuration found for ui%2Fconfiguration, can not delete the configuration."
      [Update] the encoding issue has been resolved, but additional issues remain with the consistency of IDM after this use-case is ran.

      Steps to reproduce:
      1) start OpenIDM with a tmp folder that contains all the conf files but one

        $ unzip openidm.zip
        $ cp -r conf tmp
        $ rm tmp/ui-configuration.json
        $ ./startup.sh
      

      2) launch the config import with replaceAll option:

        
      $ ./cli.sh configimport -u openidm-admin:openidm-admin --replaceAll tmp
      Executing ./cli.sh...
      Starting shell in /Users/laurent/Installs/openidm
      Using boot properties at /Users/laurent/Installs/openidm/conf/boot/boot.properties
      ...................................................................
      [ConfigImport] Load JSON configuration files from:
      [ConfigImport] 	/Users/laurent/Installs/openidm/tmp
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/Users/laurent/Installs/openidm/bundle/custom-scripted-connector-bundler-3.2.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/Users/laurent/Installs/openidm/bundle/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/Users/laurent/Installs/openidm/bundle/slf4j-simple-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      [ConfigImport] endpoint/siteIdentification ................. SUCCESS
      [ConfigImport] info/login .................................. SUCCESS
      [ConfigImport] endpoint/openam ............................. SUCCESS
      [ConfigImport] endpoint/getprocessesforuser ................ SUCCESS
      [ConfigImport] info/ping ................................... SUCCESS
      [ConfigImport] endpoint/jqgrid ............................. SUCCESS
      [ConfigImport] ui.context/enduser .......................... SUCCESS
      [ConfigImport] endpoint/getavailableuserstoassign .......... SUCCESS
      [ConfigImport] servletfilter/gzip .......................... SUCCESS
      [ConfigImport] ui/secquestions ............................. SUCCESS
      [ConfigImport] ui/themeconfig .............................. SUCCESS
      [ConfigImport] scheduler ................................... SUCCESS
      [ConfigImport] info/version ................................ SUCCESS
      [ConfigImport] endpoint/reconResults ....................... SUCCESS
      [ConfigImport] ui.context/admin ............................ SUCCESS
      [ConfigImport] ui/countries ................................ SUCCESS
      [ConfigImport] servletfilter/cors .......................... SUCCESS
      [ConfigImport] audit ....................................... SUCCESS
      [ConfigImport] endpoint/usernotifications .................. SUCCESS
      [ConfigImport] script ...................................... SUCCESS
      [ConfigImport] workflow .................................... SUCCESS
      [ConfigImport] endpoint/gettasksview ....................... SUCCESS
      [ConfigImport] endpoint/linkedView ......................... SUCCESS
      [ConfigImport] managed ..................................... SUCCESS
      [ConfigImport] endpoint/securityQA ......................... SUCCESS
      [ConfigImport] endpoint/oauthproxy ......................... SUCCESS
      [ConfigImport] router ...................................... SUCCESS
      [ConfigImport] authentication .............................. SUCCESS
      [ConfigImport] process/access .............................. SUCCESS
      [ConfigImport] cluster ..................................... SUCCESS
      [ConfigImport] policy ...................................... SUCCESS
      [ConfigImport] endpoint/mappingDetails ..................... SUCCESS
      [ConfigImport] repo.orientdb ............................... SUCCESS
      [ConfigDelete] ui/configuration ............................ FAILED
      	[Not Found {"code":404,"reason":"Not Found","message":"No existing configuration found for ui%2Fconfiguration, can not delete the configuration."}]
      

      Note: I can not say when this bug was introduced. The automated tests was a bit buggy (always was brittle for some reasons anyway) so the regression slipped through the net at some point.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brmiller Brendan Miller
                Reporter:
                laurent.bristiel Laurent Bristiel [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: