Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up previous embedded installation before extracting upgrade #827

Merged
merged 7 commits into from
May 28, 2024

Conversation

labkey-tchad
Copy link
Member

@labkey-tchad labkey-tchad commented May 23, 2024

Rationale

Issue 50481: Upgrades from 24.3 to 24.4/24.5 need manual cleanup first, otherwise org.labkey.bootstrap.ConfigException

The backup step we used to perform before attempting to self-deploy also served as a method of clearing the way for the new installation. Removing the backup step broke the upgrade process (making the upgrade require manual cleanup of the existing install).

org.labkey.bootstrap.ConfigException: Delete or backup existing LabKey deployment at: /usr/local/labkey/labkey/labkeywebapp
                at org.labkey.embedded.EmbeddedExtractor.extractDistributionZip(EmbeddedExtractor.java:255) ~[!/:24.5.0]
                at org.labkey.embedded.EmbeddedExtractor.extractExecutableJar(EmbeddedExtractor.java:187) ~[!/:24.5.0]
                at org.labkey.embedded.EmbeddedExtractor.extractDistribution(EmbeddedExtractor.java:165) ~[!/:24.5.0]
                at org.labkey.embedded.LabKeyTomcatServletWebServerFactory.getTomcatWebServer(LabKeyTomcatServletWebServerFactory.java:78) ~[!/:24.5.0]

I'm also adding validation of the contents of the distribution.zip to ensure we are backing up everything we should ( currently just the modules and labkeywebapp directories). This check should fail on TeamCity before a change to distribution structure could ever cause problems in the wild.

Related Pull Requests

Changes

  • Create a temporary backup while unzipping the LabKey distribution
  • Add validation of distribution.zip contents (modules and labkeywebapp)

@labkey-tchad labkey-tchad merged commit decac8b into develop May 28, 2024
1 of 4 checks passed
@labkey-tchad labkey-tchad deleted the fb_embeddedUpgradeFix branch May 28, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants