Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2312137: [release-4.17] Fix DR optimization check flag #1611

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/mco/components/create-dr-policy/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type StorageClusterInfoType = {
// Ceph FSID to determine RDR/MDR.
cephFSID: string;
// OSDs are migrated for the RDR or not.
isDROptimized: boolean;
isDrOptimized: boolean;
};

export type ODFConfigInfoType = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const getODFInfo = (
storageClusterNamespace
);
const cephFSID = odfInfo?.storageCluster?.cephClusterFSID;
const isDROptimized = odfInfo?.storageCluster?.isDROptimized;
const isDrOptimized = odfInfo?.storageCluster?.isDrOptimized;

return {
odfVersion,
Expand All @@ -106,7 +106,7 @@ const getODFInfo = (
storageClusterNamespacedName,
storageSystemNamespacedName,
cephFSID,
isDROptimized,
isDrOptimized: isDrOptimized === 'true',
},
};
} catch (err) {
Expand All @@ -121,7 +121,7 @@ const getODFInfo = (
storageClusterNamespacedName: '',
storageSystemNamespacedName: '',
cephFSID: '',
isDROptimized: false,
isDrOptimized: false,
},
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const getClusterErrorInfo = (
acc.clustersWithUnsuccessfulODF.push(cluster.name);
}
if (
!storageClusterInfo?.isDROptimized &&
!storageClusterInfo?.isDrOptimized &&
replicationType === REPLICATION_TYPE.ASYNC
) {
acc.clustersWithoutDROptimizedODF.push(cluster.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export const checkForErrors = (
) =>
clusters.some((cluster) => {
const { isManagedClusterAvailable, odfInfo } = cluster;
const { cephFSID, storageSystemNamespacedName, isDROptimized } =
const { cephFSID, storageSystemNamespacedName, isDrOptimized } =
odfInfo.storageClusterInfo;
const [storageSystemName] = parseNamespaceName(storageSystemNamespacedName);
return (
!isManagedClusterAvailable ||
!odfInfo?.isValidODFVersion ||
!storageSystemName ||
!cephFSID ||
(replicationType === REPLICATION_TYPE.ASYNC && !isDROptimized)
(replicationType === REPLICATION_TYPE.ASYNC && !isDrOptimized)
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/mco/types/odf-mco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type InfoStorageCluster = {
};
storageProviderEndpoint: string;
cephClusterFSID: string;
isDROptimized: boolean;
isDrOptimized: string;
};

export type ODFInfoYamlObject = {
Expand Down
Loading