diff --git a/image/cli/mascli/functions/must_gather b/image/cli/mascli/functions/must_gather index 18a113ee6ea..a89bfb49dec 100644 --- a/image/cli/mascli/functions/must_gather +++ b/image/cli/mascli/functions/must_gather @@ -432,6 +432,27 @@ function mustgather() { done + # --------------------------------------------------------------------------- + # AI Service Dependencies + # --------------------------------------------------------------------------- + echo_h2 "In-Cluster AI Service Dependencies" + if [[ "$DEPENDENCY_REPORT" == "true" ]]; then + startTimer + + echo_h3 "Open Data Hub" + ODH_NAMESPACE_LOOKUP=$(oc get namespace opendatahub --ignore-not-found) + if [[ "$ODH_NAMESPACE_LOOKUP" != "" ]]; then + $MG_SCRIPT_DIR/mg-summary-opendatahub &> ${OUTPUT_DIR}/opendatahub.txt + genericMustGather opendatahub Auth,DataScienceCluster,DataSciencePipelines,DataSciencePipelinesApplication,DSCInitialization,Kserve,ModelController + else + echo_highlight "Unable to find namespace for opendatahub" + fi + + endTimer "in-cluster AI Service dependencies" + else + echo_warning "Maximo AI Service dependency must-gather disabled" + fi + # --------------------------------------------------------------------------- # AI Service Must-Gather # --------------------------------------------------------------------------- @@ -457,6 +478,22 @@ function mustgather() { genericMustGather $AISERVICE_NAMESPACE pipelinerun # Including model training logs fi + + + AISERVICE_PIPELINE_NAMESPACE=aiservice-${AISERVICE_INSTANCE_ID}-pipelines + NAMESPACE_LOOKUP=$(oc get namespace $AISERVICE_PIPELINE_NAMESPACE --ignore-not-found) + + if [[ "$NAMESPACE_LOOKUP" != "" ]]; then + echo_h3 "Namespace: ${AISERVICE_PIPELINE_NAMESPACE}" + echo + + # Reuse script from mas + $MG_SCRIPT_DIR/mg-summary-mas-pipelines $AISERVICE_PIPELINE_NAMESPACE &> ${OUTPUT_DIR}/${AISERVICE_PIPELINE_NAMESPACE}.txt + $MG_SCRIPT_DIR/mg-collect-mas-pipelines $AISERVICE_PIPELINE_NAMESPACE $OUTPUT_DIR + + genericMustGather $AISERVICE_PIPELINE_NAMESPACE + fi + endTimer "${AISERVICE_INSTANCE_ID}" done @@ -480,7 +517,7 @@ function mustgather() { echo_h3 "Namespace: ${AISERVICE_TENANT_ID}" echo - genericMustGather $AISERVICE_TENANT_ID + genericMustGather $AISERVICE_TENANT_ID InferenceService fi endTimer "${AISERVICE_TENANT_ID}" done diff --git a/image/cli/mascli/must-gather/mg-collect-aiservice b/image/cli/mascli/must-gather/mg-collect-aiservice index d2ace39f622..dcc1214f947 100644 --- a/image/cli/mascli/must-gather/mg-collect-aiservice +++ b/image/cli/mascli/must-gather/mg-collect-aiservice @@ -12,10 +12,9 @@ OUTPUT_DIR=$2 echo_h4 "Collect Reconcile Logs" # Operators $DIR/mg-collect-reconcile-logs $NAMESPACE control-plane ibm-aiservice $OUTPUT_DIR -$DIR/mg-collect-reconcile-logs $NAMESPACE mas.ibm.com/applicationId aibroker $OUTPUT_DIR + # WS -$DIR/mg-collect-reconcile-logs $NAMESPACE mas.ibm.com/appType entitymgr-ws-operator $OUTPUT_DIR -# aibroker-api -$DIR/mg-collect-reconcile-logs $NAMESPACE app aibroker-api $OUTPUT_DIR +$DIR/mg-collect-reconcile-logs $NAMESPACE aiservice.ibm.com/appType entitymgr-tenant-operator $OUTPUT_DIR + #Truststore $DIR/mg-collect-reconcile-logs $NAMESPACE operator ibm-truststore-mgr $OUTPUT_DIR diff --git a/image/cli/mascli/must-gather/mg-summary-aiservice b/image/cli/mascli/must-gather/mg-summary-aiservice index 748f5635d74..79ff6cd0a82 100644 --- a/image/cli/mascli/must-gather/mg-summary-aiservice +++ b/image/cli/mascli/must-gather/mg-summary-aiservice @@ -1,13 +1,13 @@ #!/bin/bash -echo "IBM Maximo Application Suite - Aibroker Application" +echo "IBM Maximo AI Service Application" echo "--------------------------------------------------------------------------------" -oc get aibrokerapp -n $1 +oc get aiserviceapp -n $1 echo "" -echo "IBM Maximo Application Suite - Aibroker Workspace Configuration" +echo "IBM Maximo AI Service - AI Service Tenant Configuration" echo "--------------------------------------------------------------------------------" -oc get aibrokerworkspace -n $1 +oc get aiservicetenant -n $1 echo "" exit 0 \ No newline at end of file diff --git a/image/cli/mascli/must-gather/mg-summary-opendatahub b/image/cli/mascli/must-gather/mg-summary-opendatahub new file mode 100644 index 00000000000..94611490e7e --- /dev/null +++ b/image/cli/mascli/must-gather/mg-summary-opendatahub @@ -0,0 +1,45 @@ +#!/bin/bash + +echo "Open Data Hub - Auth" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get Auth +echo "" + +echo "" +echo "Open Data Hub - DataScienceCluster" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get DataScienceCluster +echo "" + +echo "" +echo "Open Data Hub - DataSciencePipelines" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get DataSciencePipelines +echo "" + +echo "" +echo "Open Data Hub - DataSciencePipelinesApplication" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get DataSciencePipelinesApplication +echo "" + +echo "" +echo "Open Data Hub - DSCInitialization" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get DSCInitialization +echo "" + +echo "" +echo "Open Data Hub - Kserve" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get Kserve +echo "" + +echo "" +echo "Open Data Hub - ModelController" +echo "--------------------------------------------------------------------------------" +oc -n opendatahub get ModelController +echo "" + + +exit 0 diff --git a/python/src/mas/cli/upgrade/app.py b/python/src/mas/cli/upgrade/app.py index d556c8c52d8..60fe1f1125b 100644 --- a/python/src/mas/cli/upgrade/app.py +++ b/python/src/mas/cli/upgrade/app.py @@ -23,7 +23,7 @@ from .settings import UpgradeSettingsMixin from mas.devops.ocp import createNamespace -from mas.devops.mas import listMasInstances, getMasChannel, getWorkspaceId, verifyAppInstance +from mas.devops.mas import listMasInstances, getMasChannel, getAppsSubscriptionChannel, getWorkspaceId, verifyAppInstance from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline logger = logging.getLogger(__name__) @@ -83,6 +83,17 @@ def upgrade(self, argv): if currentChannel not in self.upgrade_path: self.fatalError(f"No upgrade available, {instanceId} is are already on the latest release {currentChannel}") nextChannel = self.upgrade_path[currentChannel] + + # For the Feature Channels we do not allow upgrade when an installed app is not onboarded yet + if nextChannel in self.compatibilityMatrix: + if "feature" in nextChannel: + unsupportedAppForFC = [] + installedAppsChannel = getAppsSubscriptionChannel(self.dynamicClient, instanceId) + for installedApp in installedAppsChannel: + if installedApp["appId"] not in self.compatibilityMatrix[nextChannel]: + unsupportedAppForFC.append(installedApp["appId"]) + if len(unsupportedAppForFC) > 0: + self.fatalError(f"No feature channel available for {unsupportedAppForFC} on the release {nextChannel}. Upgrade cancelled.") else: # We still allow the upgrade to proceed even though we can't detect the MAS instance. The upgrade may be being # queued up to run after install for instance