You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Wim Symons <Wi...@VRT.BE> on 2020/09/01 14:04:19 UTC

Re: Re-install all sling:OsiConfig after runmode switch

Hi all,

Just back from yearly holidays. But I've seen no response on this topic.

Carsten, could you please express your thoughts on this issue?

Should I create a JIRA ticket to better track this issue?

Kind regards and hope to hear from you soon.

Wim

Op 7/08/2020 09:34 heeft Wim Symons <Wi...@VRT.BE> geschreven:

    Hi Carsten, hi all,

    I've been sifting through all the logs, especially the logs on the standby instance.

    This came out:

    31.07.2020 09:29:43.115 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Active run modes: [standby, s7connect, crx3, nosamplecontent, author, crx3tar]
    ...
    31.07.2020 09:29:43.375 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi Installer Service started.
    31.07.2020 09:29:43.379 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Merged Resources={
    ...
    - Merged RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
        RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
    ...
    - Compacted RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
        RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
    ...
    31.07.2020 09:29:54.521 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl cleanupInstallableResources returns false
    31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl No more tasks to process, suspending listener and going idle
    31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl onEvent(SUSPENDED).
    31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl wait() on resourcesLock

    So it seems the OsgiInstallerImpl doesn't take the run mode into account for the items on the persistentList.
    Items for a non-matching run-mode should be removed from that list.
    I guess this should be done in the mergeNewlyRegisteredResources method.

    For example in this case, the RegisteredResource with url jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent should be removed from the list as the run mode
    for which it is meant (author + primary) doesn't match the run mode we have active in the system (author + standby).

    What are your thoughts?

    Should the OsgiInstallerImpl be made SlingSettings aware?

    Hoping to hear from you soon.

    Kind regards

    Wim

    P.S. I'm on my yearly holiday as of tomorrow until September, 1st.


    -- Disclaimer --
    Vlaamse Radio- en Televisieomroeporganisatie
    Auguste Reyerslaan 52
    1043 Brussel

    nv van publiek recht
    BTW BE 0244.142.664
    RPR Brussel
    VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>



-- Disclaimer --
Vlaamse Radio- en Televisieomroeporganisatie
Auguste Reyerslaan 52
1043 Brussel

nv van publiek recht
BTW BE 0244.142.664
RPR Brussel
VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>


Re: Re-install all sling:OsiConfig after runmode switch

Posted by Wim Symons <Wi...@VRT.BE>.
Hey Carsten,

That makes sense.
Thank you very much for all your input.

I can wrap this up now. :-)

Kind regards

Wim

Op 2/09/2020 14:26 heeft Carsten Ziegeler <cz...@apache.org> geschreven:

    Hi Wim,

    ok I guess that makes sense (that the standby does not have the
    repository). That means it also makes sense that the JcrInstaller is not
    active - because there is no JCR.

    But that also means that you can't switch between run mode related
    configurations stored in the repository - again as there is no
    repository for standby :)

    So the solution is that you store the configurations for the standby and
    primary run mode in the file system; in the crx-quickstart/install
    folder (crx-quickstart/install/install.primary and
    crx-quickstart/install/install.standby). Then switching will do the
    right thing as the file system is always there.

    Regards
    Carsten


    Am 02.09.2020 um 10:35 schrieb Wim Symons:
    > Hi Carsten,
    >
    > I investigated a little further based on your information.
    >
    > It appears the JCR Installer is NOT active because 2 DS references are unsatisfied:
    >
    > - repository (org.apache.sling.jcr.api.SlingRepository)
    > - serviceUserMapped (org.apache.sling.serviceusermapping.ServiceUserMapped)
    >
    > This is normal as in standby mode the repository isn't available.
    >
    > So the JcrInstaller can not be responsible for removing OSGi config for a specific runmode when AEM runs in standby mode.
    >
    > So should these 2 references be made optional and does the OSGi installer provide enough methods so the JcrInstaller can act upon it and remove OSGi config not needed for the given runmodes?
    >
    > Kind regards
    >
    > Wim
    >
    > Op 2/09/2020 07:15 heeft Carsten Ziegeler <cz...@apache.org> geschreven:
    >
    >      Hi Wim,
    >
    >      welcome back - sorry, I somehow missed your update.
    >
    >      It seems that in your case the JcrInstaller is not starting - usually
    >      what should happen is that the JcrInstaller starts and reports all known
    >      resources to the OSGiInstaller - the JcrInstaller is run mode aware, so
    >      it would only report resources matching the new run modes and the
    >      OSGiInstaller would then remove the non matching ones as they are not
    >      reported again by the JcrInstaller.
    >      As this is not happening, the JcrInstaller does not seem to start.
    >      The OSGiInstaller is a dumb component which just does what it gets told.
    >      So all the run mode handling etc happens outside of the OSGiInstaller in
    >      the plugins
    >
    >      Regards
    >      Carsten
    >
    >      Am 01.09.2020 um 16:04 schrieb Wim Symons:
    >      > Hi all,
    >      >
    >      > Just back from yearly holidays. But I've seen no response on this topic.
    >      >
    >      > Carsten, could you please express your thoughts on this issue?
    >      >
    >      > Should I create a JIRA ticket to better track this issue?
    >      >
    >      > Kind regards and hope to hear from you soon.
    >      >
    >      > Wim
    >      >
    >      > Op 7/08/2020 09:34 heeft Wim Symons <Wi...@VRT.BE> geschreven:
    >      >
    >      >      Hi Carsten, hi all,
    >      >
    >      >      I've been sifting through all the logs, especially the logs on the standby instance.
    >      >
    >      >      This came out:
    >      >
    >      >      31.07.2020 09:29:43.115 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Active run modes: [standby, s7connect, crx3, nosamplecontent, author, crx3tar]
    >      >      ...
    >      >      31.07.2020 09:29:43.375 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi Installer Service started.
    >      >      31.07.2020 09:29:43.379 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Merged Resources={
    >      >      ...
    >      >      - Merged RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
    >      >          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
    >      >      ...
    >      >      - Compacted RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
    >      >          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
    >      >      ...
    >      >      31.07.2020 09:29:54.521 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl cleanupInstallableResources returns false
    >      >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl No more tasks to process, suspending listener and going idle
    >      >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl onEvent(SUSPENDED).
    >      >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl wait() on resourcesLock
    >      >
    >      >      So it seems the OsgiInstallerImpl doesn't take the run mode into account for the items on the persistentList.
    >      >      Items for a non-matching run-mode should be removed from that list.
    >      >      I guess this should be done in the mergeNewlyRegisteredResources method.
    >      >
    >      >      For example in this case, the RegisteredResource with url jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent should be removed from the list as the run mode
    >      >      for which it is meant (author + primary) doesn't match the run mode we have active in the system (author + standby).
    >      >
    >      >      What are your thoughts?
    >      >
    >      >      Should the OsgiInstallerImpl be made SlingSettings aware?
    >      >
    >      >      Hoping to hear from you soon.
    >      >
    >      >      Kind regards
    >      >
    >      >      Wim
    >      >
    >      >      P.S. I'm on my yearly holiday as of tomorrow until September, 1st.
    >      >
    >      >
    >      >      -- Disclaimer --
    >      >      Vlaamse Radio- en Televisieomroeporganisatie
    >      >      Auguste Reyerslaan 52
    >      >      1043 Brussel
    >      >
    >      >      nv van publiek recht
    >      >      BTW BE 0244.142.664
    >      >      RPR Brussel
    >      >      VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
    >      >
    >      >
    >      >
    >      > -- Disclaimer --
    >      > Vlaamse Radio- en Televisieomroeporganisatie
    >      > Auguste Reyerslaan 52
    >      > 1043 Brussel
    >      >
    >      > nv van publiek recht
    >      > BTW BE 0244.142.664
    >      > RPR Brussel
    >      > VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
    >      >
    >
    >      --
    >      --
    >      Carsten Ziegeler
    >      Adobe Research Switzerland
    >      cziegeler@apache.org
    >
    >
    > -- Disclaimer --
    > Vlaamse Radio- en Televisieomroeporganisatie
    > Auguste Reyerslaan 52
    > 1043 Brussel
    >
    > nv van publiek recht
    > BTW BE 0244.142.664
    > RPR Brussel
    > VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
    >

    --
    --
    Carsten Ziegeler
    Adobe Research Switzerland
    cziegeler@apache.org


-- Disclaimer --
Vlaamse Radio- en Televisieomroeporganisatie
Auguste Reyerslaan 52
1043 Brussel

nv van publiek recht
BTW BE 0244.142.664
RPR Brussel
VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>


Re: Re-install all sling:OsiConfig after runmode switch

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Wim,

ok I guess that makes sense (that the standby does not have the 
repository). That means it also makes sense that the JcrInstaller is not 
active - because there is no JCR.

But that also means that you can't switch between run mode related 
configurations stored in the repository - again as there is no 
repository for standby :)

So the solution is that you store the configurations for the standby and 
primary run mode in the file system; in the crx-quickstart/install 
folder (crx-quickstart/install/install.primary and 
crx-quickstart/install/install.standby). Then switching will do the 
right thing as the file system is always there.

Regards
Carsten


Am 02.09.2020 um 10:35 schrieb Wim Symons:
> Hi Carsten,
> 
> I investigated a little further based on your information.
> 
> It appears the JCR Installer is NOT active because 2 DS references are unsatisfied:
> 
> - repository (org.apache.sling.jcr.api.SlingRepository)
> - serviceUserMapped (org.apache.sling.serviceusermapping.ServiceUserMapped)
> 
> This is normal as in standby mode the repository isn't available.
> 
> So the JcrInstaller can not be responsible for removing OSGi config for a specific runmode when AEM runs in standby mode.
> 
> So should these 2 references be made optional and does the OSGi installer provide enough methods so the JcrInstaller can act upon it and remove OSGi config not needed for the given runmodes?
> 
> Kind regards
> 
> Wim
> 
> Op 2/09/2020 07:15 heeft Carsten Ziegeler <cz...@apache.org> geschreven:
> 
>      Hi Wim,
> 
>      welcome back - sorry, I somehow missed your update.
> 
>      It seems that in your case the JcrInstaller is not starting - usually
>      what should happen is that the JcrInstaller starts and reports all known
>      resources to the OSGiInstaller - the JcrInstaller is run mode aware, so
>      it would only report resources matching the new run modes and the
>      OSGiInstaller would then remove the non matching ones as they are not
>      reported again by the JcrInstaller.
>      As this is not happening, the JcrInstaller does not seem to start.
>      The OSGiInstaller is a dumb component which just does what it gets told.
>      So all the run mode handling etc happens outside of the OSGiInstaller in
>      the plugins
> 
>      Regards
>      Carsten
> 
>      Am 01.09.2020 um 16:04 schrieb Wim Symons:
>      > Hi all,
>      >
>      > Just back from yearly holidays. But I've seen no response on this topic.
>      >
>      > Carsten, could you please express your thoughts on this issue?
>      >
>      > Should I create a JIRA ticket to better track this issue?
>      >
>      > Kind regards and hope to hear from you soon.
>      >
>      > Wim
>      >
>      > Op 7/08/2020 09:34 heeft Wim Symons <Wi...@VRT.BE> geschreven:
>      >
>      >      Hi Carsten, hi all,
>      >
>      >      I've been sifting through all the logs, especially the logs on the standby instance.
>      >
>      >      This came out:
>      >
>      >      31.07.2020 09:29:43.115 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Active run modes: [standby, s7connect, crx3, nosamplecontent, author, crx3tar]
>      >      ...
>      >      31.07.2020 09:29:43.375 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi Installer Service started.
>      >      31.07.2020 09:29:43.379 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Merged Resources={
>      >      ...
>      >      - Merged RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
>      >          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
>      >      ...
>      >      - Compacted RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
>      >          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
>      >      ...
>      >      31.07.2020 09:29:54.521 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl cleanupInstallableResources returns false
>      >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl No more tasks to process, suspending listener and going idle
>      >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl onEvent(SUSPENDED).
>      >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl wait() on resourcesLock
>      >
>      >      So it seems the OsgiInstallerImpl doesn't take the run mode into account for the items on the persistentList.
>      >      Items for a non-matching run-mode should be removed from that list.
>      >      I guess this should be done in the mergeNewlyRegisteredResources method.
>      >
>      >      For example in this case, the RegisteredResource with url jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent should be removed from the list as the run mode
>      >      for which it is meant (author + primary) doesn't match the run mode we have active in the system (author + standby).
>      >
>      >      What are your thoughts?
>      >
>      >      Should the OsgiInstallerImpl be made SlingSettings aware?
>      >
>      >      Hoping to hear from you soon.
>      >
>      >      Kind regards
>      >
>      >      Wim
>      >
>      >      P.S. I'm on my yearly holiday as of tomorrow until September, 1st.
>      >
>      >
>      >      -- Disclaimer --
>      >      Vlaamse Radio- en Televisieomroeporganisatie
>      >      Auguste Reyerslaan 52
>      >      1043 Brussel
>      >
>      >      nv van publiek recht
>      >      BTW BE 0244.142.664
>      >      RPR Brussel
>      >      VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
>      >
>      >
>      >
>      > -- Disclaimer --
>      > Vlaamse Radio- en Televisieomroeporganisatie
>      > Auguste Reyerslaan 52
>      > 1043 Brussel
>      >
>      > nv van publiek recht
>      > BTW BE 0244.142.664
>      > RPR Brussel
>      > VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
>      >
> 
>      --
>      --
>      Carsten Ziegeler
>      Adobe Research Switzerland
>      cziegeler@apache.org
> 
> 
> -- Disclaimer --
> Vlaamse Radio- en Televisieomroeporganisatie
> Auguste Reyerslaan 52
> 1043 Brussel
> 
> nv van publiek recht
> BTW BE 0244.142.664
> RPR Brussel
> VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
> 

-- 
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Re-install all sling:OsiConfig after runmode switch

Posted by Wim Symons <Wi...@VRT.BE>.
Hi Carsten,

I investigated a little further based on your information.

It appears the JCR Installer is NOT active because 2 DS references are unsatisfied:

- repository (org.apache.sling.jcr.api.SlingRepository)
- serviceUserMapped (org.apache.sling.serviceusermapping.ServiceUserMapped)

This is normal as in standby mode the repository isn't available.

So the JcrInstaller can not be responsible for removing OSGi config for a specific runmode when AEM runs in standby mode.

So should these 2 references be made optional and does the OSGi installer provide enough methods so the JcrInstaller can act upon it and remove OSGi config not needed for the given runmodes?

Kind regards

Wim

Op 2/09/2020 07:15 heeft Carsten Ziegeler <cz...@apache.org> geschreven:

    Hi Wim,

    welcome back - sorry, I somehow missed your update.

    It seems that in your case the JcrInstaller is not starting - usually
    what should happen is that the JcrInstaller starts and reports all known
    resources to the OSGiInstaller - the JcrInstaller is run mode aware, so
    it would only report resources matching the new run modes and the
    OSGiInstaller would then remove the non matching ones as they are not
    reported again by the JcrInstaller.
    As this is not happening, the JcrInstaller does not seem to start.
    The OSGiInstaller is a dumb component which just does what it gets told.
    So all the run mode handling etc happens outside of the OSGiInstaller in
    the plugins

    Regards
    Carsten

    Am 01.09.2020 um 16:04 schrieb Wim Symons:
    > Hi all,
    >
    > Just back from yearly holidays. But I've seen no response on this topic.
    >
    > Carsten, could you please express your thoughts on this issue?
    >
    > Should I create a JIRA ticket to better track this issue?
    >
    > Kind regards and hope to hear from you soon.
    >
    > Wim
    >
    > Op 7/08/2020 09:34 heeft Wim Symons <Wi...@VRT.BE> geschreven:
    >
    >      Hi Carsten, hi all,
    >
    >      I've been sifting through all the logs, especially the logs on the standby instance.
    >
    >      This came out:
    >
    >      31.07.2020 09:29:43.115 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Active run modes: [standby, s7connect, crx3, nosamplecontent, author, crx3tar]
    >      ...
    >      31.07.2020 09:29:43.375 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi Installer Service started.
    >      31.07.2020 09:29:43.379 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Merged Resources={
    >      ...
    >      - Merged RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
    >          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
    >      ...
    >      - Compacted RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
    >          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
    >      ...
    >      31.07.2020 09:29:54.521 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl cleanupInstallableResources returns false
    >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl No more tasks to process, suspending listener and going idle
    >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl onEvent(SUSPENDED).
    >      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl wait() on resourcesLock
    >
    >      So it seems the OsgiInstallerImpl doesn't take the run mode into account for the items on the persistentList.
    >      Items for a non-matching run-mode should be removed from that list.
    >      I guess this should be done in the mergeNewlyRegisteredResources method.
    >
    >      For example in this case, the RegisteredResource with url jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent should be removed from the list as the run mode
    >      for which it is meant (author + primary) doesn't match the run mode we have active in the system (author + standby).
    >
    >      What are your thoughts?
    >
    >      Should the OsgiInstallerImpl be made SlingSettings aware?
    >
    >      Hoping to hear from you soon.
    >
    >      Kind regards
    >
    >      Wim
    >
    >      P.S. I'm on my yearly holiday as of tomorrow until September, 1st.
    >
    >
    >      -- Disclaimer --
    >      Vlaamse Radio- en Televisieomroeporganisatie
    >      Auguste Reyerslaan 52
    >      1043 Brussel
    >
    >      nv van publiek recht
    >      BTW BE 0244.142.664
    >      RPR Brussel
    >      VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
    >
    >
    >
    > -- Disclaimer --
    > Vlaamse Radio- en Televisieomroeporganisatie
    > Auguste Reyerslaan 52
    > 1043 Brussel
    >
    > nv van publiek recht
    > BTW BE 0244.142.664
    > RPR Brussel
    > VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
    >

    --
    --
    Carsten Ziegeler
    Adobe Research Switzerland
    cziegeler@apache.org


-- Disclaimer --
Vlaamse Radio- en Televisieomroeporganisatie
Auguste Reyerslaan 52
1043 Brussel

nv van publiek recht
BTW BE 0244.142.664
RPR Brussel
VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>


Re: Re-install all sling:OsiConfig after runmode switch

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Wim,

welcome back - sorry, I somehow missed your update.

It seems that in your case the JcrInstaller is not starting - usually 
what should happen is that the JcrInstaller starts and reports all known 
resources to the OSGiInstaller - the JcrInstaller is run mode aware, so 
it would only report resources matching the new run modes and the 
OSGiInstaller would then remove the non matching ones as they are not 
reported again by the JcrInstaller.
As this is not happening, the JcrInstaller does not seem to start.
The OSGiInstaller is a dumb component which just does what it gets told. 
So all the run mode handling etc happens outside of the OSGiInstaller in 
the plugins

Regards
Carsten

Am 01.09.2020 um 16:04 schrieb Wim Symons:
> Hi all,
> 
> Just back from yearly holidays. But I've seen no response on this topic.
> 
> Carsten, could you please express your thoughts on this issue?
> 
> Should I create a JIRA ticket to better track this issue?
> 
> Kind regards and hope to hear from you soon.
> 
> Wim
> 
> Op 7/08/2020 09:34 heeft Wim Symons <Wi...@VRT.BE> geschreven:
> 
>      Hi Carsten, hi all,
> 
>      I've been sifting through all the logs, especially the logs on the standby instance.
> 
>      This came out:
> 
>      31.07.2020 09:29:43.115 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Active run modes: [standby, s7connect, crx3, nosamplecontent, author, crx3tar]
>      ...
>      31.07.2020 09:29:43.375 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi Installer Service started.
>      31.07.2020 09:29:43.379 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Merged Resources={
>      ...
>      - Merged RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
>          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
>      ...
>      - Compacted RegisteredResource config:be.vrt.aem.example.OnlyPrimaryComponent
>          RegisteredResource.info=[TaskResource(url=jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent, entity=config:be.vrt.aem.example.OnlyPrimaryComponent, state=INSTALLED, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:28:, service.pid=be.vrt.aem.example.OnlyPrimaryComponent], digest=27ba19805d52e788ce7ee21d6f82137c)]
>      ...
>      31.07.2020 09:29:54.521 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl cleanupInstallableResources returns false
>      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl No more tasks to process, suspending listener and going idle
>      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl onEvent(SUSPENDED).
>      31.07.2020 09:29:54.522 *DEBUG* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl wait() on resourcesLock
> 
>      So it seems the OsgiInstallerImpl doesn't take the run mode into account for the items on the persistentList.
>      Items for a non-matching run-mode should be removed from that list.
>      I guess this should be done in the mergeNewlyRegisteredResources method.
> 
>      For example in this case, the RegisteredResource with url jcrinstall:/apps/vrt-example/runmodes/config.author.primary/be.vrt.aem.example.OnlyPrimaryComponent should be removed from the list as the run mode
>      for which it is meant (author + primary) doesn't match the run mode we have active in the system (author + standby).
> 
>      What are your thoughts?
> 
>      Should the OsgiInstallerImpl be made SlingSettings aware?
> 
>      Hoping to hear from you soon.
> 
>      Kind regards
> 
>      Wim
> 
>      P.S. I'm on my yearly holiday as of tomorrow until September, 1st.
> 
> 
>      -- Disclaimer --
>      Vlaamse Radio- en Televisieomroeporganisatie
>      Auguste Reyerslaan 52
>      1043 Brussel
> 
>      nv van publiek recht
>      BTW BE 0244.142.664
>      RPR Brussel
>      VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
> 
> 
> 
> -- Disclaimer --
> Vlaamse Radio- en Televisieomroeporganisatie
> Auguste Reyerslaan 52
> 1043 Brussel
> 
> nv van publiek recht
> BTW BE 0244.142.664
> RPR Brussel
> VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
> 

-- 
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org