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

Upgrading a instance with external datastore fails in MigrateExternalDataStoreUpgradeStep

    XMLWordPrintable

    Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.5.3
    • None
    • core, upgrade
    • May need for 6.5.x that upgraded to 6.5.3 previously
    • Rank:
      1|i04ame:

      Description

      Bug description

      When updating a AM from 6.5.2.3 with an Global external datatstore (defined in secondary configuration) but say not used. The upgraded instance have "null:null" in the connection string

      How to reproduce the issue

      1. Install 6.5.2.x
      2. Create a Global external dataStore with a few connection string
      3. Now upgrade to 6.5.3
      4. Inspect the configuration after the upgrade and see there is a null:null string
      5. The directory setting show
      6. Now if you have to install using 6.5.x snaphot, this will fail
      7. If this is done, one may see in amUpgrade
        amUpgrade:04/09/2021 01:12:58:409 PM UTC: Thread[http-nio-0.0.0.0-8080-exec-1,5,main]: TransactionId[1547c3e8-18d5-4c67-b47c-bb6f1289182c-3652]
        ERROR: AddConnectionUrlStep: an error prevented upgrade completing
        SMSException Exception Code:3
        Message:The LDAP operation failed.
        --------------------------------------------------
        The lower level exception message
        Attribute or Value Exists: Attribute or value already exists.
        The lower level exception:
        Attribute or Value Exists: Attribute or value already exists.
                at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:241)
                at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:143)
                at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:112)
                at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:70)
                at com.sun.identity.sm.SMSEntry.addAttribute(SMSEntry.java:414)
                at com.sun.identity.sm.SMSUtils.addAttribute(SMSUtils.java:427)
                at com.sun.identity.sm.ServiceConfig.addAttribute(ServiceConfig.java:549)
                at org.forgerock.openam.upgrade.steps.datastore.MigrateExternalDataStoreConnectionUrlStep.perform(MigrateExternalDataStoreConnectionUrlStep.java:114)
                at org.forgerock.openam.upgrade.UpgradeServices.upgrade(UpgradeServices.java:152)
                at com.sun.identity.config.upgrade.Upgrade.doUpgrade(Upgrade.java:70)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)
                at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)
                at org.apache.click.control.AbstractControl$1.onAction(AbstractControl.java:228)
                at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)
                at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)
                at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)
                at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)
                at org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)
                at org.apache.click.ClickServlet.processPage(ClickServlet.java:559)
                at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
                at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        
      Expected behaviour
      Not bad connection string an not later update issue
      
      Current behaviour
      null:null with illegal entry in config store may cause upgrade issues 
      

      Work around

      Check external configuration store and cleanup bad entries.

      Code analysis

      Trying the same 6.5.2.3->7.0.1 the issue is not see.So direct upgrade to 7 does not have the bad entry and also AM7 does not do this upgrade sequence.

       

      It is probably that OPENAM-16817 is in affect preventing a bad upgrade. so this may mean we will need OPENAM-16817to avoid the intial corruption causing issue.

        Attachments

          Activity

            People

            Unassigned Unassigned
            chee-weng.chea C-Weng C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: