glassfish
  1. glassfish
  2. GLASSFISH-15576

admin gui upgrade failure when grizzly schema upgrade doesn't happen first

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b38
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      Solaris Sparc 10

      Description

      Tested latest promoted b37

      Performed an upgrade of V2.1.1. Cluster Profile to V3.1

      When clicking on admin GUI to list JDBC resources I see the following error snippet from server.log (attached all the server.log error portion as attachment)

      [#|2011-01-14T11:00:26.874-0500|WARNING|glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=30;_ThreadName=Thread-1;

      Internal Server error: /management/domain/resources/jdbc-resource/jdbc%2F__CallFlowPool
      java.io.CharConversionException: Encoded slashes are not allowed by default. To enable encodedslashes, set the property com.sun.griz
      zly.util.buf.UDecoder.ALLOW_ENCODED_SLASH to true.
      at com.sun.grizzly.util.buf.UDecoder.convert(UDecoder.java:151)
      at com.sun.grizzly.util.buf.UDecoder.convert(UDecoder.java:257)
      at com.sun.grizzly.util.buf.UDecoder.convert(UDecoder.java:235)
      at com.sun.grizzly.util.http.HttpRequestURIDecoder.decode(HttpRequestURIDecoder.java:98)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:185)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:818)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1008)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)
      #]

      [#|2011-01-14T11:00:26.877-0500|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=116;_Thread
      Name=Thread-1;|Unsupported Response Format: 'text/html'!|#]

      [#|2011-01-14T11:00:26.877-0500|SEVERE|glassfish3.1|org.glassfish.admingui|_ThreadID=23;_ThreadName=Thread-1;|RestResponse.getRespons
      e() gives FAILURE. endpoint = 'http://localhost:4848/management/domain/resources/jdbc-resource/jdbc%2F__CallFlowPool'; attrs = '{}'|
      #]

      1. patch0.diff
        2 kB
        Bobby Bissett
      2. server.log
        3 kB
        adf59

        Activity

        Hide
        Bobby Bissett added a comment -

        Whoo-hoo. This is fixed with a simple forcing of the ordering of modules performing upgrade tasks. I've attached a patch that fixes the issue, namely:

        1. Giving a service name to admin/config-api/src/main/java/org/glassfish/config/support/GrizzlyConfigSchemaMigrator
        2. Injecting that service into core/kernel/src/main/java/com/sun/enterprise/v3/admin/AdminRESTConfigUpgrade like this:

        @Inject(name="grizzlyconfigupgrade", optional=true)
        ConfigurationUpgrade precondition = null;

        That forces GrizzlyConfigSchemaMigrator#postConstruct to be run before AdminRESTConfigUpgrade#postConstruct is run. Thus the upgrade succeeds and the JDBC resource can be fetched properly by the admin console.

        Will run more tests now with this patch while sending info to change committee.

        Show
        Bobby Bissett added a comment - Whoo-hoo. This is fixed with a simple forcing of the ordering of modules performing upgrade tasks. I've attached a patch that fixes the issue, namely: 1. Giving a service name to admin/config-api/src/main/java/org/glassfish/config/support/GrizzlyConfigSchemaMigrator 2. Injecting that service into core/kernel/src/main/java/com/sun/enterprise/v3/admin/AdminRESTConfigUpgrade like this: @Inject(name="grizzlyconfigupgrade", optional=true) ConfigurationUpgrade precondition = null; That forces GrizzlyConfigSchemaMigrator#postConstruct to be run before AdminRESTConfigUpgrade#postConstruct is run. Thus the upgrade succeeds and the JDBC resource can be fetched properly by the admin console. Will run more tests now with this patch while sending info to change committee.
        Hide
        Bobby Bissett added a comment -

        How bad is its impact? (Severity)
        It's a regression. Without this, users can't access JDBC resources in admin GUI after an upgrade.

        How often does it happen? (Frequency)
        This issue is similar to GLASSFISH-15195. I suspect the issue will never happen in the workspace trunk, but will always happen in promoted builds. It all depends on the way hk2 orders components returned by Habitat#getInhabitants(). Given that, for a particular build the problem will either always happen or never happen.

        How much effort is required to fix it? (Cost)
        Done and done. Based on the work for GLASSFISH-15195, the fix was simply finding the right precondition and injecting that service into the admin rest upgrade service. Diff is attached.

        What is the risk of fixing it? (Risk)
        The fix was suggested by Jerome. I'm unaware of any risks unless people make more changes that could introduce a circular dependency.

        Does a work around for the issue exist? Can the workaround be reasonably employed by the end user?
        Um, if we could figure out why promoted builds are different from workspace builds, maybe there's a workaround. The changes I've suggested are a lot simpler though, and only affect the code that runs during upgrade (no changes during runtime).

        If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes?
        Big time. This would be a major problem for users, at least the users who use the admin console.

        Show
        Bobby Bissett added a comment - How bad is its impact? (Severity) It's a regression. Without this, users can't access JDBC resources in admin GUI after an upgrade. How often does it happen? (Frequency) This issue is similar to GLASSFISH-15195 . I suspect the issue will never happen in the workspace trunk, but will always happen in promoted builds. It all depends on the way hk2 orders components returned by Habitat#getInhabitants(). Given that, for a particular build the problem will either always happen or never happen. How much effort is required to fix it? (Cost) Done and done. Based on the work for GLASSFISH-15195 , the fix was simply finding the right precondition and injecting that service into the admin rest upgrade service. Diff is attached. What is the risk of fixing it? (Risk) The fix was suggested by Jerome. I'm unaware of any risks unless people make more changes that could introduce a circular dependency. Does a work around for the issue exist? Can the workaround be reasonably employed by the end user? Um, if we could figure out why promoted builds are different from workspace builds, maybe there's a workaround. The changes I've suggested are a lot simpler though, and only affect the code that runs during upgrade (no changes during runtime). If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes? Big time. This would be a major problem for users, at least the users who use the admin console.
        Hide
        Chris Kasso added a comment -

        Approved for 3.1

        Show
        Chris Kasso added a comment - Approved for 3.1
        Hide
        Bobby Bissett added a comment -

        Changing summary to the root issue.

        Show
        Bobby Bissett added a comment - Changing summary to the root issue.
        Hide
        Bobby Bissett added a comment -

        Fixed in revision 44560 with the patch attached to this issue.

        Show
        Bobby Bissett added a comment - Fixed in revision 44560 with the patch attached to this issue.

          People

          • Assignee:
            Bobby Bissett
            Reporter:
            adf59
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: