Details

      Description

      Steps to Reproduce - 6.2
      1. Setup 6.2 cluster (running on localhost:8080 and localhost:9080 - patch level: portal-128
      2. Add Portal Instance from Control Panel (ie. virtual host: test) on node1
      3. Navigate to Control Panel > User > Roles and click on 'Power user' then on 'Define permission tab'
      Checkpoint: you can see the list to default set permission provided to power user role
      4. Now login as test user in test:9080 (node2)
      5. Navigate to Control Panel > User > Roles and click on 'Power user' then on 'Define permission' tab
      Result: empty page is shown apart from the menu bar on the left


      PortalInstances is a "psuedo" cache of Company information. It is used, for example, by PortalUtil to return configured companies or the default one.

      In a cluster environment when you add or remove a company from a node, in the other nodes PortalInstances is not updated.

      I've configured a cluster with two nodes and two company (on the left node1 on the right node2). In the homepage a custom portlet will show:

      • output of PortalUtil.getCompanyIds
      • output of CompanyLocalServiceUtil.getCompanies()

      On node1 I've added a new instance

      New company is visible on PortalInstances on node1

      But when I refresh homepage on node2:

      • CompanyLocalServiceUtil has the new company
      • PortalInstances doesn't have the new company

      Database is up-to-date. PortalInstances is out of sync.
      All the code running on node2 using PortalInstances or PortalUtil will never see the new company.

      For example if you install a plugin with a StartupAction on node2 this Startup is runned only on two companies

      13:20:44,335 INFO  [localhost-startStop-2][HookHotDeployListener:709] Registering hook for test_instances-portlet
      Loading file:/wos1/java/products/bundle625/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/temp/9-test_instances-portlet/WEB-INF/classes/portal.properties
      13:20:44,344 INFO  [localhost-startStop-2][TestStartupAction:21] Company 20155:liferay.com
      13:20:44,355 INFO  [localhost-startStop-2][TestStartupAction:21] Company 20535:test01.vm.local
      13:20:44,355 INFO  [localhost-startStop-2][HookHotDeployListener:851] Hook for test_instances-portlet is available for use
      13:20:44,357 INFO  [localhost-startStop-2][PortletHotDeployListener:344] Registering portlets for test_instances-portlet
      13:20:44,451 INFO  [localhost-startStop-2][PortletHotDeployListener:492] 1 portlet for test_instances-portlet is available for use
      
      

      The things will go worst when you remove a company

        Attachments

        1. cluster01.png
          cluster01.png
          46 kB
        2. cluster02.png
          cluster02.png
          25 kB
        3. cluster03.png
          cluster03.png
          74 kB
        4. cluster04.png
          cluster04.png
          47 kB
        5. cluster05.png
          cluster05.png
          77 kB
        6. Reproduced.png
          Reproduced.png
          46 kB
        7. test_instances-portlet.zip
          47 kB

          Issue Links

            Activity

              People

              • Assignee:
                linda.sui Linda Sui
                Reporter:
                maumar Mauro Mariuzzo
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 5 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP14
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  Master