Jira (FACT-2988) Facter is slow on windows due to azure metadata query

3 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Mar 16, 2021, 8:53:04 PM3/16/21
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Facter / Bug FACT-2988
Facter is slow on windows due to azure metadata query
Issue Type: Bug Bug
Affects Versions: FACT 4.0.52
Assignee: Unassigned
Created: 2021/03/16 5:52 PM
Priority: Normal Normal
Reporter: Josh Cooper

The azure metadata fact takes 20+ seconds before timing out on Windows.

$ cmd /c facter --version
4.0.52
 
$ time cmd /c facter > /dev/null
real	0m22.431s
user	0m0.000s
sys	0m0.000s

When running with debug you can see:

[2021-03-17 01:49:16.036357 ] DEBUG Facter::Resolvers::Az - Querying Az metadata
[2021-03-17 01:49:37.076303 ] DEBUG Facter::Util::Resolvers::Http - Trying to connect to http://169.254.169.254/metadata/instance?api-version=2020-09-01 but got: execution expired

The EC2 fact uses the same IP address, so I'm not sure if the EC2 fact is blocked by default, or is excluded based on other criteria, or because the EC2 fact uses a very small connect timeout: https://github.com/puppetlabs/facter/blob/f169f54ddae91787b2f36a25d6e7cbc2330c5bbc/lib/facter/util/resolvers/http.rb#L10

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages