Skip to content
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
989577c
[patch] test odh-rhoai migration
Divyesh-Khokhar Mar 7, 2026
b5b4067
[patch] rebuild
Divyesh-Khokhar Mar 9, 2026
9fb6b9f
[patch] test changes
Divyesh-Khokhar Mar 10, 2026
af57a91
Update README.md
Divyesh-Khokhar Mar 10, 2026
d8d3c36
[patch] add odh to rhoai migration in mas-update
Divyesh-Khokhar Mar 19, 2026
17684e7
Merge remote-tracking branch 'origin/master' into climigr
Divyesh-Khokhar Mar 25, 2026
4db2380
[patch] finalize changes
Divyesh-Khokhar Mar 25, 2026
43e425a
[patch]
Divyesh-Khokhar Mar 25, 2026
e235961
[patch] add param to check if migration needed
Divyesh-Khokhar Mar 26, 2026
9221501
[patch] fix build failures
Divyesh-Khokhar Mar 26, 2026
69e7034
[patch] Finalize changes
Divyesh-Khokhar Mar 26, 2026
aeea089
Merge branch 'master' into migr
Divyesh-Khokhar Mar 27, 2026
5314eea
Merge branch 'master' into migr
Divyesh-Khokhar Mar 30, 2026
c27a132
Merge branch 'master' into migr
Divyesh-Khokhar Apr 1, 2026
2db57eb
[patch] update role for migration
Divyesh-Khokhar Apr 2, 2026
49ef241
[patch] add detection for odh to display notice
Divyesh-Khokhar Apr 3, 2026
ad0a97f
[patch] fix failure
Divyesh-Khokhar Apr 3, 2026
448c1a7
Merge remote-tracking branch 'origin/master' into migrupgrd
Divyesh-Khokhar Apr 3, 2026
f371c8a
Merge remote-tracking branch 'origin/master' into migrupgrd
Divyesh-Khokhar Apr 13, 2026
b41948d
[patch] cleanup
Divyesh-Khokhar Apr 13, 2026
a4f7da4
Merge branch 'master' into migrupgrd
Divyesh-Khokhar Apr 15, 2026
53942ba
Merge branch 'master' into migrupgrd
Divyesh-Khokhar Apr 16, 2026
41414a5
Merge branch 'master' into migrupgrd
Divyesh-Khokhar Apr 17, 2026
878bc9d
Merge branch 'master' into migrupgrd
Divyesh-Khokhar Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions python/src/mas/cli/aiservice/upgrade/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def upgrade(self, argv):
self.fatalError(f"No upgrade available, {aiserviceInstanceId} is are already on the latest release {currentAiserviceChannel}")
nextAiserviceChannel = self.upgrade_path[currentAiserviceChannel]

# Detect ODH and notify user about migration
odhDetected = self.detectODH()

if not self.licenseAccepted and not self.devMode:
self.printH1("License Terms")
self.printDescription([
Expand All @@ -103,6 +106,9 @@ def upgrade(self, argv):
print_formatted_text(HTML(f"<LightSlateGrey>Current AI Service Channel ............. {currentAiserviceChannel}</LightSlateGrey>"))
print_formatted_text(HTML(f"<LightSlateGrey>Next AI Service Channel ................ {nextAiserviceChannel}</LightSlateGrey>"))
print_formatted_text(HTML(f"<LightSlateGrey>Skip Pre-Upgrade Checks ......... {self.skipPreCheck}</LightSlateGrey>"))
print()
print_formatted_text(HTML("<LightSlateGrey><u>Required Migrations</u></LightSlateGrey>"))
print_formatted_text(HTML(f"<LightSlateGrey>AI Service Data Science Platform ........ {'Migrate from ODH to RHOAI' if odhDetected else 'No action required'}</LightSlateGrey>"))

if not self.noConfirm:
print()
Expand Down Expand Up @@ -136,4 +142,43 @@ def upgrade(self, argv):
print_formatted_text(HTML(f"\nView progress:\n <Cyan><u>{pipelineURL}</u></Cyan>\n"))
else:
h.stop_and_persist(symbol=self.failureIcon, text=f"Failed to submit PipelineRun for {aiserviceInstanceId} upgrade, see log file for details")

def detectODH(self) -> bool:
"""
Detect if ODH (Open Data Hub) is installed and may need migration to RHOAI.
This is a simplified check - the Ansible role will perform detailed validation.
"""
with Halo(text='Checking for Open Data Hub (ODH)', spinner=self.spinner) as h:
try:
subscriptionAPI = self.dynamicClient.resources.get(api_version="operators.coreos.com/v1alpha1", kind="Subscription")
subscriptions = subscriptionAPI.get(namespace="openshift-operators").to_dict()["items"]

odh_installed = any(
sub.get("spec", {}).get("name") == "opendatahub-operator"
for sub in subscriptions
)

if odh_installed:
h.stop_and_persist(symbol=self.successIcon, text="Open Data Hub detected - migration to RHOAI will be performed")
print()
self.printDescription([
"<u>Required Migration Notice</u>",
"Open Data Hub (ODH) is currently installed and will be migrated to Red Hat OpenShift AI (RHOAI)",
"- The upgrade process will automatically handle the migration",
"- ODH will be replaced with RHOAI",
"- This migration is mandatory to continue receiving updates",
"",
"<u>Expected Downtime</u>",
"- AI Service will be unavailable during migration (~10-12 minutes)",
"- Data science workloads will be temporarily interrupted",
"- Deployed models will be preserved"
])
print()
return True
else:
h.stop_and_persist(symbol=self.successIcon, text="Open Data Hub is not installed")
return False

except ResourceNotFoundError:
h.stop_and_persist(symbol=self.successIcon, text="Open Data Hub is not installed")
return False
Loading