From 014421ea16f7888ca311ef0abaee9dd2379dde8c Mon Sep 17 00:00:00 2001 From: avanthakkar Date: Wed, 16 Aug 2023 16:25:41 +0530 Subject: [PATCH] mgr/dashboard: support cluster upgrade even if the check for upgrade fails Fixes: https://tracker.ceph.com/issues/62457 Signed-off-by: avanthakkar --- .../upgrade-form/upgrade-start-modal.component.html | 8 +++++--- .../upgrade/upgrade-form/upgrade-start-modal.component.ts | 7 +++++++ .../src/app/ceph/cluster/upgrade/upgrade.component.html | 6 ++++++ 3 files changed, 18 insertions(+), 3 deletions(-) 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 27b7bc2e8169c..aa8ab7e0ba1f2 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 6ea38bfc323a1..8622fe9f0915a 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 e5252cbe4df7f..e45157455bfe9 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...