Skip to content

azure-mgmt-compute v. 38.0.0 breaks pycloudlib #501

@blackboxsw

Description

@blackboxsw

cloud-init integration tests currently fail with azure-mgmt-compute v. 38.0.0 with the following traceback:

            vm_poller = self.compute_client.virtual_machines.begin_create_or_update(
                resource_group_name=self.resource_group.name,
                vm_name=name,
                parameters=params,
            )
            vm_poller.wait(provisioning_timeout)
            if not vm_poller.done():
                raise PycloudlibTimeoutError("Virtual machine creation timed out.")
            return vm_poller.result()
        except HttpResponseError as e:
            err_code = e.error.code
            err_msg = e.error.message
>           raise PycloudlibError(f"Virtual machine creation error: {err_code}\n{err_msg}") from e
E           pycloudlib.errors.PycloudlibError: Virtual machine creation error: InvalidRequestContent
E           The request content was invalid and could not be deserialized: 'Could not find member 'hardware_profile' on object of type 'ResourceDefinition'. Path 'hardware_profile', line 1, position 44.'.

.tox/integration-tests/lib/python3.14/site-packages/pycloudlib/azure/cloud.py:620: PycloudlibError

While checking params value prior to begin_create_or_update shows the provided hardware_profile values being passed

{'location': 'centralus', 'hardware_profile': {'vm_size': 'Standard_DS1_v2'}, 'storage_profile': {'image_reference': {'publisher': 'Canonical', 'offer': 'ubuntu-26_04-lts-daily', 'sku': 'server', 'version': 'latest'}}, 'os_profile': {'computer_name': 'azure-integration-test-0506-211828-vm', 'admin_username': 'ubuntu', 'linux_configuration': {'ssh': {'public_keys': [{'path': '/home/ubuntu/.ssh/authorized_keys', 'key_data': 'REDACTED'}]}, 'disable_password_authentication': True}}, 'diagnostics_profile': {'boot_diagnostics': {'enabled': False}}, 'network_profile': {'network_interfaces': [{'id': '/subscriptions/REDACTED/resourceGroups/azure-integration-test-0506-211826-rg/providers/Microsoft.Network/networkInterfaces/azure-integration-test-0506-211828-nic', 'properties': {'primary': True}}]}, 'tags': {'name': 'azure-integration-test-0506-211828'}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions