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

[minor] Add manage onlineUpgrade cronjob #238

Merged
merged 19 commits into from
Dec 6, 2024
Merged

[minor] Add manage onlineUpgrade cronjob #238

merged 19 commits into from
Dec 6, 2024

Conversation

whitfiea
Copy link
Contributor

@whitfiea whitfiea commented Dec 5, 2024

https://jsw.ibm.com/browse/MASCORE-4544

Adds a new cronjob that can be set to a schedule (defaults to midnight every night), that will run and check if there is an offline update pending for Manage. This is only used when the manage ws spec has settings.db.upgrade.upgradeType set to onlineUpgrade.

If there is no pending update then the job exits doing nothing. If there is one pending then it patches the ManageOfflineUpgradeRequest resource with the stage requested. this will then cause the Manage workspace operator to bring down the serverbundles and update them. It will also remove the status from the ManageOfflineUpgradeRequest as this was causing problems with the manage operator when it was trying to detect what needs to happen. If the status is not present then it doesn't try to remove it.

See also PR ibm-mas/cli#1391

Tested with the default schedule and a provided schedule, and the cronjob is created/recreated in both cases:

image- 2024-12-05 at 10 56 21@2x

image- 2024-12-05 at 10 56 08@2x

When the job does run this is the output:
image- 2024-12-05 at 09 54 16@2x

image- 2024-12-06 at 17 01 07@2x

Also tested:

  • regularUpgrade set - no cronjob created
  • onlineuprgrate cronjob called when status exists and pending update - status removed and update triggered
  • onlineuprgrate cronjob called when status exists and no pending update - no-op
  • onlineuprgrate cronjob called when no status exists and pending update - update triggered

tomklapiscak
tomklapiscak previously approved these changes Dec 5, 2024
@whitfiea whitfiea marked this pull request as draft December 5, 2024 14:16
@whitfiea whitfiea marked this pull request as ready for review December 6, 2024 17:05
@whitfiea whitfiea requested a review from tomklapiscak December 6, 2024 17:06
@whitfiea whitfiea merged commit 0273040 into main Dec 6, 2024
2 checks passed
@whitfiea whitfiea deleted the ajw-mascore4544 branch December 6, 2024 17:47
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