Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5757

Remove tenant data from the demo data set

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: framework
    • Labels:
    • Sprint:
      Bug Crush Event - 21/2/2015

      Description

      The demo data set (in location /framework/entity/data/TenantDemoData.xml) contains elements to load the tenants DEMO1 and DEMO2 into the implemented OFBiz setup.

      This data set is intended to be loaded into the master tables when a user wants to explore multity tenancy. However, when a user also wants/needs to load demo data into the tenant DEMO1 or DEMO2 OFBiz also tries to upload the demo setup data for each tenant. This is not allowed as tenants do not have access to tables:

      1. Tenant
      2. Tenantdatasource
      3. etc

        Issue Links

          Activity

          Hide
          pfm.smits Pierre Smits added a comment -

          With

          ./ant create-tenant
          

          and

          ./ant load-tenant-data-readers
          

          I believe we provide ample tools to explore the opportunity to demonstrate the multi-tenancy aspects of OFBiz.

          Show
          pfm.smits Pierre Smits added a comment - With ./ant create-tenant and ./ant load-tenant-data-readers I believe we provide ample tools to explore the opportunity to demonstrate the multi-tenancy aspects of OFBiz.
          Hide
          pfm.smits Pierre Smits added a comment -

          This patch will fix the issue.
          It removes the TenantDemoData.xml file and the reference to it in ofbiz-component.xml. Both are of the entity comppnent.

          Show
          pfm.smits Pierre Smits added a comment - This patch will fix the issue. It removes the TenantDemoData.xml file and the reference to it in ofbiz-component.xml. Both are of the entity comppnent.
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Instead of removing demo data we can assign different reader for tenant demo data file like tennant-demo or any other logical name.

          Show
          deepak.dixit Deepak Dixit added a comment - Instead of removing demo data we can assign different reader for tenant demo data file like tennant-demo or any other logical name.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Deepak,

          I recently tried to use
          ant load-tenant
          and the result were not as expected

          Pierre says that
          ./ant create-tenant
          and
          ./ant load-tenant-data-readers
          are enough and I tend to agree due to this experience. The tenant targets are too much and confusing. So I'd like to remove all main tenant targets (those documented) but those 2.

          Pierre, I wonder about the work done for OFBIZ-3971, still valid right? But then should we keep load-tenant-admin-user-login as a main tenant target?

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Deepak, I recently tried to use ant load-tenant and the result were not as expected Pierre says that ./ant create-tenant and ./ant load-tenant-data-readers are enough and I tend to agree due to this experience. The tenant targets are too much and confusing. So I'd like to remove all main tenant targets (those documented) but those 2. Pierre, I wonder about the work done for OFBIZ-3971 , still valid right? But then should we keep load-tenant-admin-user-login as a main tenant target?
          Hide
          pfm.smits Pierre Smits added a comment -

          Jacques,

          What/which validity are you questioning? I am confused...

          Show
          pfm.smits Pierre Smits added a comment - Jacques, What/which validity are you questioning? I am confused...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I simply want to know if we should keep the work done for OFBIZ-3971. It seems still valid to me. But then can load-tenant-admin-user-login still be used independently (after create-tenant I guess)? Else we should hide its description (it would not be a main target, only a called one) to not confused users.

          Show
          jacques.le.roux Jacques Le Roux added a comment - I simply want to know if we should keep the work done for OFBIZ-3971 . It seems still valid to me. But then can load-tenant-admin-user-login still be used independently (after create-tenant I guess)? Else we should hide its description (it would not be a main target, only a called one) to not confused users.
          Hide
          pfm.smits Pierre Smits added a comment -

          This issue is not about questioning the work done in OFBIZ-3971, nor whether load-tenant-admin-user-login could/should be used independently.

          This issue is about removing superfluous demo data. The work done in OFBIZ-3971 enables users to create tenants and load data into a tenant setup (including the creation of a tenant-admin and its initial password), regardless whether that is for evaluating the multi-tenancy aspect of OFBiz or in a production environment.

          Show
          pfm.smits Pierre Smits added a comment - This issue is not about questioning the work done in OFBIZ-3971 , nor whether load-tenant-admin-user-login could/should be used independently. This issue is about removing superfluous demo data. The work done in OFBIZ-3971 enables users to create tenants and load data into a tenant setup (including the creation of a tenant-admin and its initial password), regardless whether that is for evaluating the multi-tenancy aspect of OFBiz or in a production environment.
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          Yes, but you also says

          With
          ./ant create-tenant
          and
          ./ant load-tenant-data-readers
          I believe we provide ample tools to explore the opportunity to demonstrate the multi-tenancy aspects of OFBiz.

          This seems to imply that we no longer need
          ant load-tenant

          And I'd agree with that, because currently it's no longer working as I explained above with the link.

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited Yes, but you also says With ./ant create-tenant and ./ant load-tenant-data-readers I believe we provide ample tools to explore the opportunity to demonstrate the multi-tenancy aspects of OFBiz. This seems to imply that we no longer need ant load-tenant And I'd agree with that, because currently it's no longer working as I explained above with the link.
          Hide
          pfm.smits Pierre Smits added a comment -

          You have just validated your own conclusion/finding.

          Show
          pfm.smits Pierre Smits added a comment - You have just validated your own conclusion/finding.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Initially it was a question, you asked me to elaborate: "should we keep load-tenant-admin-user-login as a main tenant target?" In other words, can it still be used alone. For instance after create-tenant?

          Same question for
          load-all-tenants
          load-demo-multitenant
          load-tenant
          all that is confusing and from my experience, at least load-tenant and load-tenant-admin-user-login used in sequence, are no longer working.

          In other words are, as you suggested,
          create-tenant
          load-tenant-data-readers
          not enough?

          Show
          jacques.le.roux Jacques Le Roux added a comment - Initially it was a question, you asked me to elaborate: "should we keep load-tenant-admin-user-login as a main tenant target?" In other words, can it still be used alone. For instance after create-tenant? Same question for load-all-tenants load-demo-multitenant load-tenant all that is confusing and from my experience, at least load-tenant and load-tenant-admin-user-login used in sequence, are no longer working. In other words are, as you suggested, create-tenant load-tenant-data-readers not enough?
          Hide
          pfm.smits Pierre Smits added a comment -

          See my comment from 09/Sep/14 08:10. .

          ./ant load-tenant-admin-user-login is used as part of ./ant create-tenant, and as such it is needed. Like load-admin-user-login is used by ./ant create-admin-user-login.

          I have never used any of the other ./ant targets in relation to tenant admin activities. If I were the only user of multi-tenancy capabilities I would say these others are not needed.

          Show
          pfm.smits Pierre Smits added a comment - See my comment from 09/Sep/14 08:10. . ./ant load-tenant-admin-user-login is used as part of ./ant create-tenant, and as such it is needed. Like load-admin-user-login is used by ./ant create-admin-user-login. I have never used any of the other ./ant targets in relation to tenant admin activities. If I were the only user of multi-tenancy capabilities I would say these others are not needed.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks Pierre,

          >./ant load-tenant-admin-user-login is used as part of ./ant create-tenant, and as such it is needed.

          Yes I know that. I just want to say that if it should not be used as a main target but only called by another target, then there should not be a description, it's confusing!

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks Pierre, >./ant load-tenant-admin-user-login is used as part of ./ant create-tenant, and as such it is needed. Yes I know that. I just want to say that if it should not be used as a main target but only called by another target, then there should not be a description, it's confusing!
          Hide
          pfm.smits Pierre Smits added a comment -

          I agree. Avoid confusion.

          Show
          pfm.smits Pierre Smits added a comment - I agree. Avoid confusion.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Pierre before committing your patch, I'd like to know what's your take on https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support notably the "Loading Tenant." section

          Show
          jacques.le.roux Jacques Le Roux added a comment - Pierre before committing your patch, I'd like to know what's your take on https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support notably the "Loading Tenant." section
          Hide
          pfm.smits Pierre Smits added a comment - - edited

          I will create a new issue for that: OFBIZ-6720

          Show
          pfm.smits Pierre Smits added a comment - - edited I will create a new issue for that: OFBIZ-6720
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks Pierre,

          Your patch is in trunk at revision: 1714085

          With OFBIZ-6720 we will see if we should not remove old ant tenant related targets now useless.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks Pierre, Your patch is in trunk at revision: 1714085 With OFBIZ-6720 we will see if we should not remove old ant tenant related targets now useless.

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              pfm.smits Pierre Smits
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Agile