Skip to content

Fix cloud provider detection to be compatible with current Azure and future-proof #5085

@achimnol

Description

@achimnol

Reading special DMI vendor information files may easily break up in future cloud provider’s virtualization implementations.

For example, ai.backend.common.identity.detect_cloud() function does not work on the latest Microsoft Azure VM instances (e.g., DSads v5).

Let’s consistently use the metadata URL (without relying on DNS resolution) 169.254.169.254 to detect the cloud provider type, using asyncio.staggered.staggered_race() to run the multiple detection routines like the happy eyeballs mechanism.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions