From: avanthakkar Date: Wed, 16 Aug 2023 10:55:41 +0000 (+0530) Subject: mgr/dashboard: support cluster upgrade even if the check for upgrade fails X-Git-Tag: v19.0.0~663^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=014421ea16f7888ca311ef0abaee9dd2379dde8c;p=ceph-ci.git mgr/dashboard: support cluster upgrade even if the check for upgrade fails Fixes: https://tracker.ceph.com/issues/62457 Signed-off-by: avanthakkar --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.html index 27b7bc2e816..aa8ab7e0ba1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.html @@ -14,7 +14,8 @@ spacingClass="mb-3" *ngIf="showImageField" i18n>Make sure to put the correct image. Passing an incorrect image can lead the cluster into an undesired state. -
+
-
+
+ *ngIf="showImageField || !versions"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.ts index 6ea38bfc323..8622fe9f091 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.ts @@ -44,6 +44,13 @@ export class UpgradeStartModalComponent implements OnInit { useImage: new FormControl(false), customImageName: new FormControl(null) }); + if (this.versions === undefined) { + const availableVersionsControl = this.upgradeForm.get('availableVersions'); + availableVersionsControl.clearValidators(); + const customImageNameControl = this.upgradeForm.get('customImageName'); + customImageNameControl.setValidators(Validators.required); + customImageNameControl.updateValueAndValidity(); + } } startUpgrade() { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html index e5252cbe4df..e45157455bf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html @@ -157,6 +157,9 @@ class="text-success"> Cluster is up-to-date + Upgrade using custom image... @@ -197,6 +200,9 @@ {{ errorMessage }} + Upgrade using custom image...