win_partition - Fix handling of maximum partition size #58225
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
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?
I'm probably wrong but it seems like the way of doing this would be to replace:
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> .