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
azure-image: switch to use the common make-disk-image.nix #25197
Conversation
@copumpkin, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Phreedom, @rbvermaa and @dezgeg to be potential reviewers. |
I've love to take a look (especially since upstream qemu-img now works fine with Azure) but I simply do not have the time. Hopefully @Phreedom can take a look potentially. |
@Phreedom doesn't seem to have time but mentioned on IRC that https://bugs.launchpad.net/qemu/+bug/1490611 was the source of the weird size calculations, so a recent version of qemu should be enough to fix it. I'll see if I can get myself an Azure account in the next few days to spin up an image before I merge this, if someone else can't test it first. |
Will test it sometime later today. |
@fadenb ouch, that doesn't make me feel much better about removing it, but at some point I guess we'll need to test the straightforward thing if we don't want to be stuck forever with arcane arithmetic that nobody understands 😄 note that I still haven't upgraded to the latest qemu, so it might still be odd until we do that. I'll be at my other computer this evening and can make that change then, but if you end up testing before that, can you make sure to check with the latest qemu? |
PR as it is: PR but with current qemu: PR with current qemu and force_size option: |
@fadenb thanks for all the tests. What do you think I should do? I'm tempted to merge this PR as it is if it works, then maybe let @colemickens or some other Azure expert deal with the the qemu and |
PR as it is seems reasonable safe to merge so I would say go for it. |
Thanks! |
Sorry, haven't reviewed the commits or anything. The only trick here should b.... use a new enough version of qemu and pass When I did this hacky stuff previously, I was just adding an extra qemu package that didn't have the regression and was using it to build the Azure image. Now, you should be able to just remove the custom qemu version and just make sure the correct |
@colemickens alright, so I guess in theory we should emulate that rounding logic in our (eventual) VM test for this image so we don't break it in future? Either way, @fadenb says the current state works, so I'm inclined to leave out all the arcane arithmetic until the issue presents itself again. The change you're describing sounds straightforward but I'm reluctant to make changes that I can't test, so I'm inclined to leave it to someone who can test it. |
@colemickens To put it differently, is there a simple open source tool/incantation we can run against a VHD file to see if Azure will consider it to have a non-integer size? I see some people in the launchpad issue using |
In theory, you really shouldn't need to emulate anything... you should just use the latest And yes, I think the I'd say I'd try to test this this weekend, but my list of extra things to test for random projects is already too long. |
As this PR is now merged for some time I used the new code several times to build azure images. |
@fadenb sorry about that! I can't test it easily but if you can provide some sort of measurement I'd be very curious about it. Are you generating images from physical hardware or on Azure itself? |
Motivation for this change
More consistency. See #25165 and #25166 for more context.
Two things:
cc @domenkozar
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)