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

CNV-19689: Add note about resource quotas #48252

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

bgaydosrh
Copy link

@bgaydosrh bgaydosrh commented Jul 25, 2022

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 25, 2022
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 5, 2022
@bgaydosrh bgaydosrh force-pushed the CNV-19689 branch 3 times, most recently from c1209b4 to ed9b518 Compare August 5, 2022 16:23
Copy link

@stu-gott stu-gott left a comment

Choose a reason for hiding this comment

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

One small suggestion, otherwise this looks good. thanks!

modules/virt-about-resource-quota-limits.adoc Outdated Show resolved Hide resolved
@stu-gott
Copy link

stu-gott commented Aug 5, 2022

/cc @dshchedr would you have bandwidth to review this?

Copy link

@stu-gott stu-gott left a comment

Choose a reason for hiding this comment

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

LGTM for content

@stu-gott
Copy link

stu-gott commented Aug 5, 2022

I've never seen that before. I reviewed so fast that github got the sequence out of order. My LGTM applies to this point in time.

@bgaydosrh bgaydosrh force-pushed the CNV-19689 branch 2 times, most recently from 31090e2 to c51a13f Compare August 5, 2022 18:13
@dshchedr
Copy link

dshchedr commented Aug 5, 2022

Thanks,
/LGTM

@openshift-ci
Copy link

openshift-ci bot commented Aug 5, 2022

@dshchedr: changing LGTM is restricted to collaborators

In response to this:

Thanks,
/LGTM

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.

Copy link
Member

@ousleyp ousleyp left a comment

Choose a reason for hiding this comment

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

I think this would benefit from a bit of rework. Please let me know if you have any questions about my comments. Thanks!

@@ -8,6 +8,8 @@ toc::[]

You can place virtual machines (VMs) on specific nodes by using node placement rules.

include::modules/virt-about-resource-quota-limits.adoc[leveloffset=+1]
Copy link
Member

@ousleyp ousleyp Aug 5, 2022

Choose a reason for hiding this comment

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

I'm confused about this placement; does it apply to this assembly specifically? I checked the BZ and it looks like @fabiand linked to the node placement assembly because you can't link directly to the section on docs.openshift.com.

Section Number and Name: "Advanced Virtual Machine management"

Should this have its own simple (one module and an intro sentence) assembly instead? Or is there an existing assembly on resource quotas?

Copy link
Contributor

Choose a reason for hiding this comment

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

After revisiting the 4.10 docs, I'd suggest that inside the "Advanced Virtual Machine management" section, we add a new section called "Working with ResourceQuotas".

Copy link
Author

@bgaydosrh bgaydosrh Sep 15, 2022

Choose a reason for hiding this comment

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

Thanks @ousleyp and @fabiand and apologies for taking so long to wrap this up :-)

I only have one other question which I have tagged @ousleyp on below.

Pan, if you think this makes more sense as just an assembly with no module, let me know.

Also, from conversations with @stu-gott, he had stated that the resource quota implementation was the same in both OCP and CNV, except in CNV you only work with quotas for VMs. Let me know what you think about that and possible rewording. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

I'd definitely suggest keeping the procedure in its own module; assemblies without any modules are rare edge cases and usually created out of necessity/as a workaround for something like the xref-in-modules ban

Copy link
Author

Choose a reason for hiding this comment

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

Cool.

template:
spec:
domain:
Copy link
Member

Choose a reason for hiding this comment

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

I think we usually left-justify the "..." (also, this looks like a special character that should be swapped to ...)

Copy link
Member

Choose a reason for hiding this comment

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

The docs guidelines also state "When truncating YAML, always precede an ellipsis with a pound so that the YAML is valid."

Copy link
Contributor

Choose a reason for hiding this comment

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

Whatever is needed :)

Copy link
Author

Choose a reason for hiding this comment

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

Done, thanks I was not aware of the # but that makes sense.

limits:
memory: 256Mi <1>
----
<1> `resources/limits` is twice the size of `resource/requests`, meeting the `100Mi` requirement.
Copy link
Member

Choose a reason for hiding this comment

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

This callout is somewhat confusing when taken out of context, and I think it might not be localization-friendly. (We also use ., not / to delineate YAML fields.) Here's a suggestion for you to consider:

<1> This configuration is supported because the `limits.memory` value is at least `100Mi` larger than the `requests.memory` value.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on Pans wording

Copy link
Author

Choose a reason for hiding this comment

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

Thanks!


:_content-type: CONCEPT
[id="virt-about-resource-quota-limits_{context}"]
= About resource limits
Copy link
Member

Choose a reason for hiding this comment

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

The ID/filename/title don't quite match. Should this be titled "About resource quota limits" or should the filename/ID be changed to remove "quota"? Edit: I think this should be converted into a procedure module, in which case you'd need to retitle it to something that starts with a gerund.

Copy link
Contributor

Choose a reason for hiding this comment

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

However it is worded, but the title should refer to working with ResourceQuotas

Copy link
Author

Choose a reason for hiding this comment

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

I changed the ID and title to "Setting resource quota limits" and made this a PROCEDURE module called by the "Working with resource quotas" assembly.

@ousleyp - Do you think I should retain "in {VirtProductName}" in the assembly and module titles to differentiate from OCP or do you think that's just redundant?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need "in {VirtProductName}" but I wouldn't be opposed to you adding something like "...for virtual machines" to a title. I'm kind of ambivalent, though, since it's in the CNV docs

Copy link
Author

Choose a reason for hiding this comment

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

I'll probably include "for VMs" just for findability.

[id="virt-about-resource-quota-limits_{context}"]
= About resource limits

You can only set `ResourceQuotas` for virtual machines if the resource quota has a set of requests. If the resource quota contains both requests and limits, the resource limits on the virtual machine must be set.
Copy link
Member

Choose a reason for hiding this comment

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

  • I am confused by this intro, as well as its location in this assembly (which doesn't mention resource quotas).

  • I think this should be a procedure rather than a concept.

  • After reviewing the bug, I would reword the intro to something like this:

Resource quotas that only use requests automatically work with virtual machines (VMs). If your resource quota uses limits, you must manually set resource limits on VMs. Resource limits must be at least 100 MiB larger than resource requests.

  • Re: s/megabytes/MiB: the Mi in the YAML makes me think that it is supposed to be MiB (mebibytes). The ISG also seems to recommend just writing MiB instead of spelling it out: https://www.ibm.com/docs/en/ibm-style?topic=measurement-units

  • I think there should be a procedure step or two; something like this:

. Set limits for a VM by editing the `VirtualMachine` manifest. For example:
+
<yaml example>

. <step to apply changes>

Copy link
Contributor

Choose a reason for hiding this comment

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

Pan, +1 on your suggested wording.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, Pan. Much clearer.

@ousleyp ousleyp added the peer-review-done Signifies that the peer review team has reviewed this PR label Aug 5, 2022
@bergerhoffer
Copy link
Contributor

The enterprise-4.12 label has been added to this PR.

This is because your PR targets the main branch and is labeled for enterprise-4.11. And any PR going into main must also target the latest version branch (enterprise-4.12).

If the update in your PR does NOT apply to version 4.12 onward, please re-target this PR to go directly into the appropriate version branch or branches (enterprise-4.x) instead of main.

// * virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.adoc

:_content-type: PROCEDURE
[id="virt-setting-resource-quota-limits_{context}"]
Copy link
Member

Choose a reason for hiding this comment

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

Please rename the module file itself to match the new title/ID (and of course, update it in the assembly when you do). Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,35 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.adoc
Copy link
Member

Choose a reason for hiding this comment

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

Please update this to the new assembly path that you created

Copy link
Author

Choose a reason for hiding this comment

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

Doh! Thanks.


toc::[]

Resource quotas are implemented in {VirtProductName} similarly to how they are implemented in {product-title}. However, in (VirtProductName}, you are creating and managing resource quotas only for virtual machines.
Copy link
Member

Choose a reason for hiding this comment

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

I might reword this intro to something simpler, since the 'meat' of this doc change is in the procedure module. You can have an assembly intro that is as simple as "Create and manage resource quotas for virtual machines."

Suggestion: we could also include an xref to the OCP resource quota docs somewhere, if that would be useful.

Copy link
Author

Choose a reason for hiding this comment

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

Went with the simple recommendation. I thought about mentioning limits for a more comprehensive abstract sentence but I also don't want to limit the scope of this assembly.

@bgaydosrh bgaydosrh force-pushed the CNV-19689 branch 3 times, most recently from 9343f3c to d5ce393 Compare September 22, 2022 20:39
Copy link
Member

@ousleyp ousleyp left a comment

Choose a reason for hiding this comment

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

Just one nit re: additional resources formatting; otherwise this LGTM


include::modules/virt-setting-resource-quota-limits-for-vms.adoc[leveloffset=+1]

.Additional resources
Copy link
Member

Choose a reason for hiding this comment

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

Please use the add'l resources formatting for assemblies:

[role="_additional-resources"]
[id="additional-resources_virt-working-with-resource-quotas-for-vms"]
== Additional resources

Copy link
Author

Choose a reason for hiding this comment

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

Done. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding the role and id lines! One last thing, though: you still have .Additional resources in line 15. That should be changed to == Additional resources.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry about that. Should be good now :-)

@bgaydosrh bgaydosrh force-pushed the CNV-19689 branch 2 times, most recently from 30ffc5a to eaf99de Compare September 29, 2022 19:07
Copy link
Member

@ousleyp ousleyp left a comment

Choose a reason for hiding this comment

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

I left one comment regarding the additional resources section. Please let me know when you've fixed that last thing and I'll go ahead with merging.


include::modules/virt-setting-resource-quota-limits-for-vms.adoc[leveloffset=+1]

.Additional resources
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding the role and id lines! One last thing, though: you still have .Additional resources in line 15. That should be changed to == Additional resources.

@ousleyp ousleyp merged commit 88203b0 into openshift:main Oct 5, 2022
@ousleyp
Copy link
Member

ousleyp commented Oct 5, 2022

/cherrypick enterprise-4.12

@ousleyp
Copy link
Member

ousleyp commented Oct 5, 2022

/cherrypick enterprise-4.11

@ousleyp
Copy link
Member

ousleyp commented Oct 5, 2022

/cherrypick enterprise-4.10

@ousleyp
Copy link
Member

ousleyp commented Oct 5, 2022

/cherrypick enterprise-4.9

@ousleyp
Copy link
Member

ousleyp commented Oct 5, 2022

/cherrypick enterprise-4.8

@openshift-cherrypick-robot

@ousleyp: new pull request created: #51296

In response to this:

/cherrypick enterprise-4.12

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-cherrypick-robot

@ousleyp: new pull request created: #51297

In response to this:

/cherrypick enterprise-4.11

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-cherrypick-robot

@ousleyp: new pull request created: #51298

In response to this:

/cherrypick enterprise-4.10

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-cherrypick-robot

@ousleyp: new pull request created: #51299

In response to this:

/cherrypick enterprise-4.9

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-cherrypick-robot

@ousleyp: new pull request created: #51300

In response to this:

/cherrypick enterprise-4.8

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.8 branch/enterprise-4.9 branch/enterprise-4.10 branch/enterprise-4.11 branch/enterprise-4.12 CNV Label for all CNV PRs peer-review-done Signifies that the peer review team has reviewed this PR size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants