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 1871646: Fix location of Minimal Deployment message and calculation for Internal Mode deployment #6404

Merged

Conversation

bipuladh
Copy link
Contributor

@bipuladh bipuladh commented Aug 23, 2020

  • 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.
    Screenshot from 2020-08-26 16-33-52

@openshift-ci-robot
Copy link
Contributor

@bipuladh: Bugzilla bug 1871646 is in a bug group that is not in the allowed groups for this repo.
Allowed groups for this repo are:

  • qe_staff
  • redhat

In response to this:

Bug 1871646: Fix location of Minimal Deployment message and calculation for Internal Mode deployment

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.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 23, 2020
@bipuladh
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label Aug 23, 2020
@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 23, 2020
@cloudbehl
Copy link
Contributor

How does total make sense if the node itself doesn't satisfy the criteria? Let say you have 15 nodes with 2vcpu's?

@bipuladh
Copy link
Contributor Author

@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.'
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

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[]) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const shouldDeployInternalAsMinimal = (nodes: NodeKind[]) => {
export const DeployCloudAsMinimal = (nodes: NodeKind[]) => {

Copy link
Contributor Author

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.

Copy link
Contributor Author

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[]) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const shouldDeployMinimally = (nodes: NodeKind[]) =>
export const DeployBaremetalAsMinimal = (nodes: NodeKind[]) =>

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

@bipuladh bipuladh force-pushed the fix_minimal_deployment branch 2 times, most recently from 30528d8 to 48da5ea Compare August 24, 2020 13:55
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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@gnehapk
Copy link
Contributor

gnehapk commented Aug 25, 2020

@bipuladh As discussed, please change the getOCSRequestDatafunction, as its replacing the spec property in case of minimal deployement and hence, breaking the ocs cluster creation on attached devices.

@bipuladh
Copy link
Contributor Author

@bipuladh As discussed, please change the getOCSRequestDatafunction, as its replacing the spec property in case of minimal deployement and hence, breaking the ocs cluster creation on attached devices.

Noted and added.

if (timeoutID.current !== null) {
clearTimeout(timeoutID.current);
}
if (nodes.length >= 3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (nodes.length >= 3) {
if (nodes.length >= minSelectedNode) {

@gnehapk
Copy link
Contributor

gnehapk commented Aug 25, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2020
@bipuladh
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 25, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1871646, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871646: Fix location of Minimal Deployment message and calculation for Internal Mode deployment

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.

@bipuladh
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 26, 2020
@gnehapk
Copy link
Contributor

gnehapk commented Aug 26, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 9cc959b into openshift:master Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: All pull requests linked via external trackers have merged:

Bugzilla bug 1871646 has been moved to the MODIFIED state.

In response to this:

Bug 1871646: Fix location of Minimal Deployment message and calculation for Internal Mode deployment

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.

@spadgett spadgett added this to the v4.6 milestone Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants