Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 38 additions & 1 deletion image/cli/mascli/functions/must_gather
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ---------------------------------------------------------------------------
Expand All @@ -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

Expand All @@ -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
Expand Down
7 changes: 3 additions & 4 deletions image/cli/mascli/must-gather/mg-collect-aiservice
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions image/cli/mascli/must-gather/mg-summary-aiservice
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions image/cli/mascli/must-gather/mg-summary-opendatahub
Original file line number Diff line number Diff line change
@@ -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
13 changes: 12 additions & 1 deletion python/src/mas/cli/upgrade/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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
Expand Down
Loading