Skip to content

[enhancement]: catch missing passlib import as reportable for Azure #6770

@cadejacobson

Description

@cadejacobson

Enhancement

When cloud-init runs on Azure, if the underlying VM is missing both the crypt and passlib libraries and an admin password is specified, the hash function will throw an import error. This is not caught by any reportable error, so diagnostics show that cloud-init failed due to an unhandled error which is not immediately useful to users. All errors with the reason unhandled exception get grouped together which makes this visibility difficult.

By adding a specific reportable error for this path, users will be able to get a better understanding of how certain VM deployments are failing.

Current output:

OS Provisioning failed for VM {VM_NAME} due to an internal error: result=error|reason=unhandled exception|agent=Cloud-Init/24.2|'exception=ImportError(''crypt and passlib not found, missing dependency'')

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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