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

Adding Logs On How We Calculate CSINode.allocatables in NodeGetInfo #2372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdzraf
Copy link
Contributor

@mdzraf mdzraf commented Feb 27, 2025

What type of PR is this?

/kind cleanup

What is this PR about? / Why do we need it?

Today we log number of attached ENIs upon driver start if IMDS is our metadata source. However, we accidentally log it even if driver is in controller mode, which is an confusing experience for customers (Why should ebs-csi-controller care about the ENI count of the node it is on?)

This PR removes logging of ENIs when in controller mode and also adds logging of some of the information used to calculate CSI Node Allocatable, this way customers can have a better understanding of how this final node allocatable count was calculated.

How was this change tested?

Manually by spinning up a cluster and checking logs for nodes.

Logs output looks like this:

node.go:777] "getVolumesLimit:" instanceType="c5.large"
node.go:781] "getVolumesLimit:" maxAttachments=28
node.go:786] "getVolumesLimit:" numBlockDevices=0
node.go:789] "getVolumesLimit:" reservedVolumeAttachments=1
node.go:802] "getVolumesLimit:" numeENIs=1
node.go:804] "getVolumesLimit:" reservedSlots=0
node.go:597] "NodeGetInfo:" Node Allocatables=26

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 27, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 27, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @mdzraf. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 27, 2025
@ElijahQuinones
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 27, 2025
@mdzraf mdzraf force-pushed the LogAlocInNodeGetInfo branch from 2f3d31a to 124e0c2 Compare February 28, 2025 16:40
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 28, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2025
@mdzraf mdzraf force-pushed the LogAlocInNodeGetInfo branch from 124e0c2 to fce85e4 Compare February 28, 2025 16:42
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from elijahquinones. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@@ -792,7 +798,9 @@ func (d *NodeService) getVolumesLimit() int64 {
availableAttachments = dedicatedLimit
} else if isNitro {
enis := d.metadata.GetNumAttachedENIs()
klog.V(4).InfoS("getVolumesLimit:", "numeENIs", enis)
Copy link
Member

Choose a reason for hiding this comment

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

typo: numeENIs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants