diff --git a/internal/dashboard/business/oceanbase/obcluster.go b/internal/dashboard/business/oceanbase/obcluster.go index 8d67678b..b22a1fd8 100644 --- a/internal/dashboard/business/oceanbase/obcluster.go +++ b/internal/dashboard/business/oceanbase/obcluster.go @@ -921,23 +921,15 @@ func ListOBClusterParameters(ctx context.Context, nn *param.K8sObjectIdentity) ( if err != nil { return nil, errors.Wrapf(err, "Get obcluster %s %s", nn.Namespace, nn.Name) } - observerList := v1alpha1.OBServerList{} - err = clients.ServerClient.List(ctx, nn.Namespace, &observerList, metav1.ListOptions{ - LabelSelector: fmt.Sprintf("%s=%s", oceanbaseconst.LabelRefOBCluster, nn.Name), - }) - if err != nil { - logger.WithError(err).Error("Failed to list observers") - return nil, errors.Wrap(err, "List observers") - } conn, err := utils.GetOBConnection(ctx, obcluster, "root", "sys", obcluster.Spec.UserSecrets.Root) if err != nil { - logger.Info("Failed to get OceanBase database connection") - return nil, errors.Wrap(err, "Get OceanBase database connection") + logger.WithError(err).Info("Failed to get OceanBase database connection") + return nil, nil } parameters, err := conn.ListClusterParameters(ctx) if err != nil { logger.WithError(err).Error("Failed to query parameters") - return nil, errors.Wrap(err, "Query parameters") + return nil, errors.New("Failed to list obcluster parameters") } return parameters, nil } diff --git a/pkg/oceanbase-sdk/const/sql/parameter.go b/pkg/oceanbase-sdk/const/sql/parameter.go index 6a062839..d3295d17 100644 --- a/pkg/oceanbase-sdk/const/sql/parameter.go +++ b/pkg/oceanbase-sdk/const/sql/parameter.go @@ -20,7 +20,7 @@ const ( ) const ( - ListParametersWithTenantID = "select name, value, data_type, info, section, edit_level, scope from GV$OB_PARAMETERS where tenant_id = ?" + ListParametersWithTenantID = "select name, value, IFNULL(data_type, 'unknown') as data_type, info, section, edit_level, scope from GV$OB_PARAMETERS where tenant_id = ?" SelectCompatibleOfTenants = "select name, value, tenant_id from GV$OB_PARAMETERS where name = 'compatible'" - ListParametersGroupByName = "select name, value, data_type, info, section, edit_level, scope, svr_ip, zone, svr_port, IFNULL(tenant_id, 0) as tenant_id from GV$OB_PARAMETERS group by name" + ListParametersGroupByName = "select name, value, IFNULL(data_type, 'unknown') as data_type, info, section, edit_level, scope, svr_ip, zone, svr_port, IFNULL(tenant_id, 0) as tenant_id from GV$OB_PARAMETERS group by name" )