Running the noble integration test for Azure generic is throwing an error for all the given steps, because there is a mismatch between the noble image released on Azure (which is gen-2, per the error message below) and the VM generation we use in our CI (which is gen-1).
We need to change the VM type for the Azure tests - preferably to the cheapest version which supports both gen-1 and gen-2 VMs.
According to the Azure VM selector, the cheapest we can get is a B2ps v2 instance, with the next alternative being the B2s v2 - but those don't support gen-1 VMs. Some equivalent B-series do support both generations, so we may go with just B2s (the closest to our current A2_v2) to sort it out.
Expected behavior
Integration tests at least run on 24.04 azure.generic, and we pay the least possible amount of money for that to happen.
Current behavior
Can't run the CI there - the following error is seen for all machine creation steps:
Message: The selected VM size 'Standard_A2_v2' cannot boot Hypervisor Generation '2'. If this was a Create operation please check that the Hypervisor Generation of the Image matches the Hypervisor Generation of the selected VM Size. If this was an Update operation please select a Hypervisor Generation '2' VM Size. For more information, see https://aka.ms/azuregen2vm
To Reproduce
From the main branch:
tox -e behave -- -D releases=noble -D machine_types=azure.generic
Watch it go boom many times.
Additional context
This is a bug on how we use the CI - there is nothing wrong with the noble image or with pycloudlib.
An alternative would be to use the server-gen-1 plans to launch the instances. But that would be a change in pycloudlib - which could:
Affect other users (like cloud-init) that may be expecting this particular one to be gen-2
Backfire in the future if the gen1 VMs are retired/deprecated - as unlikely it is to break existing workflows, the correct step is adopting the new isn't it? (:
We can also open a bug against pycloudlib asking for an option to query for images from different generations, and then update our logic to run the tests. But that would be an overkill IMHO given:
Just launching any image there without specifying the machine works fine
Specifying the machine, but then passing the image string ourselves also works fine
Description of the bug
Running the
noble
integration test for Azure generic is throwing an error for all thegiven
steps, because there is a mismatch between the noble image released on Azure (which is gen-2, per the error message below) and the VM generation we use in our CI (which is gen-1). We need to change the VM type for the Azure tests - preferably to the cheapest version which supports both gen-1 and gen-2 VMs.According to the Azure VM selector, the cheapest we can get is a
B2ps v2
instance, with the next alternative being theB2s v2
- but those don't support gen-1 VMs. Some equivalent B-series do support both generations, so we may go with justB2s
(the closest to our currentA2_v2
) to sort it out.Expected behavior
Integration tests at least run on 24.04 azure.generic, and we pay the least possible amount of money for that to happen.
Current behavior
Can't run the CI there - the following error is seen for all machine creation steps:
To Reproduce
From the
main
branch:tox -e behave -- -D releases=noble -D machine_types=azure.generic
Watch it go boom many times.Additional context
This is a bug on how we use the CI - there is nothing wrong with the noble image or with
pycloudlib
.An alternative would be to use the server-gen-1 plans to launch the instances. But that would be a change in
pycloudlib
- which could:We can also open a bug against
pycloudlib
asking for an option to query for images from different generations, and then update our logic to run the tests. But that would be an overkill IMHO given: