Skip to content

instance upgrade does not apply startup resources from the new Quickstart JAR #355

Description

@royteeuwen

Summary

aem instance upgrade unpacks a new Quickstart distribution, but the subsequent normal aem instance start launches the unpacked JAR under crx-quickstart/app.

For AEM 6.5 LTS service-pack upgrades, this does not apply all startup-resource updates from the new Quickstart distribution.

Reproduction

  1. Create and start an AEM 6.6.2 instance through AEMC.
  2. Replace the configured Quickstart JAR with AEM 6.6.3.
  3. Stop the instance.
  4. Run:
aem instance upgrade
aem instance start

Actual Result

AEMC unpacks the 6.6.3 distribution, then the normal start script launches:

crx-quickstart/app/cq-quickstart-6.6.3-standalone-quickstart.jar

The prior startup resource remains active:

crx-quickstart/launchpad/startup/1/com.adobe.granite.crypto-3.5.10.jar

AEM 6.6.3 upgrades com.adobe.granite.crypto.keystore to 4.0.24, but it remains Installed because it requires the package exported by Granite Crypto 3.5.40.

This causes a broad OSGi dependency cascade, including com.day.cq.cq-replication.

Expected Result

During an upgrade, AEMC should start the external new Quickstart JAR once, instead of only starting the unpacked app JAR:

java -jar <new-quickstart-jar> -nofork -nointeractive \
  -r <run-modes> -p <port>

After this bootstrap start has completed, AEMC can stop it. The caller can then use the ordinary aem instance start lifecycle.

Verified Result

With that external-JAR bootstrap:

com.adobe.granite.crypto           3.5.40  Active
com.adobe.granite.crypto.keystore  4.0.24  Active
com.day.cq.cq-replication          6.2.86  Active
org.apache.commons.commons-io      2.21.0  Active

All bundles become stable.

Adobe Reference

Adobe explicitly states that starting through the normal start script does not start the upgrade:

https://experienceleague.adobe.com/en/docs/experience-manager-65-lts/content/implementing/deploying/upgrading/in-place-upgrade#determining-the-correct-upgrade-start-command:~:text=start%20script%20will%20not%20start%20the%20upgrade

Sling Properties

Adobe's preparation instructions also say to back up and delete:

crx-quickstart/conf/sling.properties

before unpacking the new Quickstart JAR.

AEMC currently manages custom Sling properties itself. We need a design decision on whether instance upgrade should:

  1. Back up/remove and regenerate sling.properties as part of the upgrade command.
  2. Leave this preparation step to the caller/orchestration layer before invoking instance upgrade.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions