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 1871646: Fix location of Minimal Deployment message and calculation for Internal Mode deployment #6404
Bug 1871646: Fix location of Minimal Deployment message and calculation for Internal Mode deployment #6404
Conversation
bipuladh
commented
Aug 23, 2020
•
edited
edited
- Fixes calculation for Internal mode where if the total CPU < 30 then only the minimal deployment will occur.
- Fixes calculation for an Attached mode where if the CPU per node < 10 then the minimal deployment will occur.
- Moves the message as an alert to the bottom.
@bipuladh: Bugzilla bug 1871646 is in a bug group that is not in the allowed groups for this repo.
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@bipuladh: This pull request references Bugzilla bug 1871646, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
How does total make sense if the node itself doesn't satisfy the criteria? Let say you have 15 nodes with 2vcpu's? |
@cloudbehl As per @oritwas situations like that should work for Internal Mode deployments. |
isInline | ||
> | ||
{isInternalMode | ||
? 'The selected nodes do not match the OCS storage cluster minimum recommended requirements of an aggregated 30 CPUs. If the selection won’t be modified, a minimal cluster will be deployed and may face some performance issues.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memory requirements are not mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are checking the memory requirements in shouldDeployInternalAsMinimal
user will not able to make out why error is coming if the memory requirements are failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shirimordechay please have a look at this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a memory requirement we should mention it, I think the message should fit the user selection. After the "recommended requirement of..." we should add the requirement that doesn't fit. the rest of the warning text will stay the same
In this use case, the text will be: ‘The selected nodes do not match the OCS storage cluster minimum recommended requirements of a [total 60 GiB Memory]. If the selection won’t be modified, a minimal cluster will be deployed and may face some performance issues.’
For cloud/ LSO requirement text should be changed accordingly.
@@ -58,12 +58,30 @@ export const getAssociatedNodes = (pvs: K8sResourceKind[]): string[] => { | |||
return Array.from(nodes); | |||
}; | |||
|
|||
export const shouldDeployInternalAsMinimal = (nodes: NodeKind[]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const shouldDeployInternalAsMinimal = (nodes: NodeKind[]) => { | |
export const DeployCloudAsMinimal = (nodes: NodeKind[]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can deploy internal mode in VMWare as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a react component. (first character no need to be uppercase)
); | ||
return totalCPU < 30 || totalMemory < 60; | ||
}; | ||
|
||
export const shouldDeployMinimally = (nodes: NodeKind[]) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const shouldDeployMinimally = (nodes: NodeKind[]) => | |
export const DeployBaremetalAsMinimal = (nodes: NodeKind[]) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can deploy Attached devices in AWS as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will keep it as shouldDeployAttachedAsMinimal
to keep it consistent with the other function
30528d8
to
48da5ea
Compare
nodes.reduce((acc, curr) => { | ||
const cpus = humanizeCpuCores(getNodeCPUCapacity(curr)).value; | ||
const memoryRaw = getNodeAllocatableMemory(curr); | ||
const memory = humanizeBinaryBytes(convertToBaseValue(memoryRaw)).value; | ||
if (memory < 60 || cpus < 16) { | ||
if (memory < 60 || cpus < 10) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
@bipuladh As discussed, please change the |
48da5ea
to
3ec2809
Compare
Noted and added. |
if (timeoutID.current !== null) { | ||
clearTimeout(timeoutID.current); | ||
} | ||
if (nodes.length >= 3) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (nodes.length >= 3) { | |
if (nodes.length >= minSelectedNode) { |
3ec2809
to
cd66904
Compare
/lgtm |
/hold |
cd66904
to
0bfb707
Compare
…al Mode deployment
@bipuladh: This pull request references Bugzilla bug 1871646, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
0bfb707
to
afb3d45
Compare
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bipuladh, cloudbehl, gnehapk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@bipuladh: All pull requests linked via external trackers have merged: Bugzilla bug 1871646 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |