-
Notifications
You must be signed in to change notification settings - Fork 59
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
Linodes cannot mount more than 7 PVC on instances with 8GB or less. #182
Comments
Thank you for filing this bug report, @codestation! As you have pointed out, since you are using Linodes with <= 8GB of RAM, the total number of volumes that can be attached is 8; this includes locally attached "instance" disks (typically only 1, used for boot and root), and 7 additional instance disks and/or block storage volumes. In a 3-node cluster, with the instance sizes you have specified, I would only expect you to be able to attach a total of 21 volumes across the cluster.
When these changes were tested, I used an array of instance sizes from the 1GB "Nanode" all the way up to a 96GB Linode, and in all cases, the tests were successfully able to attach the maximum expected number of volumes, minus 1 to account for the local instance disk. I also made sure to set the number of replicas to be 1 more than the expected number of attachments per node (the statefulsets targeted nodes of different instance sizes), and in all cases, that additional replica pod was scheduled to a node, but unable to start, due to the missing PVC, which could not be attached. Prior to v0.7.0, there was a hard maximum of 8 volumes total (instance disks + block storage volumes) that could be attached to any node. v0.7.0 changed the way the block storage volumes were attached, to align with the functionality supported by the Linode API, and allowed >8 volumes to be attached to nodes with >= 16GB of RAM. In making that change, there was also a pre-flight check that was added, that would prevent attempting to attach a volume if the maximum number of attachments would be exceeded; previously, there was no check, and an unactionable error from the Linode API would be returned directly to the container orchestrator (CO). The current volume attachment limits are currently in the release notes for v0.7.0, but should also be made present in the README for this repository. I will add an issue to track this. 🙂
I don't think rescheduling pods is in the domain of the CSI driver. In my work on this driver, I have been working on bringing the driver into compliance with the latest version of the CSI specification, which indicates that if a volume cannot attached to a node, the RESOURCE_EXHAUSTED error code should be returned. If I have misinterpreted the specification, that is definitely grounds for a bug fix. 😄
Correct, local "instance" disks and block device volumes are counted against the limit of attached volumes. However, that documentation does not indicate that the maximum number of volumes scales with the amount of memory presented to the instance, up to a maximum of 64 total volume attachments; likely because these are numbers that will change. These numbers are internal to the virtualization platform at Linode, and they are copied/surfaced in this driver's code to preempt any attachments that would fail. In your reproduction steps, exactly how many volumes are being created? |
In my repro i got to 9 attached volumes before getting stuck. I just tried the following in Linode.
According the comment on IMO the solution could be that either the NodeGetInfo method return I am gonna try to test the first option in the next days to see how it goes (fork the repo, use a naive |
That sounds right to me.
It is possible to get the number of instance disks and volumes currently attached to an instance through the Linode API, so this could be done by both the controller and the node plugin. Looking through the code, there is the |
When calculating the maximum number of allowed volume attachments, the code was previously taking the ideal maximum number of volumes that could be attached to a node. The way the attachment was calculated, it treated instance disks the same as volumes, which is not correct. This commit fixes what is effectively an off-by-one error, by subtracting the number of instance disks from the theoretical maximum number of block devices that can be attached to the instance. In other words, controller and node servers will now report the number of block storage volumes that can be attached, not just block devices. Fixes #182
When calculating the maximum number of allowed volume attachments, the code was previously taking the ideal maximum number of volumes that could be attached to a node. The way the attachment was calculated, it treated instance disks the same as volumes, which is not correct. This commit fixes what is effectively an off-by-one error, by subtracting the number of instance disks from the theoretical maximum number of block devices that can be attached to the instance. In other words, controller and node servers will now report the number of block storage volumes that can be attached, not just block devices. Fixes #182
@codestation I have just merged in the patch that will hopefully fix this bug. Thank you for being patient while we got this sorted out, and thank you for filing a bug! 😄 EDIT: The workflow to cut the release just finished. Please give v0.8.3 a whirl! |
General:
Feature Requests:
Bug Reporting
Small Linodes (i tested 4GB and 8GB) cannot have more than 7 attached PVC per node. According to the documentation local disks and block storage are counted aganist the max volumes that can be attached to a node.
Expected Behavior
The pod should be relocated to another node since the max number of PVC has been reached.
Actual Behavior
This gets emmited non-stop on the pod trying to attach a 8th volume to the node. The pod remains on the node.
Steps to Reproduce the Problem
Environment Specifications
Screenshots, Code Blocks, and Logs
Additional Notes
Related to #154 and probably reintroduced in v0.7.0. Haven't tested but it could also apply to bigger Linodes that allows more volumes but counting attached volumes incorrectly.
For general help or discussion, join the Kubernetes Slack team channel
#linode
. To sign up, use the Kubernetes Slack inviter.The Linode Community is a great place to get additional support.
The text was updated successfully, but these errors were encountered: