-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
win_partition - Fix handling of maximum partition size #58225
Conversation
Any way to test the 1mb issue in the ci? another question for the crowd, should the module send out a warning when this issue occurs? |
I'm not sure about the free space available on the server at the time of testing. I think at the time of writing this, I kept the 1 GB partition for the sake of the CI so I'm not sure how much space is OK for us to use.
I kept it in bytes to reduce conversions but I can do this is needed too.
It would throw a warning most of the time though, making users think something is wrong with it. Not sure how to approach this either - perhaps a note in the docs? |
If you'll run |
I'm probably wrong but it seems like the way of doing this would be to replace:
with:
Or is there another way of doing this seeing how direct conversion to MiB isn't possible? |
I actually just meant replacing 104900 to 1mb :)
…On Mon, Jun 24, 2019, 11:50 Varun Chopra ***@***.***> wrote:
I'm probably wrong but it seems like the way of doing this would be to
replace:
($ansible_partition_size - $ansible_partition.Size -gt 1049000 -or $ansible_partition.Size - $ansible_partition_size -gt 1049000)
with:
([Math]::Round(($ansible_partition_size - $ansible_partition.Size)/1MB) - le 1 -or [Math]::Round(($ansible_partition.Size - $ansible_partition_size)/1MB) -le 1)
Or is there another way of doing this seeing how direct conversion to MiB
isn't possible?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58225?email_source=notifications&email_token=ACV27RVKK3WNCQL7AIIIUETP4CDG3A5CNFSM4H2WJKZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYMHKPA#issuecomment-504919356>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACV27RREEROAPOWPQ6LXIFLP4CDG3ANCNFSM4H2WJKZA>
.
|
It must be less than 1 MiB not 1 MB though. |
You could simplify the if statement and math by doing:
The |
Looking for signs of life. @jborean93 @nitzmahone Please let me know if I need to go on with this. Not sure if I'd be able to contribute later. |
Sorry about that @chopraaa rebuild_merge |
SUMMARY
Fixes #56910
ISSUE TYPE
COMPONENT NAME
win_partition
ADDITIONAL INFORMATION
Doesn't resize the partition if the difference is ~1MiB +/- from the original partition size according to my post here: #56910 (comment) This issue is prevalent in partitions with large disk sizes so it's still not covered by these integration tests.
I've also removed
-UseMaximumSize
and specified the maximum supported size directly.