-
Notifications
You must be signed in to change notification settings - Fork 49
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
Iss34 check avail cache size for download #321
Iss34 check avail cache size for download #321
Conversation
@prestonsn, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction. |
@prestonsn, your company's legal contact has approved your signed contributor license agreement. It will also be reviewed by VMware, but the merge can proceed. |
@prestonsn, VMware has approved your signed contributor license agreement. |
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.
few comments.
I have two more things.
rpm is 29M, after extraction it's ~37M. Both these are my queries, I'm okay with not having these things. Changes LGTM. |
Shreenidhi, we don't have to guess, we know the exact install size from the metadata. The problem is that the package may be installed across multiple filesystems, and we don't know how the sizes of installed files (AFAIK, maybe we can finds out). However, this is not a common case, so maybe we can make the check optional, or even detect it automatically. |
I'm currently working on adding some functionality to the test code to mount a tmpfs filesystem with intentionally limited diskspace. Then supply its mounted path as the cache directory path to tdnf. This should trigger the test case as you 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.
Please also add the package size to the json info - should be trivial.
Added in latest commit: e9c6d07 |
Latest commit 9560534 adds a test to intentionally trigger an out-of-diskspace error. It uses the new script |
This looks good to me. Nice work! Please squash the commits together into a smaller number of commits that make sense on their own. fb9b995 could be worth its own PR, but should be left as a separate commit at least. Squashing all other commits into a single one is fine too. I am wondering about corner cases:
This could be fixed in a separate PR, but if not addressed we should create an issue. |
c32c6fb
to
0435d23
Compare
0435d23
to
fbc4caf
Compare
Thank you for the advice! Everything has been squashed into 3 commits, and those mentioned changes have been merged in their own PR #333.
Good point, I've opened issue #334 and added some more details there. |
Pull-request for issue #34. Addresses missing check for available disk space prior to installing package(s). This PR only provides a cache directory space check, and does not check for available disk space at package install paths.
statfs
syscall.An install will now appear as follows: