Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-3019

[Docs] Manual Database Migration steps don't work when migrating sso72-to-sso-cd-db-migrate-job.yaml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • SSO73 1.0.0.GA
    • SSO73 1.0.0.GA
    • RH-SSO, SSO
    • None
    • Documentation (Ref Guide, User Guide, etc.), Migration, User Experience
    • Hide

      1. Attempt to perform manual db migration betwen RH-SSO 7.2 to RH-SSO 7.3 TP CD images, as described in the Manual Database Migration section of the RH-SSO 7.3 TP CD documentation (see proposed patch for KEYCLOAK-8234 for updated documentation, which allows this).

      Show
      1. Attempt to perform manual db migration betwen RH-SSO 7.2 to RH-SSO 7.3 TP CD images, as described in the Manual Database Migration section of the RH-SSO 7.3 TP CD documentation (see proposed patch for KEYCLOAK-8234 for updated documentation, which allows this).

      The:

      oc rsync sso72-to-sso-cd-db-migrate-job-b87bb:/opt/eap/keycloak-database-update.sql ./db-update
      

      step from Manual Database Migration section will not succeed when manually migrating the database from RH-SSO 7.2 to RH-SSO 7.3 TP CD* version, due to the necessary sso72-to-sso-cd-db-migrate-job not being running properly. Here's the exception:

      ...
      15:50:15,383 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "keycloak-server.war")]) - failure description: {
          "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./auth" => "java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
          Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
          Caused by: java.lang.RuntimeException: hostname not set"},
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"keycloak-server.war\".component.\"org.keycloak.services.filters.KeycloakSessionServletFilter\".START"],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"keycloak-server.war\".deploymentCompleteService is missing [jboss.deployment.unit.\"keycloak-server.war\".component.\"org.keycloak.services.filters.KeycloakSessionServletFilter\".START]"]
      }
      ...
      

      Resolution:
      This is because standalone-openshift.xml for RH-SSO 7.3 TP CD expects / requires hostname-spi definition. And sso-manual-db-migration example from the https://github.com/jboss-openshift/openshift-examples_ repository (which is used to produce the image for the job), updates _standalone-openshift.xml via custom configuration, rather than by calling respective JBoss CLI commands to achieve:

       Set following configuration options in the standalone-openshift.xml file:
      
          initializeEmpty=false,
          migrationStrategy=manual, and
          migrationExport to the location on the file system of the pod, where the output SQL migration file should be stored (e.g. migrationExport="${jboss.home.dir}/keycloak-database-update.sql"). 
      

      state. The sso-manual-db-migration_ example from the _https://github.com/jboss-openshift/openshift-examples_ repository needs to be updated.

              rhn-jlieskov Ján Lieskovský (Inactive)
              rhn-jlieskov Ján Lieskovský (Inactive)
              Peter Zaoral Peter Zaoral (Inactive)
              Matthew Helmke (Inactive), Pavel Drobek (Inactive), Pavel Drozd, Peter Zaoral (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: