Skip to content

(FACT-1847) Fix cloud fact implementation for Azure#2302

Merged
luchihoratiu merged 1 commit intopuppetlabs:3.xfrom
GabrielNagy:FACT-1847/cloud-fact-3.x
Mar 9, 2021
Merged

(FACT-1847) Fix cloud fact implementation for Azure#2302
luchihoratiu merged 1 commit intopuppetlabs:3.xfrom
GabrielNagy:FACT-1847/cloud-fact-3.x

Conversation

@GabrielNagy
Copy link
Copy Markdown
Contributor

Since we now have an az_metadata fact, we can reimplement the cloud fact using this. The previous implementation was Linux-only and worked by searching for a specific string in the DHCP lease file, which does not work anymore (at least not on Ubuntu 20.04 Azure VMs).

For the new implemetation, extract the cloud fact into its own resolver, as it indirectly depends on the virtual fact which is also part of the virtualization resolver. The new implementation should work regardless of OS, as it just checks for the existence of the az_metadata fact.

@GabrielNagy GabrielNagy requested a review from a team March 4, 2021 08:30
@GabrielNagy
Copy link
Copy Markdown
Contributor Author

jenkins please test this on redhat7-64a,ubuntu2004-64a,windows2012r2-64a

@GabrielNagy GabrielNagy force-pushed the FACT-1847/cloud-fact-3.x branch from 262888f to d598269 Compare March 4, 2021 12:42
@ciprianbadescu ciprianbadescu requested a review from a team March 8, 2021 09:44
Since we now have an az_metadata fact, we can reimplement the cloud fact
using this. The previous implementation was Linux-only and worked by
searching for a specific string in the DHCP lease file, which does not
work anymore (at least not on Ubuntu 20.04 Azure VMs).

For the new implemetation, extract the cloud fact into its own resolver,
as it indirectly depends on the virtual fact which is also part of the
virtualization resolver. The new implementation should work regardless
of OS, as it just checks for the existence of the az_metadata fact.
@GabrielNagy GabrielNagy force-pushed the FACT-1847/cloud-fact-3.x branch from d598269 to dd5ef3b Compare March 8, 2021 10:34
@ciprianbadescu ciprianbadescu requested a review from a team March 8, 2021 10:46
@luchihoratiu luchihoratiu merged commit bfe625a into puppetlabs:3.x Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants