diff --git a/pkg/operator/ceph/cluster/mgr/dashboard.go b/pkg/operator/ceph/cluster/mgr/dashboard.go index 1281f08cc..003b73e67 100755 --- a/pkg/operator/ceph/cluster/mgr/dashboard.go +++ b/pkg/operator/ceph/cluster/mgr/dashboard.go @@ -176,7 +176,7 @@ func (c *Cluster) initializeSecureDashboard() (bool, error) { return false, errors.Wrap(err, "failed to set login credentials for the ceph dashboard") } - return true, nil + return false, nil } func (c *Cluster) createSelfSignedCert() (bool, error) { diff --git a/pkg/operator/ceph/cluster/mgr/dashboard_test.go b/pkg/operator/ceph/cluster/mgr/dashboard_test.go index 6085cfcb6..f0718c589 100644 --- a/pkg/operator/ceph/cluster/mgr/dashboard_test.go +++ b/pkg/operator/ceph/cluster/mgr/dashboard_test.go @@ -131,10 +131,9 @@ func TestStartSecureDashboard(t *testing.T) { assert.NoError(t, err) err = c.configureDashboardModules() assert.NoError(t, err) - // the dashboard is enabled, then disabled and enabled again to restart - // it with the cert, and another restart when setting the dashboard port - assert.Equal(t, 2, enables) - assert.Equal(t, 1, disables) + // the dashboard is enabled once with the new dashboard and modules + assert.Equal(t, 1, enables) + assert.Equal(t, 0, disables) assert.Equal(t, 2, moduleRetries) svc, err := c.context.Clientset.CoreV1().Services(clusterInfo.Namespace).Get(ctx, "rook-ceph-mgr-dashboard", metav1.GetOptions{}) @@ -147,8 +146,8 @@ func TestStartSecureDashboard(t *testing.T) { assert.Nil(t, err) err = c.configureDashboardModules() assert.NoError(t, err) - assert.Equal(t, 2, enables) - assert.Equal(t, 2, disables) + assert.Equal(t, 1, enables) + assert.Equal(t, 1, disables) svc, err = c.context.Clientset.CoreV1().Services(clusterInfo.Namespace).Get(ctx, "rook-ceph-mgr-dashboard", metav1.GetOptions{}) assert.NotNil(t, err)