Skip to content

Commit

Permalink
Merge pull request #1211 from bipuladh/remove-single-pool
Browse files Browse the repository at this point in the history
Remove support for Single Replica pool from wizard flow
  • Loading branch information
openshift-merge-bot[bot] authored Feb 7, 2024
2 parents bbf25ab + 4ca8839 commit 8b0c003
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 81 deletions.
3 changes: 0 additions & 3 deletions locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,6 @@
"If not labeled, the selected nodes are labeled <2>{{label}}</2> to make them target hosts for Data Foundation's components.": "If not labeled, the selected nodes are labeled <2>{{label}}</2> to make them target hosts for Data Foundation's components.",
"Taint nodes": "Taint nodes",
"Selected nodes will be dedicated to Data Foundation use only": "Selected nodes will be dedicated to Data Foundation use only",
"Add replica-1 pool": "Add replica-1 pool",
"Enabling this feature creates a single replica pool without data replication, increasing the risk of data loss, data corruption, and potential system instability.": "Enabling this feature creates a single replica pool without data replication, increasing the risk of data loss, data corruption, and potential system instability.",
"Select capacity": "Select capacity",
"Select nodes": "Select nodes",
"Select at least 3 nodes preferably in 3 different zones. It is recommended to start with at least 14 CPUs and 34 GiB per node.": "Select at least 3 nodes preferably in 3 different zones. It is recommended to start with at least 14 CPUs and 34 GiB per node.",
Expand Down Expand Up @@ -773,7 +771,6 @@
"Zone: {{zoneCount, number}} zone_other": "Zone: {{zoneCount, number}} zones",
"Arbiter zone: {{zone}}": "Arbiter zone: {{zone}}",
"Taint nodes: {{ocsTaintsStatus}}": "Taint nodes: {{ocsTaintsStatus}}",
"Replica-1 pool: {{singleReplicaPoolStatus}}": "Replica-1 pool: {{singleReplicaPoolStatus}}",
"Security": "Security",
"Encryption: Enabled": "Encryption: Enabled",
"External key management service: {{kmsStatus}}": "External key management service: {{kmsStatus}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,40 +122,11 @@ type EnableTaintNodesProps = {
enableTaint: WizardState['capacityAndNodes']['enableTaint'];
};

const EnableSingleReplicaPool: React.FC<EnableSingleReplicaPoolProps> = ({
dispatch,
enableSingleReplicaPool: isSingleReplicaPoolEnabled,
}) => {
const { t } = useCustomTranslation();
return (
<Checkbox
label={t('Add replica-1 pool')}
description={t(
'Enabling this feature creates a single replica pool without data replication, increasing the risk of data loss, data corruption, and potential system instability.'
)}
id="single-replica-pool"
data-checked-state={isSingleReplicaPoolEnabled}
isChecked={isSingleReplicaPoolEnabled}
onChange={() =>
dispatch({
type: 'capacityAndNodes/enableSingleReplicaPool',
payload: !isSingleReplicaPoolEnabled,
})
}
/>
);
};
type EnableSingleReplicaPoolProps = {
dispatch: WizardDispatch;
enableSingleReplicaPool: WizardState['capacityAndNodes']['enableSingleReplicaPool'];
};

type SelectCapacityAndNodesProps = {
dispatch: WizardDispatch;
capacity: WizardState['capacityAndNodes']['capacity'];
nodes: WizardState['nodes'];
enableTaint: WizardState['capacityAndNodes']['enableTaint'];
enableSingleReplicaPool: WizardState['capacityAndNodes']['enableSingleReplicaPool'];
resourceProfile: WizardState['capacityAndNodes']['resourceProfile'];
systemNamespace: WizardState['backingStorage']['systemNamespace'];
};
Expand All @@ -165,7 +136,6 @@ const SelectCapacityAndNodes: React.FC<SelectCapacityAndNodesProps> = ({
capacity,
nodes,
enableTaint,
enableSingleReplicaPool,
resourceProfile,
systemNamespace,
}) => {
Expand Down Expand Up @@ -254,10 +224,6 @@ const SelectCapacityAndNodes: React.FC<SelectCapacityAndNodesProps> = ({
selectedNodes={nodes}
/>
<EnableTaintNodes dispatch={dispatch} enableTaint={enableTaint} />
<EnableSingleReplicaPool
dispatch={dispatch}
enableSingleReplicaPool={enableSingleReplicaPool}
/>
</>
);
};
Expand All @@ -270,7 +236,6 @@ const SelectedCapacityAndNodes: React.FC<SelectedCapacityAndNodesProps> = ({
arbiterLocation,
dispatch,
nodes,
enableSingleReplicaPool,
resourceProfile,
systemNamespace,
}) => {
Expand Down Expand Up @@ -430,10 +395,6 @@ const SelectedCapacityAndNodes: React.FC<SelectedCapacityAndNodesProps> = ({
selectedNodes={nodes}
/>
<EnableTaintNodes dispatch={dispatch} enableTaint={enableTaint} />
<EnableSingleReplicaPool
dispatch={dispatch}
enableSingleReplicaPool={enableSingleReplicaPool}
/>
</>
</ErrorHandler>
);
Expand All @@ -443,7 +404,6 @@ type SelectedCapacityAndNodesProps = {
capacity: WizardState['capacityAndNodes']['capacity'];
enableArbiter: WizardState['capacityAndNodes']['enableArbiter'];
enableTaint: WizardState['capacityAndNodes']['enableTaint'];
enableSingleReplicaPool: WizardState['capacityAndNodes']['enableSingleReplicaPool'];
storageClassName: string;
arbiterLocation: WizardState['capacityAndNodes']['arbiterLocation'];
dispatch: WizardDispatch;
Expand All @@ -465,7 +425,6 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
enableArbiter,
enableTaint,
arbiterLocation,
enableSingleReplicaPool,
resourceProfile,
} = state;

Expand All @@ -488,7 +447,6 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
dispatch={dispatch}
nodes={nodes}
capacity={capacity}
enableSingleReplicaPool={enableSingleReplicaPool}
resourceProfile={resourceProfile}
systemNamespace={systemNamespace}
/>
Expand All @@ -498,7 +456,6 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
enableTaint={enableTaint}
capacity={capacity}
nodes={nodes}
enableSingleReplicaPool={enableSingleReplicaPool}
resourceProfile={resourceProfile}
systemNamespace={systemNamespace}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,8 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({
nodes,
dataProtection,
} = state;
const {
capacity,
arbiterLocation,
enableTaint,
enableArbiter,
enableSingleReplicaPool,
} = capacityAndNodes;
const { capacity, arbiterLocation, enableTaint, enableArbiter } =
capacityAndNodes;
const { encryption, kms, networkType } = securityAndNetwork;
const {
deployment,
Expand Down Expand Up @@ -94,9 +89,6 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({

const encryptionStatus = hasEncryption ? t('Enabled') : t('Disabled');
const ocsTaintsStatus = enableTaint ? t('Enabled') : t('Disabled');
const singleReplicaPoolStatus = enableSingleReplicaPool
? t('Enabled')
: t('Disabled');
const nfsStatus = enableNFS ? t('Enabled') : t('Disabled');
const isCephRBDSetAsDefault = isRBDStorageClassDefault
? t('Enabled')
Expand Down Expand Up @@ -198,11 +190,6 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({
ocsTaintsStatus,
})}
</ListItem>
<ListItem>
{t('Replica-1 pool: {{singleReplicaPoolStatus}}', {
singleReplicaPoolStatus,
})}
</ListItem>
</ReviewItem>
)}
{!isRhcs &&
Expand Down
10 changes: 2 additions & 8 deletions packages/odf/components/create-storage-system/payloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,8 @@ export const createStorageCluster = async (
backingStorage,
dataProtection,
} = state;
const {
capacity,
enableArbiter,
arbiterLocation,
pvCount,
enableSingleReplicaPool,
} = capacityAndNodes;
const { capacity, enableArbiter, arbiterLocation, pvCount } =
capacityAndNodes;
const { encryption, publicNetwork, clusterNetwork, kms } = securityAndNetwork;
const {
type,
Expand Down Expand Up @@ -221,7 +216,6 @@ export const createStorageCluster = async (
isMCG,
isNFSEnabled,
shouldSetCephRBDAsDefault,
isSingleReplicaPoolEnabled: enableSingleReplicaPool,
enableRDRPreparation,
storageClusterNamespace,
enableNoobaaClientSideCerts: externalPostgres.tls.enableClientSideCerts,
Expand Down
9 changes: 0 additions & 9 deletions packages/odf/components/create-storage-system/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export const initialState: CreateStorageSystemState = {
},
capacityAndNodes: {
enableArbiter: false,
enableSingleReplicaPool: false,
enableTaint: false,
arbiterLocation: '',
capacity: null,
Expand Down Expand Up @@ -139,7 +138,6 @@ type CreateStorageSystemState = {
connectionDetails: ExternalCephState;
capacityAndNodes: {
enableArbiter: boolean;
enableSingleReplicaPool: boolean;
enableTaint: boolean;
arbiterLocation: string;
// @TODO: Remove union types and use "number" as type.
Expand Down Expand Up @@ -370,9 +368,6 @@ export const reducer: WizardReducer = (prevState, action) => {
case 'capacityAndNodes/enableTaint':
newState.capacityAndNodes.enableTaint = action.payload;
break;
case 'capacityAndNodes/enableSingleReplicaPool':
newState.capacityAndNodes.enableSingleReplicaPool = action.payload;
break;
case 'securityAndNetwork/setKms':
newState.securityAndNetwork.kms = action.payload;
break;
Expand Down Expand Up @@ -479,10 +474,6 @@ export type CreateStorageSystemAction =
type: 'capacityAndNodes/enableTaint';
payload: WizardState['capacityAndNodes']['enableTaint'];
}
| {
type: 'capacityAndNodes/enableSingleReplicaPool';
payload: WizardState['capacityAndNodes']['enableSingleReplicaPool'];
}
| {
type: 'securityAndNetwork/setKms';
payload: WizardState['securityAndNetwork']['kms'];
Expand Down
3 changes: 0 additions & 3 deletions packages/odf/components/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ type OCSRequestData = {
isMCG?: boolean;
isNFSEnabled?: boolean;
shouldSetCephRBDAsDefault?: boolean;
isSingleReplicaPoolEnabled?: boolean;
enableRDRPreparation?: boolean;
storageClusterNamespace: string;
useExternalPostgres?: boolean;
Expand All @@ -406,7 +405,6 @@ export const getOCSRequestData = ({
isMCG,
isNFSEnabled,
shouldSetCephRBDAsDefault,
isSingleReplicaPoolEnabled,
enableRDRPreparation,
storageClusterNamespace,
useExternalPostgres,
Expand Down Expand Up @@ -475,7 +473,6 @@ export const getOCSRequestData = ({
getNetworkField(publicNetwork, clusterNetwork, encryption.inTransit)
),
managedResources: {
cephNonResilientPools: { enable: isSingleReplicaPoolEnabled },
cephBlockPools: { defaultStorageClass: shouldSetCephRBDAsDefault },
},
};
Expand Down

0 comments on commit 8b0c003

Please sign in to comment.